Changeset 1309 in vbox
- Timestamp:
- Mar 7, 2007 8:05:32 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/MMAll.cpp
r1238 r1309 103 103 DECLINLINE(PMMLOOKUPHYPER) mmHyperLookupR0(PVM pVM, RTR0PTR R0Ptr, uint32_t *poff) 104 104 { 105 RTR3PTR R3Ptr;106 107 105 AssertCompile(sizeof(RTR0PTR) == sizeof(RTR3PTR)); 108 106 109 /** @todo fix this properly; the ring 0 pVM address differs from the R3 one. */ 110 if (R0Ptr >= pVM->pVMR0 && (RTR0UINTREG)R0Ptr < (RTR0UINTREG)pVM->pVMR0 + sizeof(*pVM)) 111 R3Ptr = (RTR3PTR)((RTR0UINTREG)R0Ptr - (RTR0UINTREG)pVM->pVMR0 + (RTR0UINTREG)pVM->pVMR3); 112 else 113 R3Ptr = (RTR3PTR)R0Ptr; 107 /* 108 * Translate Ring-0 VM addresses into Ring-3 VM addresses before feeding it to mmHyperLookupR3. 109 */ 110 /** @todo fix this properly; the ring 0 pVM address differs from the R3 one. (#1865) */ 111 RTR0UINTPTR offVM = (RTR0UINTPTR)R0Ptr - (RTR0UINTPTR)pVM->pVMR0; 112 RTR3PTR R3Ptr = offVM < sizeof(*pVM) 113 ? (RTR3PTR)((RTR3UINTPTR)pVM->pVMR3 + offVM) 114 : (RTR3PTR)R0Ptr; 114 115 115 116 return mmHyperLookupR3(pVM, R3Ptr, poff);
Note:
See TracChangeset
for help on using the changeset viewer.