Changeset 1126 in vbox for trunk/src/VBox/VMM
- Timestamp:
- Mar 1, 2007 12:30:58 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/EMAll.cpp
r880 r1126 1272 1272 1273 1273 /** 1274 * IRET Emulation. 1275 */ 1276 1277 /** 1278 * Interpret IRET (currently only to V86 code) 1279 * 1280 * @returns VBox status code. 1281 * @param pVM The VM handle. 1282 * @param pRegFrame The register frame. 1283 * 1284 */ 1285 EMDECL(int) EMInterpretIret(PVM pVM, PCPUMCTXCORE pRegFrame) 1286 { 1287 RTGCUINTPTR pIretStack = (RTGCUINTPTR)pRegFrame->esp; 1288 RTGCUINTPTR eip, cs, esp, ss, eflags, ds, es, fs, gs; 1289 int rc; 1290 1291 rc = emRamRead(pVM, &eip, (RTGCPTR)pIretStack , 4); 1292 rc |= emRamRead(pVM, &cs, (RTGCPTR)(pIretStack + 4), 4); 1293 rc |= emRamRead(pVM, &eflags, (RTGCPTR)(pIretStack + 8), 4); 1294 AssertRCReturn(rc, VERR_EM_INTERPRETER); 1295 AssertReturn(eflags & X86_EFL_VM, VERR_EM_INTERPRETER); 1296 1297 rc |= emRamRead(pVM, &esp, (RTGCPTR)(pIretStack + 12), 4); 1298 rc |= emRamRead(pVM, &ss, (RTGCPTR)(pIretStack + 16), 4); 1299 rc |= emRamRead(pVM, &es, (RTGCPTR)(pIretStack + 20), 4); 1300 rc |= emRamRead(pVM, &ds, (RTGCPTR)(pIretStack + 24), 4); 1301 rc |= emRamRead(pVM, &fs, (RTGCPTR)(pIretStack + 28), 4); 1302 rc |= emRamRead(pVM, &gs, (RTGCPTR)(pIretStack + 32), 4); 1303 AssertRCReturn(rc, VERR_EM_INTERPRETER); 1304 1305 pRegFrame->eip = eip; 1306 pRegFrame->cs = cs; 1307 1308 #ifndef IN_RING0 1309 CPUMRawSetEFlags(pVM, pRegFrame, eflags); 1310 #endif 1311 Assert((pRegFrame->eflags.u32 & (X86_EFL_IF|X86_EFL_IOPL)) == X86_EFL_IF); 1312 1313 pRegFrame->esp = ss; 1314 pRegFrame->ss = ss; 1315 pRegFrame->ds = ds; 1316 pRegFrame->es = es; 1317 pRegFrame->fs = fs; 1318 pRegFrame->gs = gs; 1319 1320 return VINF_SUCCESS; 1321 } 1322 1323 1324 /** 1325 * IRET Emulation. 1326 */ 1327 static int emInterpretIret(PVM pVM, PDISCPUSTATE pCpu, PCPUMCTXCORE pRegFrame, RTGCPTR pvFault, uint32_t *pcbSize) 1328 { 1329 return EMInterpretIret(pVM, pRegFrame); 1330 } 1331 1332 /** 1274 1333 * INVLPG Emulation. 1275 1334 */ … … 1707 1766 } 1708 1767 1709 1710 /**1711 * IRET Emulation.1712 */1713 static int emInterpretIret(PVM pVM, PDISCPUSTATE pCpu, PCPUMCTXCORE pRegFrame, RTGCPTR pvFault, uint32_t *pcbSize)1714 {1715 return VERR_EM_INTERPRETER;1716 }1717 1768 1718 1769 #ifdef IN_GC
Note:
See TracChangeset
for help on using the changeset viewer.