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] [xen-unstable] Fix VMX guest can't boot after MCE enable

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Fix VMX guest can't boot after MCE enabled.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 27 Jun 2007 14:50:50 -0700
Delivery-date: Wed, 27 Jun 2007 14:49:09 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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 Keir Fraser <keir@xxxxxxxxxxxxx>
# Date 1182971301 -3600
# Node ID 5eec9a8825d466f76ecc847e9ecbbff5d166bbf1
# Parent  16f35bea00f8f1ea01499a65f4657c0b7b769cdc
Fix VMX guest can't boot after MCE enabled.
Signed-off-by: Xin Li <xin.b.li@xxxxxxxxx>
---
 xen/arch/x86/hvm/vmx/vmx.c      |    9 +++++----
 xen/include/asm-x86/processor.h |    6 ++++++
 2 files changed, 11 insertions(+), 4 deletions(-)

diff -r 16f35bea00f8 -r 5eec9a8825d4 xen/arch/x86/hvm/vmx/vmx.c
--- a/xen/arch/x86/hvm/vmx/vmx.c        Wed Jun 27 20:00:50 2007 +0100
+++ b/xen/arch/x86/hvm/vmx/vmx.c        Wed Jun 27 20:08:21 2007 +0100
@@ -2387,14 +2387,15 @@ static int mov_to_cr(int gp, int cr, str
     case 4: /* CR4 */
         old_cr = v->arch.hvm_vmx.cpu_shadow_cr4;
 
-        if ( value & ~mmu_cr4_features )
+        if ( value & X86_CR4_RESERVED_BITS )
         {
-            HVM_DBG_LOG(DBG_LEVEL_1, "Guest attempts to enable unsupported "
-                        "CR4 features %lx (host %lx)",
-                        value, mmu_cr4_features);
+            HVM_DBG_LOG(DBG_LEVEL_1,
+                        "Guest attempts to set reserved bit in CR4: %lx",
+                        value);
             vmx_inject_hw_exception(v, TRAP_gp_fault, 0);
             break;
         }
+
         if ( (value & X86_CR4_PAE) && !(old_cr & X86_CR4_PAE) )
         {
             if ( vmx_pgbit_test(v) )
diff -r 16f35bea00f8 -r 5eec9a8825d4 xen/include/asm-x86/processor.h
--- a/xen/include/asm-x86/processor.h   Wed Jun 27 20:00:50 2007 +0100
+++ b/xen/include/asm-x86/processor.h   Wed Jun 27 20:08:21 2007 +0100
@@ -80,6 +80,12 @@
 #define X86_CR4_OSFXSR         0x0200  /* enable fast FPU save and restore */
 #define X86_CR4_OSXMMEXCPT     0x0400  /* enable unmasked SSE exceptions */
 #define X86_CR4_VMXE           0x2000  /* enable VMX */
+
+#define X86_CR4_RESERVED_BITS   \
+    ~(X86_CR4_VME | X86_CR4_PVI | X86_CR4_TSD | \
+      X86_CR4_DE  | X86_CR4_PSE | X86_CR4_PAE | \
+      X86_CR4_MCE | X86_CR4_PGE | X86_CR4_PCE | \
+      X86_CR4_OSFXSR | X86_CR4_OSXMMEXCPT | X86_CR4_VMXE)
 
 /*
  * Trap/fault mnemonics.

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] Fix VMX guest can't boot after MCE enabled., Xen patchbot-unstable <=