[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] [HVM][VMX] NX bit implies PAE can be enabled. If IA32 VMX guest finds



# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Node ID 15e80a946a6a7b8f865416e0c9c707d3ce413e3d
# Parent  f69c4a275d4dcb6c40d021655ad84cdee0d382ef
[HVM][VMX] NX bit implies PAE can be enabled. If IA32 VMX guest finds
NX bit is there, it may enable PAE even if PAE bit is returned 0 by
CPUID.

Signed-off-by: Xiaowei Yang <xiaowei.yang@xxxxxxxxx>
---
 xen/arch/x86/hvm/vmx/vmx.c |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff -r f69c4a275d4d -r 15e80a946a6a xen/arch/x86/hvm/vmx/vmx.c
--- a/xen/arch/x86/hvm/vmx/vmx.c        Wed Nov 29 10:58:35 2006 +0000
+++ b/xen/arch/x86/hvm/vmx/vmx.c        Wed Nov 29 11:07:51 2006 +0000
@@ -878,15 +878,19 @@ static void vmx_do_cpuid(struct cpu_user
         {
             eax = ebx = ecx = edx = 0x0;
         }
+        else if ( input == CPUID_LEAF_0x80000001 )
+        {
+#if CONFIG_PAGING_LEVELS >= 3
+            if ( !v->domain->arch.hvm_domain.params[HVM_PARAM_PAE_ENABLED] )
+#endif
+                clear_bit(X86_FEATURE_NX & 31, &edx);
 #ifdef __i386__
-        else if ( input == CPUID_LEAF_0x80000001 )
-        {
             clear_bit(X86_FEATURE_LAHF_LM & 31, &ecx);
 
             clear_bit(X86_FEATURE_LM & 31, &edx);
             clear_bit(X86_FEATURE_SYSCALL & 31, &edx);
-        }
 #endif
+        }
     }
 
     regs->eax = (unsigned long) eax;

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.