Changeset 85854 in vbox for trunk/src/VBox/VMM/VMMR3
- Timestamp:
- Aug 21, 2020 7:14:06 AM (5 years ago)
- svn:sync-xref-src-repo-rev:
- 140022
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR3/HM.cpp
r85121 r85854 315 315 /** @cfgm{/HM/EnableNestedPaging, bool, false} 316 316 * Enables nested paging (aka extended page tables). */ 317 rc = CFGMR3QueryBoolDef(pCfgHm, "EnableNestedPaging", &pVM->hm.s.fAllowNestedPaging, false); 317 bool fAllowNestedPaging = false; 318 rc = CFGMR3QueryBoolDef(pCfgHm, "EnableNestedPaging", &fAllowNestedPaging, false); 318 319 AssertRCReturn(rc, rc); 319 320 320 321 /** @cfgm{/HM/EnableUX, bool, true} 321 322 * Enables the VT-x unrestricted execution feature. */ 322 rc = CFGMR3QueryBoolDef(pCfgHm, "EnableUX", &pVM->hm.s.vmx.fAllowUnrestricted, true); 323 bool fAllowUnrestricted = true; 324 rc = CFGMR3QueryBoolDef(pCfgHm, "EnableUX", &fAllowUnrestricted, true); 323 325 AssertRCReturn(rc, rc); 324 326 … … 568 570 * configured so that CPUM can make decisions based on our configuration. 569 571 */ 570 Assert(!pVM->hm.s.fNestedPaging);571 if (pVM->hm.s.fAllowNestedPaging)572 if ( fAllowNestedPaging 573 && (fCaps & SUPVTCAPS_NESTED_PAGING)) 572 574 { 573 if (fCaps & SUPVTCAPS_NESTED_PAGING) 574 pVM->hm.s.fNestedPaging = true; 575 else 576 pVM->hm.s.fAllowNestedPaging = false; 577 } 578 579 if (fCaps & SUPVTCAPS_VT_X) 580 { 581 Assert(!pVM->hm.s.vmx.fUnrestrictedGuest); 582 if (pVM->hm.s.vmx.fAllowUnrestricted) 575 pVM->hm.s.fNestedPaging = true; 576 if (fCaps & SUPVTCAPS_VT_X) 583 577 { 584 if ( (fCaps & SUPVTCAPS_VTX_UNRESTRICTED_GUEST)585 && pVM->hm.s.fNestedPaging)578 if ( fAllowUnrestricted 579 && (fCaps & SUPVTCAPS_VTX_UNRESTRICTED_GUEST)) 586 580 pVM->hm.s.vmx.fUnrestrictedGuest = true; 587 581 else 588 pVM->hm.s.vmx.fAllowUnrestricted = false;582 Assert(!pVM->hm.s.vmx.fUnrestrictedGuest); 589 583 } 590 584 } 585 else 586 Assert(!pVM->hm.s.fNestedPaging); 591 587 } 592 588 else
Note:
See TracChangeset
for help on using the changeset viewer.