Changeset 37424 in vbox for trunk/src/VBox/VMM/VMMAll
- Timestamp:
- Jun 12, 2011 7:28:11 PM (14 years ago)
- Location:
- trunk/src/VBox/VMM/VMMAll
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/IOMAll.cpp
r36794 r37424 37 37 #include <VBox/log.h> 38 38 #include <iprt/assert.h> 39 #include "IOMInline.h" 39 40 40 41 … … 292 293 || (unsigned)Port - (unsigned)pRange->Port >= (unsigned)pRange->cPorts) 293 294 { 294 pRange = iomIOPortGetRange( &pVM->iom.s, Port);295 pRange = iomIOPortGetRange(pVM, Port); 295 296 if (pRange) 296 297 pVM->iom.s.CTX_SUFF(pRangeLastRead) = pRange; … … 387 388 * Handler in ring-3? 388 389 */ 389 PIOMIOPORTRANGER3 pRangeR3 = iomIOPortGetRangeR3( &pVM->iom.s, Port);390 PIOMIOPORTRANGER3 pRangeR3 = iomIOPortGetRangeR3(pVM, Port); 390 391 if (pRangeR3) 391 392 { … … 488 489 || (unsigned)Port - (unsigned)pRange->Port >= (unsigned)pRange->cPorts) 489 490 { 490 pRange = iomIOPortGetRange( &pVM->iom.s, Port);491 pRange = iomIOPortGetRange(pVM, Port); 491 492 if (pRange) 492 493 pVM->iom.s.CTX_SUFF(pRangeLastRead) = pRange; … … 569 570 * Handler in ring-3? 570 571 */ 571 PIOMIOPORTRANGER3 pRangeR3 = iomIOPortGetRangeR3( &pVM->iom.s, Port);572 PIOMIOPORTRANGER3 pRangeR3 = iomIOPortGetRangeR3(pVM, Port); 572 573 if (pRangeR3) 573 574 { … … 658 659 || (unsigned)Port - (unsigned)pRange->Port >= (unsigned)pRange->cPorts) 659 660 { 660 pRange = iomIOPortGetRange( &pVM->iom.s, Port);661 pRange = iomIOPortGetRange(pVM, Port); 661 662 if (pRange) 662 663 pVM->iom.s.CTX_SUFF(pRangeLastWrite) = pRange; … … 738 739 * Handler in ring-3? 739 740 */ 740 PIOMIOPORTRANGER3 pRangeR3 = iomIOPortGetRangeR3( &pVM->iom.s, Port);741 PIOMIOPORTRANGER3 pRangeR3 = iomIOPortGetRangeR3(pVM, Port); 741 742 if (pRangeR3) 742 743 { … … 828 829 || (unsigned)Port - (unsigned)pRange->Port >= (unsigned)pRange->cPorts) 829 830 { 830 pRange = iomIOPortGetRange( &pVM->iom.s, Port);831 pRange = iomIOPortGetRange(pVM, Port); 831 832 if (pRange) 832 833 pVM->iom.s.CTX_SUFF(pRangeLastWrite) = pRange; … … 909 910 * Handler in ring-3? 910 911 */ 911 PIOMIOPORTRANGER3 pRangeR3 = iomIOPortGetRangeR3( &pVM->iom.s, Port);912 PIOMIOPORTRANGER3 pRangeR3 = iomIOPortGetRangeR3(pVM, Port); 912 913 if (pRangeR3) 913 914 { -
trunk/src/VBox/VMM/VMMAll/IOMAllMMIO.cpp
r37423 r37424 36 36 #include <VBox/vmm/vmm.h> 37 37 #include <VBox/vmm/hwaccm.h> 38 #include "IOMInline.h" 38 39 39 40 #include <VBox/dis.h> … … 81 82 { 82 83 #ifdef VBOX_WITH_STATISTICS 83 PIOMMMIOSTATS pStats = iomMMIOGetStats( &pVM->iom.s, GCPhysFault, pRange);84 PIOMMMIOSTATS pStats = iomMMIOGetStats(pVM, GCPhysFault, pRange); 84 85 Assert(pStats); 85 86 #endif … … 103 104 { 104 105 #ifdef VBOX_WITH_STATISTICS 105 PIOMMMIOSTATS pStats = iomMMIOGetStats( &pVM->iom.s, GCPhys, pRange);106 PIOMMMIOSTATS pStats = iomMMIOGetStats(pVM, GCPhys, pRange); 106 107 Assert(pStats); 107 108 #endif … … 455 456 PhysDst |= (RTGCUINTPTR)pu8Virt & PAGE_OFFSET_MASK; 456 457 if ( RT_SUCCESS(rc) 457 && (pMMIODst = iomMMIOGetRange( &pVM->iom.s, PhysDst)))458 && (pMMIODst = iomMMIOGetRange(pVM, PhysDst))) 458 459 { 459 460 /** @todo implement per-device locks for MMIO access. */ … … 1076 1077 PIOMMMIORANGE pRange = (PIOMMMIORANGE)pvUser; 1077 1078 Assert(pRange); 1078 Assert(pRange == iomMMIOGetRange( &pVM->iom.s, GCPhysFault));1079 Assert(pRange == iomMMIOGetRange(pVM, GCPhysFault)); 1079 1080 /** @todo implement per-device locks for MMIO access. It can replace the IOM 1080 1081 * lock for most of the code, provided that we retake the lock while … … 1087 1088 * Locate the statistics, if > PAGE_SIZE we'll use the first byte for everything. 1088 1089 */ 1089 PIOMMMIOSTATS pStats = iomMMIOGetStats( &pVM->iom.s, GCPhysFault, pRange);1090 PIOMMMIOSTATS pStats = iomMMIOGetStats(pVM, GCPhysFault, pRange); 1090 1091 if (!pStats) 1091 1092 { … … 1309 1310 return VINF_IOM_HC_MMIO_READ_WRITE; 1310 1311 #endif 1311 VBOXSTRICTRC rcStrict = iomMMIOHandler(pVM, (uint32_t)uErrorCode, pCtxCore, GCPhysFault, iomMMIOGetRange( &pVM->iom.s, GCPhysFault));1312 VBOXSTRICTRC rcStrict = iomMMIOHandler(pVM, (uint32_t)uErrorCode, pCtxCore, GCPhysFault, iomMMIOGetRange(pVM, GCPhysFault)); 1312 1313 iomUnlock(pVM); 1313 1314 return VBOXSTRICTRC_VAL(rcStrict); … … 1340 1341 1341 1342 Assert(pRange); 1342 Assert(pRange == iomMMIOGetRange( &pVM->iom.s, GCPhysFault));1343 Assert(pRange == iomMMIOGetRange(pVM, GCPhysFault)); 1343 1344 /** @todo implement per-device locks for MMIO access. It can replace the IOM 1344 1345 * lock for most of the code, provided that we retake the lock while … … 1384 1385 * Lookup the current context range node and statistics. 1385 1386 */ 1386 PIOMMMIORANGE pRange = iomMMIOGetRange( &pVM->iom.s, GCPhys);1387 PIOMMMIORANGE pRange = iomMMIOGetRange(pVM, GCPhys); 1387 1388 AssertMsg(pRange, ("Handlers and page tables are out of sync or something! GCPhys=%RGp cbValue=%d\n", GCPhys, cbValue)); 1388 1389 if (!pRange) … … 1394 1395 Assert(!pRange->CTX_SUFF(pDevIns) || !pRange->CTX_SUFF(pDevIns)->CTX_SUFF(pCritSect)); 1395 1396 #ifdef VBOX_WITH_STATISTICS 1396 PIOMMMIOSTATS pStats = iomMMIOGetStats( &pVM->iom.s, GCPhys, pRange);1397 PIOMMMIOSTATS pStats = iomMMIOGetStats(pVM, GCPhys, pRange); 1397 1398 if (!pStats) 1398 1399 { … … 1513 1514 * Lookup the current context range node. 1514 1515 */ 1515 PIOMMMIORANGE pRange = iomMMIOGetRange( &pVM->iom.s, GCPhys);1516 PIOMMMIORANGE pRange = iomMMIOGetRange(pVM, GCPhys); 1516 1517 AssertMsg(pRange, ("Handlers and page tables are out of sync or something! GCPhys=%RGp cbValue=%d\n", GCPhys, cbValue)); 1517 1518 if (!pRange) … … 1523 1524 Assert(!pRange->CTX_SUFF(pDevIns) || !pRange->CTX_SUFF(pDevIns)->CTX_SUFF(pCritSect)); 1524 1525 #ifdef VBOX_WITH_STATISTICS 1525 PIOMMMIOSTATS pStats = iomMMIOGetStats( &pVM->iom.s, GCPhys, pRange);1526 PIOMMMIOSTATS pStats = iomMMIOGetStats(pVM, GCPhys, pRange); 1526 1527 if (!pStats) 1527 1528 { … … 1934 1935 * Lookup the context range node the page belongs to. 1935 1936 */ 1936 PIOMMMIORANGE pRange = iomMMIOGetRange( &pVM->iom.s, GCPhys);1937 PIOMMMIORANGE pRange = iomMMIOGetRange(pVM, GCPhys); 1937 1938 AssertMsgReturn(pRange, 1938 1939 ("Handlers and page tables are out of sync or something! GCPhys=%RGp\n", GCPhys), VERR_IOM_MMIO_RANGE_NOT_FOUND); … … 1998 1999 #ifdef VBOX_STRICT 1999 2000 /* Can't lock IOM here due to potential deadlocks in the VGA device; not safe to access. */ 2000 PIOMMMIORANGE pRange = iomMMIOGetRangeUnsafe( &pVM->iom.s, GCPhys);2001 PIOMMMIORANGE pRange = iomMMIOGetRangeUnsafe(pVM, GCPhys); 2001 2002 AssertMsgReturn(pRange, 2002 2003 ("Handlers and page tables are out of sync or something! GCPhys=%RGp\n", GCPhys), VERR_IOM_MMIO_RANGE_NOT_FOUND); … … 2051 2052 #ifdef VBOX_STRICT 2052 2053 /* Can't lock IOM here due to potential deadlocks in the VGA device; not safe to access. */ 2053 PIOMMMIORANGE pRange = iomMMIOGetRangeUnsafe( &pVM->iom.s, GCPhys);2054 PIOMMMIORANGE pRange = iomMMIOGetRangeUnsafe(pVM, GCPhys); 2054 2055 AssertMsgReturn(pRange, 2055 2056 ("Handlers and page tables are out of sync or something! GCPhys=%RGp\n", GCPhys), VERR_IOM_MMIO_RANGE_NOT_FOUND);
Note:
See TracChangeset
for help on using the changeset viewer.