do not need to load PAE PDPTRs if going to nested paging mode

This commit is contained in:
Stanislav Shwartsman 2012-02-14 12:36:39 +00:00
parent bb7a648d91
commit 5c02e7cebd

View File

@ -528,10 +528,13 @@ bx_bool BX_CPU_C::SvmEnterLoadCheckGuestState(void)
if (paged_real_mode)
BX_CPU_THIS_PTR cr0.val32 |= BX_CR0_PG_MASK;
if (BX_CPU_THIS_PTR cr0.get_PG() && BX_CPU_THIS_PTR cr4.get_PAE() && !long_mode()) {
if (! CheckPDPTR(BX_CPU_THIS_PTR cr3)) {
BX_ERROR(("SVM: VMRUN PDPTR check failed !"));
return 0;
SVM_CONTROLS *ctrls = &BX_CPU_THIS_PTR vmcb.ctrls;
if (! ctrls->nested_paging) {
if (BX_CPU_THIS_PTR cr0.get_PG() && BX_CPU_THIS_PTR cr4.get_PAE() && !long_mode()) {
if (! CheckPDPTR(BX_CPU_THIS_PTR cr3)) {
BX_ERROR(("SVM: VMRUN PDPTR check failed !"));
return 0;
}
}
}