Changeset 45305 in vbox for trunk/src/VBox/VMM/include/IOMInline.h
- Timestamp:
- Apr 3, 2013 11:15:02 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/include/IOMInline.h
r45301 r45305 63 63 * 64 64 * @param pVM Pointer to the VM. 65 * @param GCPhys Physical address to lookup. 66 */ 67 DECLINLINE(PIOMMMIORANGE) iomMmioGetRange(PVM pVM, RTGCPHYS GCPhys) 65 * @param pVCpu Pointer to the virtual CPU structure of the caller. 66 * @param GCPhys Physical address to lookup. 67 */ 68 DECLINLINE(PIOMMMIORANGE) iomMmioGetRange(PVM pVM, PVMCPU pVCpu, RTGCPHYS GCPhys) 68 69 { 69 70 Assert(IOM_IS_SHARED_LOCK_OWNER(pVM)); 70 PIOMMMIORANGE pRange = pV M->iom.s.CTX_SUFF(pMMIORangeLast);71 PIOMMMIORANGE pRange = pVCpu->iom.s.CTX_SUFF(pMMIORangeLast); 71 72 if ( !pRange 72 73 || GCPhys - pRange->GCPhys >= pRange->cb) 73 pV M->iom.s.CTX_SUFF(pMMIORangeLast) = pRange74 pVCpu->iom.s.CTX_SUFF(pMMIORangeLast) = pRange 74 75 = (PIOMMMIORANGE)RTAvlroGCPhysRangeGet(&pVM->iom.s.CTX_SUFF(pTrees)->MMIOTree, GCPhys); 75 76 return pRange; … … 98 99 * 99 100 * @param pVM Pointer to the VM. 100 * @param GCPhys Physical address to lookup. 101 */ 102 DECLINLINE(PIOMMMIORANGE) iomMmioGetRangeWithRef(PVM pVM, RTGCPHYS GCPhys) 101 * @param pVCpu Pointer to the virtual CPU structure of the caller. 102 * @param GCPhys Physical address to lookup. 103 */ 104 DECLINLINE(PIOMMMIORANGE) iomMmioGetRangeWithRef(PVM pVM, PVMCPU pVCpu, RTGCPHYS GCPhys) 103 105 { 104 106 int rc = IOM_LOCK_SHARED_EX(pVM, VINF_SUCCESS); 105 107 AssertRCReturn(rc, NULL); 106 108 107 PIOMMMIORANGE pRange = pV M->iom.s.CTX_SUFF(pMMIORangeLast);109 PIOMMMIORANGE pRange = pVCpu->iom.s.CTX_SUFF(pMMIORangeLast); 108 110 if ( !pRange 109 111 || GCPhys - pRange->GCPhys >= pRange->cb) 110 pV M->iom.s.CTX_SUFF(pMMIORangeLast) = pRange112 pVCpu->iom.s.CTX_SUFF(pMMIORangeLast) = pRange 111 113 = (PIOMMMIORANGE)RTAvlroGCPhysRangeGet(&pVM->iom.s.CTX_SUFF(pTrees)->MMIOTree, GCPhys); 112 114 if (pRange) … … 140 142 * 141 143 * @param pVM Pointer to the VM. 142 * @param GCPhys Physical address to lookup. 143 */ 144 DECLINLINE(PIOMMMIORANGE) iomMMIOGetRangeUnsafe(PVM pVM, RTGCPHYS GCPhys) 145 { 146 PIOMMMIORANGE pRange = pVM->iom.s.CTX_SUFF(pMMIORangeLast); 144 * @param pVCpu Pointer to the virtual CPU structure of the caller. 145 * @param GCPhys Physical address to lookup. 146 */ 147 DECLINLINE(PIOMMMIORANGE) iomMMIOGetRangeUnsafe(PVM pVM, PVMCPU pVCpu, RTGCPHYS GCPhys) 148 { 149 PIOMMMIORANGE pRange = pVCpu->iom.s.CTX_SUFF(pMMIORangeLast); 147 150 if ( !pRange 148 151 || GCPhys - pRange->GCPhys >= pRange->cb) 149 pV M->iom.s.CTX_SUFF(pMMIORangeLast) = pRange152 pVCpu->iom.s.CTX_SUFF(pMMIORangeLast) = pRange 150 153 = (PIOMMMIORANGE)RTAvlroGCPhysRangeGet(&pVM->iom.s.CTX_SUFF(pTrees)->MMIOTree, GCPhys); 151 154 return pRange; … … 164 167 * @returns NULL if not found (R0/GC), or out of memory (R3). 165 168 * 166 * @param pVM Pointer to the VM. 167 * @param GCPhys Physical address to lookup. 168 * @param pRange The MMIO range. 169 */ 170 DECLINLINE(PIOMMMIOSTATS) iomMmioGetStats(PVM pVM, RTGCPHYS GCPhys, PIOMMMIORANGE pRange) 169 * @param pVM Pointer to the VM. 170 * @param pVCpu Pointer to the virtual CPU structure of the caller. 171 * @param GCPhys Physical address to lookup. 172 * @param pRange The MMIO range. 173 */ 174 DECLINLINE(PIOMMMIOSTATS) iomMmioGetStats(PVM pVM, PVMCPU pVCpu, RTGCPHYS GCPhys, PIOMMMIORANGE pRange) 171 175 { 172 176 IOM_LOCK_SHARED_EX(pVM, VINF_SUCCESS); … … 176 180 GCPhys = pRange->GCPhys; 177 181 178 PIOMMMIOSTATS pStats = pV M->iom.s.CTX_SUFF(pMMIOStatsLast);182 PIOMMMIOSTATS pStats = pVCpu->iom.s.CTX_SUFF(pMMIOStatsLast); 179 183 if ( !pStats 180 184 || pStats->Core.Key != GCPhys)
Note:
See TracChangeset
for help on using the changeset viewer.