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

[Xen-changelog] [xen-unstable] [HVM][VMX] Disable IA32e mode in VM_ENTRY_CONTROLS when guest tries



# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Node ID d745f1420d5b98aef8e518ff306b96fbfc7e6708
# Parent  ac2097d71e06dbbf77279af10d6ae7359d921ab0
[HVM][VMX] Disable IA32e mode in VM_ENTRY_CONTROLS when guest tries
to disable PG from LME mode.

Without this patch, the 64 Vista cannot boot.

Signed-off-by: Xiaohui Xin <xiaohui.xin@xxxxxxxxx>
Signed-off-by: Xin Li <xin.b.li@xxxxxxxxx>
---
 xen/arch/x86/hvm/vmx/vmx.c |    8 ++++++++
 1 files changed, 8 insertions(+)

diff -r ac2097d71e06 -r d745f1420d5b xen/arch/x86/hvm/vmx/vmx.c
--- a/xen/arch/x86/hvm/vmx/vmx.c        Tue Nov 07 09:48:19 2006 +0000
+++ b/xen/arch/x86/hvm/vmx/vmx.c        Tue Nov 07 10:18:50 2006 +0000
@@ -1512,6 +1512,14 @@ static int vmx_set_cr0(unsigned long val
     }
     else if ( (value & (X86_CR0_PE | X86_CR0_PG)) == X86_CR0_PE )
     {
+        if ( vmx_long_mode_enabled(v) )
+        {
+            v->arch.hvm_vmx.msr_content.msr_items[VMX_INDEX_MSR_EFER]
+              &= ~EFER_LMA;
+            __vmread(VM_ENTRY_CONTROLS, &vm_entry_value);
+            vm_entry_value &= ~VM_ENTRY_IA32E_MODE;
+            __vmwrite(VM_ENTRY_CONTROLS, vm_entry_value);
+        }
         shadow_update_paging_modes(v);
         __vmwrite(GUEST_CR3, v->arch.hvm_vcpu.hw_cr3);
     }

_______________________________________________
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®.