Changeset 85854 in vbox
- Timestamp:
- Aug 21, 2020 7:14:06 AM (4 years ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 2 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 -
trunk/src/VBox/VMM/include/HMInternal.h
r85121 r85854 452 452 /** Set when we've initialized VMX or SVM. */ 453 453 bool fInitialized; 454 /** Set if nested paging is allowed. */455 bool fAllowNestedPaging;456 454 /** Set if large pages are enabled (requires nested paging). */ 457 455 bool fLargePages; … … 486 484 bool fMdsClearOnSched; 487 485 /** Alignment padding. */ 488 bool afPaddingMinus1[ 6];486 bool afPaddingMinus1[7]; 489 487 490 488 /** Maximum ASID allowed. */ … … 518 516 * without paging). */ 519 517 bool fUnrestrictedGuest; 520 /** Set if unrestricted guest execution is allowed to be used. */521 bool fAllowUnrestricted;522 518 /** Set if the preemption timer is in use or not. */ 523 519 bool fUsePreemptTimer; 524 520 /** The shift mask employed by the VMX-Preemption timer. */ 525 521 uint8_t cPreemptTimerShift; 522 /** Padding. */ 523 bool afPadding0; 526 524 527 525 /** Virtual address of the APIC-access page. */
Note:
See TracChangeset
for help on using the changeset viewer.