WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] The PAE guest can run on SMP 64-bit Xen0 now.

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] The PAE guest can run on SMP 64-bit Xen0 now.
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 08 Mar 2006 12:08:11 +0000
Delivery-date: Wed, 08 Mar 2006 12:09:33 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID 3219aa25ad46dc327fc5abf7b87e39050be5334a
# Parent  f55d6c299c7e2003fd97f1c7263f9f5195c0dca0
The PAE guest can run on SMP 64-bit Xen0 now.

Optimize the save/restore action for EFER MSR during the context switch.

Signed-off-by: Jun Nakajima jun.nakajima@xxxxxxxxx
Signed-off-by: Xiaohui Xin xiaohui.xin@xxxxxxxxx
Signed-off-by: Yunhong Jiang <yunhong.jiang@xxxxxxxxx>

diff -r f55d6c299c7e -r 3219aa25ad46 xen/arch/x86/hvm/vmx/vmx.c
--- a/xen/arch/x86/hvm/vmx/vmx.c        Wed Mar  8 10:51:17 2006
+++ b/xen/arch/x86/hvm/vmx/vmx.c        Wed Mar  8 10:53:39 2006
@@ -223,6 +223,11 @@
 
     switch (regs->ecx){
     case MSR_EFER:
+        /* offending reserved bit will cause #GP */
+        if ( msr_content &
+                ~( EFER_LME | EFER_LMA | EFER_NX | EFER_SCE ) )
+             vmx_inject_exception(vc, TRAP_gp_fault, 0);
+
         if ((msr_content & EFER_LME) ^
             test_bit(VMX_CPU_STATE_LME_ENABLED,
                      &vc->arch.hvm_vmx.cpu_state)){
@@ -236,18 +241,9 @@
         if (msr_content & EFER_LME)
             set_bit(VMX_CPU_STATE_LME_ENABLED,
                     &vc->arch.hvm_vmx.cpu_state);
-        /* No update for LME/LMA since it have no effect */
+
         msr->msr_items[VMX_INDEX_MSR_EFER] =
             msr_content;
-        if (msr_content & ~(EFER_LME | EFER_LMA)){
-            msr->msr_items[VMX_INDEX_MSR_EFER] = msr_content;
-            if (!test_bit(VMX_INDEX_MSR_EFER, &msr->flags)){
-                rdmsrl(MSR_EFER,
-                       host_state->msr_items[VMX_INDEX_MSR_EFER]);
-                set_bit(VMX_INDEX_MSR_EFER, &host_state->flags);
-                set_bit(VMX_INDEX_MSR_EFER, &msr->flags);
-            }
-        }
         break;
 
     case MSR_FS_BASE:
diff -r f55d6c299c7e -r 3219aa25ad46 xen/arch/x86/shadow.c
--- a/xen/arch/x86/shadow.c     Wed Mar  8 10:51:17 2006
+++ b/xen/arch/x86/shadow.c     Wed Mar  8 10:53:39 2006
@@ -3583,6 +3583,11 @@
 
     ASSERT( d->arch.ops->guest_paging_levels >= PAGING_L3 );
 
+#if CONFIG_PAGING_LEVELS >= 4
+    if ( (error_code & (ERROR_I | ERROR_P)) == (ERROR_I | ERROR_P) )
+        return 1;
+#endif
+
 #if CONFIG_PAGING_LEVELS == 4
     if ( d->arch.ops->guest_paging_levels == PAGING_L4 ) 
     {
diff -r f55d6c299c7e -r 3219aa25ad46 xen/include/asm-x86/shadow_64.h
--- a/xen/include/asm-x86/shadow_64.h   Wed Mar  8 10:51:17 2006
+++ b/xen/include/asm-x86/shadow_64.h   Wed Mar  8 10:53:39 2006
@@ -51,8 +51,11 @@
 #define READ_FAULT  0
 #define WRITE_FAULT 1
 
-#define ERROR_W    2
+#define ERROR_P     1
+#define ERROR_W     2
 #define ERROR_U     4
+#define ERROR_I     (1 << 4)
+
 #define X86_64_SHADOW_DEBUG 0
 
 #if X86_64_SHADOW_DEBUG

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] The PAE guest can run on SMP 64-bit Xen0 now., Xen patchbot -unstable <=