Changeset 14543 in vbox
- Timestamp:
- Nov 24, 2008 7:36:37 PM (16 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/vm.h
r14411 r14543 537 537 * This is placed here for performance reasons. */ 538 538 bool fCSAMEnabled; 539 540 539 /** Hardware VM support is available and enabled. 541 540 * This is placed here for performance reasons. */ 542 541 bool fHWACCMEnabled; 543 542 /** Hardware VM support is required and non-optional. 543 * This is initialized together with the rest of the VM structure. */ 544 bool fHwVirtExtForced; 544 545 /** PARAV enabled flag. */ 545 546 bool fPARAVEnabled; -
trunk/include/VBox/vm.mac
r13960 r14543 72 72 .fPATMEnabled resb 1 73 73 .fCSAMEnabled resb 1 74 .fHWACCMEnabled resb 3 74 .fHWACCMEnabled resb 1 75 .fHwVirtExtForced resb 1 76 .fPARAVEnabled resb 1 75 77 76 78 alignb 8 -
trunk/include/VBox/vmm.h
r14167 r14543 118 118 VMMDECL(uint32_t) VMMGetSvnRev(void); 119 119 120 /** @def VMMIsHwVirtExtForced 121 * Checks if forced to use the hardware assisted virtualization extensions. 122 * 123 * This is intended for making setup decisions where we can save resources when 124 * using hardware assisted virtualization. 125 * 126 * @returns true / false. 127 * @param pVM Pointer to the shared VM structure. */ 128 #define VMMIsHwVirtExtForced(pVM) ((pVM)->fHwVirtExtForced) 129 120 130 121 131 #ifdef IN_RING3 -
trunk/src/VBox/Main/ConsoleImpl2.cpp
r14525 r14543 205 205 else 206 206 fHWVirtExEnabled = (hwVirtExEnabled == TSBool_True); 207 #ifndef RT_OS_DARWIN /** @todo Implement HWVirtExt on darwin. See #1865. */ 207 #ifdef RT_OS_DARWIN 208 rc = CFGMR3InsertInteger(pRoot, "HwVirtExtForced", fHWVirtExEnabled); RC_CHECK(); 209 #else 210 rc = CFGMR3InsertInteger(pRoot, "HwVirtExtForced", 0); RC_CHECK(); 211 #endif 208 212 if (fHWVirtExEnabled) 209 213 { 210 214 PCFGMNODE pHWVirtExt; 211 215 rc = CFGMR3InsertNode(pRoot, "HWVirtExt", &pHWVirtExt); RC_CHECK(); 212 rc = CFGMR3InsertInteger(pHWVirtExt, "Enabled", 1); RC_CHECK(); 213 } 214 #endif 216 rc = CFGMR3InsertInteger(pHWVirtExt, "Enabled", 1); RC_CHECK(); 217 } 215 218 216 219 /* Nested paging (VT-x/AMD-V) */ -
trunk/src/VBox/VMM/MMHyper.cpp
r14071 r14543 781 781 * Allocate the hypervisor heap. 782 782 */ 783 const uint32_t cbAligned = RT_ALIGN_32(cb, PAGE_SIZE);783 const uint32_t cbAligned = RT_ALIGN_32(cb, PAGE_SIZE); 784 784 AssertReturn(cbAligned >= cb, VERR_INVALID_PARAMETER); 785 void *pv; 786 int rc = SUPPageAlloc(cbAligned >> PAGE_SHIFT, &pv); /** @todo #1865: heap allocation must be changed for osx (only). */ 785 int rc; 786 void *pv; 787 RTR0PTR pvR0; 788 #if 1 789 rc = SUPPageAlloc(cbAligned >> PAGE_SHIFT, &pv); /** @todo #1865: heap allocation must be changed for osx (only). */ 790 pvR0 = (uintptr_t)pv; 791 #else /**@todo resume here. */ 792 if (VMMIsHwVirtExtForced(pVM)) 793 rc = SUPPageAllocKernel((cbAligned >> PAGE_SHIFT, &pv, &pvR0, paPages); 794 else 795 { 796 rc = SUPPageAllocLocked((cbAligned >> PAGE_SHIFT, &pv, paPages); 797 pvR0 = (uintptr_t)pv; 798 } 799 #endif 787 800 if (RT_SUCCESS(rc)) 788 801 { -
trunk/src/VBox/VMM/VM.cpp
r13858 r14543 526 526 if (RT_SUCCESS(rc)) 527 527 { 528 rc = CFGMR3QueryBoolDef(CFGMR3GetRoot(pVM), "fHwVirtExtForced", &pVM->fHwVirtExtForced, false); 529 if (RT_SUCCESS(rc) && pVM->fHwVirtExtForced) 530 pVM->fHWACCMEnabled = true; 531 528 532 /* 529 533 * If executing in fake suplib mode disable RR3 and RR0 in the config. … … 541 545 * Make sure the CPU count in the config data matches. 542 546 */ 543 uint32_t cCPUsCfg; 544 rc = CFGMR3QueryU32Def(CFGMR3GetRoot(pVM), "NumCPUs", &cCPUsCfg, 1); 545 AssertLogRelMsgRC(rc, ("Configuration error: Querying \"NumCPUs\" as integer failed, rc=%Rrc\n", rc)); 546 if (RT_SUCCESS(rc) && cCPUsCfg != cCPUs) 547 if (RT_SUCCESS(rc)) 547 548 { 548 AssertLogRelMsgFailed(("Configuration error: \"NumCPUs\"=%RU32 and VMR3CreateVM::cCPUs=%RU32 does not match!\n", 549 cCPUsCfg, cCPUs)); 550 rc = VERR_INVALID_PARAMETER; 549 uint32_t cCPUsCfg; 550 rc = CFGMR3QueryU32Def(CFGMR3GetRoot(pVM), "NumCPUs", &cCPUsCfg, 1); 551 AssertLogRelMsgRC(rc, ("Configuration error: Querying \"NumCPUs\" as integer failed, rc=%Rrc\n", rc)); 552 if (RT_SUCCESS(rc) && cCPUsCfg != cCPUs) 553 { 554 AssertLogRelMsgFailed(("Configuration error: \"NumCPUs\"=%RU32 and VMR3CreateVM::cCPUs=%RU32 does not match!\n", 555 cCPUsCfg, cCPUs)); 556 rc = VERR_INVALID_PARAMETER; 557 } 551 558 } 552 559 if (RT_SUCCESS(rc))
Note:
See TracChangeset
for help on using the changeset viewer.