Changeset 17328 in vbox
- Timestamp:
- Mar 4, 2009 9:00:34 AM (16 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
-
include/VBox/hwaccm.h (modified) (1 diff)
-
src/VBox/VMM/HWACCM.cpp (modified) (1 diff)
-
src/VBox/VMM/IOM.cpp (modified) (1 diff)
-
src/VBox/VMM/IOMInternal.h (modified) (1 diff)
-
src/VBox/VMM/VMMAll/IOMAllMMIO.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/hwaccm.h
r17303 r17328 73 73 * @param pCtx CPU context 74 74 */ 75 #define HWACCMCanEmulateIoBlock(pCtx) (!CPUMIsGuestInPagedProtectedModeEx(pCtx)) 75 #define HWACCMCanEmulateIoBlock(pVM) (!CPUMIsGuestInPagedProtectedMode(pVM)) 76 #define HWACCMCanEmulateIoBlockEx(pCtx) (!CPUMIsGuestInPagedProtectedModeEx(pCtx)) 76 77 77 78 VMMDECL(int) HWACCMInvalidatePage(PVM pVM, RTGCPTR GCVirt); -
trunk/src/VBox/VMM/HWACCM.cpp
r17327 r17328 1204 1204 1205 1205 /* This is primarily intended to speed up Grub, so we don't care about paged protected mode. */ 1206 if (HWACCMCanEmulateIoBlock (pCtx))1206 if (HWACCMCanEmulateIoBlockEx(pCtx)) 1207 1207 { 1208 1208 Log(("HWACCMR3EmulateIoBlock -> enabled\n")); -
trunk/src/VBox/VMM/IOM.cpp
r16272 r17328 458 458 { 459 459 /* register the statistics counters. */ 460 rc = STAMR3RegisterF(pVM, &pStats->ReadR3, STAMTYPE_COUNTER, STAMVISIBILITY_USED, STAMUNIT_OCCURENCES, pszDesc, "/IOM/MMIO/%RGp-Read-R3", GCPhys); AssertRC(rc); 461 rc = STAMR3RegisterF(pVM, &pStats->WriteR3, STAMTYPE_COUNTER, STAMVISIBILITY_USED, STAMUNIT_OCCURENCES, pszDesc, "/IOM/MMIO/%RGp-Write-R3", GCPhys); AssertRC(rc); 462 rc = STAMR3RegisterF(pVM, &pStats->ReadRZ, STAMTYPE_COUNTER, STAMVISIBILITY_USED, STAMUNIT_OCCURENCES, pszDesc, "/IOM/MMIO/%RGp-Read-RZ", GCPhys); AssertRC(rc); 463 rc = STAMR3RegisterF(pVM, &pStats->WriteRZ, STAMTYPE_COUNTER, STAMVISIBILITY_USED, STAMUNIT_OCCURENCES, pszDesc, "/IOM/MMIO/%RGp-Write-RZ", GCPhys); AssertRC(rc); 464 rc = STAMR3RegisterF(pVM, &pStats->ReadRZToR3, STAMTYPE_COUNTER, STAMVISIBILITY_USED, STAMUNIT_OCCURENCES, pszDesc, "/IOM/MMIO/%RGp-Read-RZtoR3", GCPhys); AssertRC(rc); 465 rc = STAMR3RegisterF(pVM, &pStats->WriteRZToR3, STAMTYPE_COUNTER, STAMVISIBILITY_USED, STAMUNIT_OCCURENCES, pszDesc, "/IOM/MMIO/%RGp-Write-RZtoR3", GCPhys); AssertRC(rc); 460 rc = STAMR3RegisterF(pVM, &pStats->ReadR3, STAMTYPE_COUNTER, STAMVISIBILITY_USED, STAMUNIT_OCCURENCES, pszDesc, "/IOM/MMIO/%RGp-Read-R3", GCPhys); AssertRC(rc); 461 rc = STAMR3RegisterF(pVM, &pStats->WriteR3, STAMTYPE_COUNTER, STAMVISIBILITY_USED, STAMUNIT_OCCURENCES, pszDesc, "/IOM/MMIO/%RGp-Write-R3", GCPhys); AssertRC(rc); 462 rc = STAMR3RegisterF(pVM, &pStats->ReadRZ, STAMTYPE_COUNTER, STAMVISIBILITY_USED, STAMUNIT_OCCURENCES, pszDesc, "/IOM/MMIO/%RGp-Read-RZ", GCPhys); AssertRC(rc); 463 rc = STAMR3RegisterF(pVM, &pStats->WriteRZ, STAMTYPE_COUNTER, STAMVISIBILITY_USED, STAMUNIT_OCCURENCES, pszDesc, "/IOM/MMIO/%RGp-Write-RZ", GCPhys); AssertRC(rc); 464 rc = STAMR3RegisterF(pVM, &pStats->ReadRZToR3, STAMTYPE_COUNTER, STAMVISIBILITY_USED, STAMUNIT_OCCURENCES, pszDesc, "/IOM/MMIO/%RGp-Read-RZtoR3", GCPhys); AssertRC(rc); 465 rc = STAMR3RegisterF(pVM, &pStats->WriteRZToR3, STAMTYPE_COUNTER, STAMVISIBILITY_USED, STAMUNIT_OCCURENCES, pszDesc, "/IOM/MMIO/%RGp-Write-RZtoR3", GCPhys); AssertRC(rc); 466 rc = STAMR3RegisterF(pVM, &pStats->IOEmulateFailedR0, STAMTYPE_COUNTER, STAMVISIBILITY_USED, STAMUNIT_OCCURENCES, pszDesc, "/IOM/MMIO/%RGp-IOEmuFailedR0", GCPhys); AssertRC(rc); 466 467 467 468 /* Profiling */ -
trunk/src/VBox/VMM/IOMInternal.h
r13413 r17328 128 128 /** Number of writes to this address from R0/RC which was serviced in R3. */ 129 129 STAMCOUNTER WriteRZToR3; 130 131 /** Number of failed IO block emulation attempts. */ 132 STAMCOUNTER IOEmulateFailedR0; 133 130 134 } IOMMMIOSTATS; 131 135 /** Pointer to I/O port statistics. */ -
trunk/src/VBox/VMM/VMMAll/IOMAllMMIO.cpp
r16567 r17328 1393 1393 STAM_COUNTER_INC(&pStats->CTX_SUFF_Z(Write)); 1394 1394 #endif 1395 #ifdef IN_RING0 1396 if ( rc == VINF_EM_RAW_EMULATE_IO_BLOCK 1397 && !HWACCMCanEmulateIoBlock(pVM)) 1398 { 1399 /* Failed io emulation block attempt; just retry (a switch to ring 3 would jump right back) */ 1400 # ifdef VBOX_WITH_STATISTICS 1401 STAM_PROFILE_ADV_START(&pStats->CTX_SUFF_Z(ProfWrite), a); 1402 STAM_COUNTER_INC(&pStats->IOEmulateFailedR0); 1403 # endif 1404 int rc = pRange->CTX_SUFF(pfnWriteCallback)(pRange->CTX_SUFF(pDevIns), pRange->CTX_SUFF(pvUser), GCPhys, &u32Value, (unsigned)cbValue); 1405 # ifdef VBOX_WITH_STATISTICS 1406 STAM_PROFILE_ADV_STOP(&pStats->CTX_SUFF_Z(ProfWrite), a); 1407 if (rc != VINF_IOM_HC_MMIO_WRITE) 1408 STAM_COUNTER_INC(&pStats->CTX_SUFF_Z(Write)); 1409 # endif 1410 } 1411 #endif 1395 1412 Log4(("IOMMMIOWrite: GCPhys=%RGp u32=%08RX32 cb=%d rc=%Rrc\n", GCPhys, u32Value, cbValue, rc)); 1396 1413 return rc;
Note:
See TracChangeset
for help on using the changeset viewer.

