Changeset 57479 in vbox for trunk/src/VBox
- Timestamp:
- Aug 20, 2015 3:02:39 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR3/HM.cpp
r57478 r57479 359 359 * Read configuration. 360 360 */ 361 PCFGMNODE pCfgHM = CFGMR3GetChild(CFGMR3GetRoot(pVM), "HM/"); 361 PCFGMNODE pCfgHm = CFGMR3GetChild(CFGMR3GetRoot(pVM), "HM/"); 362 363 /* 364 * Validate the HM settings. 365 */ 366 rc = CFGMR3ValidateConfig(pCfgHm, "/HM/", 367 "HMForced" 368 "|EnableNestedPaging" 369 "|EnableUX" 370 "|EnableLargePages" 371 "|EnableVPID" 372 "|TPRPatchingEnabled" 373 "|64bitEnabled" 374 "|VmxPleGap" 375 "|VmxPleWindow" 376 "|SvmPauseFilter" 377 "|SvmPauseFilterThreshold" 378 "|Exclusive" 379 "|MaxResumeLoops" 380 "|UseVmxPreemptTimer", 381 "" /* pszValidNodes */, "HM" /* pszWho */, 0 /* uInstance */); 382 if (RT_FAILURE(rc)) 383 return rc; 362 384 363 385 /** @cfgm{/HM/HMForced, bool, false} … … 366 388 bool fHMForced; 367 389 #ifdef VBOX_WITH_RAW_MODE 368 rc = CFGMR3QueryBoolDef(pCfgH M, "HMForced", &fHMForced, false);390 rc = CFGMR3QueryBoolDef(pCfgHm, "HMForced", &fHMForced, false); 369 391 AssertRCReturn(rc, rc); 370 392 AssertLogRelMsgReturn(!fHMForced || pVM->fHMEnabled, ("Configuration error: HM forced but not enabled!\n"), … … 385 407 /** @cfgm{/HM/EnableNestedPaging, bool, false} 386 408 * Enables nested paging (aka extended page tables). */ 387 rc = CFGMR3QueryBoolDef(pCfgH M, "EnableNestedPaging", &pVM->hm.s.fAllowNestedPaging, false);409 rc = CFGMR3QueryBoolDef(pCfgHm, "EnableNestedPaging", &pVM->hm.s.fAllowNestedPaging, false); 388 410 AssertRCReturn(rc, rc); 389 411 390 412 /** @cfgm{/HM/EnableUX, bool, true} 391 413 * Enables the VT-x unrestricted execution feature. */ 392 rc = CFGMR3QueryBoolDef(pCfgH M, "EnableUX", &pVM->hm.s.vmx.fAllowUnrestricted, true);414 rc = CFGMR3QueryBoolDef(pCfgHm, "EnableUX", &pVM->hm.s.vmx.fAllowUnrestricted, true); 393 415 AssertRCReturn(rc, rc); 394 416 … … 396 418 * Enables using large pages (2 MB) for guest memory, thus saving on (nested) 397 419 * page table walking and maybe better TLB hit rate in some cases. */ 398 rc = CFGMR3QueryBoolDef(pCfgH M, "EnableLargePages", &pVM->hm.s.fLargePages, false);420 rc = CFGMR3QueryBoolDef(pCfgHm, "EnableLargePages", &pVM->hm.s.fLargePages, false); 399 421 AssertRCReturn(rc, rc); 400 422 401 423 /** @cfgm{/HM/EnableVPID, bool, false} 402 424 * Enables the VT-x VPID feature. */ 403 rc = CFGMR3QueryBoolDef(pCfgH M, "EnableVPID", &pVM->hm.s.vmx.fAllowVpid, false);425 rc = CFGMR3QueryBoolDef(pCfgHm, "EnableVPID", &pVM->hm.s.vmx.fAllowVpid, false); 404 426 AssertRCReturn(rc, rc); 405 427 406 428 /** @cfgm{/HM/TPRPatchingEnabled, bool, false} 407 429 * Enables TPR patching for 32-bit windows guests with IO-APIC. */ 408 rc = CFGMR3QueryBoolDef(pCfgH M, "TPRPatchingEnabled", &pVM->hm.s.fTprPatchingAllowed, false);430 rc = CFGMR3QueryBoolDef(pCfgHm, "TPRPatchingEnabled", &pVM->hm.s.fTprPatchingAllowed, false); 409 431 AssertRCReturn(rc, rc); 410 432 … … 414 436 * already have the support. */ 415 437 #ifdef VBOX_ENABLE_64_BITS_GUESTS 416 rc = CFGMR3QueryBoolDef(pCfgH M, "64bitEnabled", &pVM->hm.s.fAllow64BitGuests, HC_ARCH_BITS == 64);438 rc = CFGMR3QueryBoolDef(pCfgHm, "64bitEnabled", &pVM->hm.s.fAllow64BitGuests, HC_ARCH_BITS == 64); 417 439 AssertLogRelRCReturn(rc, rc); 418 440 #else … … 425 447 * latest PAUSE instruction to be start of a new PAUSE loop. 426 448 */ 427 rc = CFGMR3QueryU32Def(pCfgH M, "VmxPleGap", &pVM->hm.s.vmx.cPleGapTicks, 0);449 rc = CFGMR3QueryU32Def(pCfgHm, "VmxPleGap", &pVM->hm.s.vmx.cPleGapTicks, 0); 428 450 AssertRCReturn(rc, rc); 429 451 … … 435 457 * Setting VmxPleGap and VmxPleGap to 0 disables pause-filter exiting. 436 458 */ 437 rc = CFGMR3QueryU32Def(pCfgH M, "VmxPleWindow", &pVM->hm.s.vmx.cPleWindowTicks, 0);459 rc = CFGMR3QueryU32Def(pCfgHm, "VmxPleWindow", &pVM->hm.s.vmx.cPleWindowTicks, 0); 438 460 AssertRCReturn(rc, rc); 439 461 … … 442 464 * guest. When the counter is 0, a #VMEXIT is triggered. 443 465 */ 444 rc = CFGMR3QueryU16Def(pCfgH M, "SvmPauseFilterCount", &pVM->hm.s.svm.cPauseFilter, 0);466 rc = CFGMR3QueryU16Def(pCfgHm, "SvmPauseFilter", &pVM->hm.s.svm.cPauseFilter, 0); 445 467 AssertRCReturn(rc, rc); 446 468 … … 454 476 * pause-filter exiting. 455 477 */ 456 rc = CFGMR3QueryU16Def(pCfgH M, "SvmPauseFilterTreshold", &pVM->hm.s.svm.cPauseFilterThresholdTicks, 0);478 rc = CFGMR3QueryU16Def(pCfgHm, "SvmPauseFilterThreshold", &pVM->hm.s.svm.cPauseFilterThresholdTicks, 0); 457 479 AssertRCReturn(rc, rc); 458 480 … … 471 493 pVM->hm.s.fGlobalInit = true; 472 494 #else 473 rc = CFGMR3QueryBoolDef(pCfgH M, "Exclusive", &pVM->hm.s.fGlobalInit,495 rc = CFGMR3QueryBoolDef(pCfgHm, "Exclusive", &pVM->hm.s.fGlobalInit, 474 496 # if defined(RT_OS_WINDOWS) 475 497 false … … 485 507 * ring-3. The return value of RTThreadPreemptIsPendingTrusty in ring-0 486 508 * determines the default value. */ 487 rc = CFGMR3QueryU32Def(pCfgH M, "MaxResumeLoops", &pVM->hm.s.cMaxResumeLoops, 0 /* set by R0 later */);509 rc = CFGMR3QueryU32Def(pCfgHm, "MaxResumeLoops", &pVM->hm.s.cMaxResumeLoops, 0 /* set by R0 later */); 488 510 AssertLogRelRCReturn(rc, rc); 489 511 … … 491 513 * Whether to make use of the VMX-preemption timer feature of the CPU if it's 492 514 * available. */ 493 rc = CFGMR3QueryBoolDef(pCfgH M, "UseVmxPreemptTimer", &pVM->hm.s.vmx.fUsePreemptTimer, true);515 rc = CFGMR3QueryBoolDef(pCfgHm, "UseVmxPreemptTimer", &pVM->hm.s.vmx.fUsePreemptTimer, true); 494 516 AssertLogRelRCReturn(rc, rc); 495 517
Note:
See TracChangeset
for help on using the changeset viewer.