- Timestamp:
- May 14, 2009 8:34:39 AM (16 years ago)
- Location:
- trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/hwaccm.h
r19227 r19679 127 127 VMMR3DECL(void) HWACCMR3NotifyScheduled(PVMCPU pVCpu); 128 128 VMMR3DECL(void) HWACCMR3NotifyEmulated(PVMCPU pVCpu); 129 VMMR3DECL(bool) HWACCMR3IsActive(PVM pVM);129 VMMR3DECL(bool) HWACCMR3IsActive(PVMCPU pVCpu); 130 130 VMMR3DECL(bool) HWACCMR3IsNestedPagingActive(PVM pVM); 131 131 VMMR3DECL(bool) HWACCMR3IsAllowed(PVM pVM); -
trunk/src/VBox/VMM/EM.cpp
r19660 r19679 1616 1616 * Traps can be directly forwarded in hardware accelerated mode. 1617 1617 */ 1618 if (HWACCM R3IsActive(pVM))1618 if (HWACCMIsEnabled(pVM)) 1619 1619 { 1620 1620 #ifdef LOGGING_ENABLED … … 3488 3488 VMCPU_FF_CLEAR(pVCpu, VMCPU_FF_INHIBIT_INTERRUPTS); 3489 3489 } 3490 if (HWACCMR3IsActive(pV M))3490 if (HWACCMR3IsActive(pVCpu)) 3491 3491 rc2 = VINF_EM_RESCHEDULE_HWACC; 3492 3492 else -
trunk/src/VBox/VMM/HWACCM.cpp
r19326 r19679 178 178 pVM->hwaccm.s.svm.fEnabled = false; 179 179 180 pVM->hwaccm.s.fActive = false;181 180 pVM->hwaccm.s.fNestedPaging = false; 182 181 … … 248 247 { 249 248 LogFlow(("HWACCMR3InitCPU\n")); 249 250 for (unsigned i=0;i<pVM->cCPUs;i++) 251 { 252 PVMCPU pVCpu = &pVM->aCpus[i]; 253 254 pVCpu->hwaccm.s.fActive = false; 255 } 250 256 251 257 #ifdef VBOX_WITH_STATISTICS … … 1178 1184 pVCpu->hwaccm.s.vmx.cr4_mask = 0; 1179 1185 1186 pVCpu->hwaccm.s.fActive = false; 1180 1187 pVCpu->hwaccm.s.Event.fPending = false; 1181 1188 … … 1249 1256 if (pVM->hwaccm.s.svm.fEnabled) 1250 1257 { 1251 pV M->hwaccm.s.fActive = true;1258 pVCpu->hwaccm.s.fActive = true; 1252 1259 return true; 1253 1260 } 1254 1261 1255 pV M->hwaccm.s.fActive = false;1262 pVCpu->hwaccm.s.fActive = false; 1256 1263 1257 1264 /* Note! The context supplied by REM is partial. If we add more checks here, be sure to verify that REM provides this info! */ … … 1378 1385 return false; 1379 1386 1380 pV M->hwaccm.s.fActive = true;1387 pVCpu->hwaccm.s.fActive = true; 1381 1388 return true; 1382 1389 } … … 1410 1417 * 1411 1418 * @returns boolean 1412 * @param pV M The VMto operate on.1413 */ 1414 VMMR3DECL(bool) HWACCMR3IsActive(PVM pVM)1415 { 1416 return pV M->hwaccm.s.fActive;1419 * @param pVCpu The VMCPU to operate on. 1420 */ 1421 VMMR3DECL(bool) HWACCMR3IsActive(PVMCPU pVCpu) 1422 { 1423 return pVCpu->hwaccm.s.fActive; 1417 1424 } 1418 1425 -
trunk/src/VBox/VMM/HWACCMInternal.h
r19337 r19679 190 190 bool fInitialized; 191 191 192 /** Set when we're using VMX/SVN at that moment. */193 bool fActive;194 195 192 /** Set when hardware acceleration is allowed. */ 196 193 bool fAllowed; … … 210 207 /** Explicit alignment padding to make 32-bit gcc align u64RegisterMask 211 208 * naturally. */ 212 bool padding[ 1];209 bool padding[2]; 213 210 214 211 /** And mask for copying register contents. */ … … 463 460 bool fForceTLBFlush; 464 461 465 /** Explicit alignment padding to make 32-bit gcc align u64RegisterMask 466 * naturally. */ 467 bool padding[1]; 462 /** Set when we're using VT-x or AMD-V at that moment. */ 463 bool fActive; 468 464 469 465 /** HWACCM_CHANGED_* flags. */ -
trunk/src/VBox/VMM/PGMMap.cpp
r19141 r19679 517 517 /* Ignore the additions mapping fix call in VT-x/AMD-V. */ 518 518 if ( pVM->pgm.s.fMappingsFixed 519 && HWACCM R3IsActive(pVM))519 && HWACCMIsEnabled(pVM)) 520 520 return VINF_SUCCESS; 521 521 … … 710 710 711 711 /* Ignore in VT-x/AMD-V mode. */ 712 if (HWACCM R3IsActive(pVM))712 if (HWACCMIsEnabled(pVM)) 713 713 return VINF_SUCCESS; 714 714 -
trunk/src/VBox/VMM/TRPM.cpp
r19639 r19679 1459 1459 if (RT_SUCCESS(rc)) 1460 1460 { 1461 if (HWACCM R3IsActive(pVM))1461 if (HWACCMIsEnabled(pVM)) 1462 1462 { 1463 1463 rc = TRPMAssertTrap(pVCpu, u8Interrupt, enmEvent); -
trunk/src/VBox/VMM/VMMGuruMeditation.cpp
r19585 r19679 266 266 RTGCUINTPTR uCR2 = 0xdeadface; 267 267 int rc2 = TRPMQueryTrapAll(pVCpu, &u8TrapNo, &enmType, &uErrorCode, &uCR2); 268 if (!HWACCM R3IsActive(pVM))268 if (!HWACCMIsEnabled(pVM)) 269 269 { 270 270 if (RT_SUCCESS(rc2)) … … 285 285 * The hypervisor dump is not relevant when we're in VT-x/AMD-V mode. 286 286 */ 287 if (HWACCM R3IsActive(pVM))287 if (HWACCMIsEnabled(pVM)) 288 288 { 289 289 pHlp->pfnPrintf(pHlp, "\n"); … … 449 449 pVCpu->vmm.s.pbEMTStackRC, pVCpu->vmm.s.pbEMTStackBottomRC, 450 450 VMM_STACK_SIZE, pVCpu->vmm.s.pbEMTStackR3); 451 } /* !HWACCM R3IsActive*/451 } /* !HWACCMIsEnabled */ 452 452 break; 453 453 }
Note:
See TracChangeset
for help on using the changeset viewer.