- Timestamp:
- Dec 21, 2009 5:18:47 PM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 56226
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/EMAll.cpp
r24953 r25550 107 107 108 108 109 #ifndef IN_RC110 111 109 /** 112 110 * Read callback for disassembly function; supports reading bytes that cross a page boundary … … 145 143 rc = PGMPhysSimpleReadGCPtr(pVCpu, pDest, pSrc, cb); 146 144 AssertMsgRC(rc, ("PGMPhysSimpleReadGCPtr failed for pSrc=%RGv cb=%x rc=%d\n", pSrc, cb, rc)); 147 # el se /* IN_RING3 */145 # elif defined(IN_RING3) 148 146 if (!PATMIsPatchGCAddr(pVM, pSrc)) 149 147 { … … 152 150 } 153 151 else 154 { 155 for (unsigned i = 0; i < cb; i++) 152 memcpy(pDest, PATMR3GCPtrToHCPtr(pVM, pSrc), cb); 153 154 # elif defined(IN_RC) 155 if (!PATMIsPatchGCAddr(pVM, (RTRCPTR)pSrc)) 156 { 157 int rc = MMGCRamRead(pVM, pDest, (void *)pSrc, cb); 158 if (rc == VERR_ACCESS_DENIED) 156 159 { 157 uint8_t opcode; 158 if (RT_SUCCESS(PATMR3QueryOpcode(pVM, (RTGCPTR)pSrc + i, &opcode))) 159 *(pDest+i) = opcode; 160 160 /* Recently flushed; access the data manually. */ 161 rc = PGMPhysSimpleReadGCPtr(pVCpu, pDest, pSrc, cb); 162 AssertRC(rc); 161 163 } 162 164 } 165 else /* the hypervisor region is always present. */ 166 memcpy(pDest, (RTRCPTR)pSrc, cb); 167 163 168 # endif /* IN_RING3 */ 164 169 return VINF_SUCCESS; 165 170 } 166 171 172 173 #ifndef IN_RC 167 174 DECLINLINE(int) emDisCoreOne(PVM pVM, PVMCPU pVCpu, PDISCPUSTATE pDis, RTGCUINTPTR InstrGC, uint32_t *pOpsize) 168 175 { … … 195 202 DECLINLINE(int) emDisCoreOne(PVM pVM, PVMCPU pVCpu, PDISCPUSTATE pDis, RTGCUINTPTR InstrGC, uint32_t *pOpsize) 196 203 { 197 NOREF(pVCpu); 198 NOREF(pVM); 199 return DISCoreOne(pDis, InstrGC, pOpsize); 204 EMDISSTATE State; 205 206 State.pVM = pVM; 207 State.pVCpu = pVCpu; 208 State.GCPtr = InstrGC; 209 210 return DISCoreOneEx(InstrGC, pDis->mode, EMReadBytes, &State, pDis, pOpsize); 200 211 } 201 212
Note:
See TracChangeset
for help on using the changeset viewer.