[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>
This commit is contained in:
kfraser@localhost.localdomain committed 2006-11-07 10:18:50 +00:00
1 parent 53aff3a78c
commit 288301c37f
1 file changed
+8
+8
View File
@@ -1512,6 +1512,14 @@ static int vmx_set_cr0(unsigned long value)
}
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);
}
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.