direct-io.hg

changeset 12263:d745f1420d5b

[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@intel.com>
Signed-off-by: Xin Li <xin.b.li@intel.com>
author kfraser@localhost.localdomain
date Tue Nov 07 10:18:50 2006 +0000 (2006-11-07)
parents ac2097d71e06
children a174f9787014
files xen/arch/x86/hvm/vmx/vmx.c
line diff
     1.1 --- a/xen/arch/x86/hvm/vmx/vmx.c	Tue Nov 07 09:48:19 2006 +0000
     1.2 +++ b/xen/arch/x86/hvm/vmx/vmx.c	Tue Nov 07 10:18:50 2006 +0000
     1.3 @@ -1512,6 +1512,14 @@ static int vmx_set_cr0(unsigned long val
     1.4      }
     1.5      else if ( (value & (X86_CR0_PE | X86_CR0_PG)) == X86_CR0_PE )
     1.6      {
     1.7 +        if ( vmx_long_mode_enabled(v) )
     1.8 +        {
     1.9 +            v->arch.hvm_vmx.msr_content.msr_items[VMX_INDEX_MSR_EFER]
    1.10 +              &= ~EFER_LMA;
    1.11 +            __vmread(VM_ENTRY_CONTROLS, &vm_entry_value);
    1.12 +            vm_entry_value &= ~VM_ENTRY_IA32E_MODE;
    1.13 +            __vmwrite(VM_ENTRY_CONTROLS, vm_entry_value);
    1.14 +        }
    1.15          shadow_update_paging_modes(v);
    1.16          __vmwrite(GUEST_CR3, v->arch.hvm_vcpu.hw_cr3);
    1.17      }