Changeset 1907 in vbox for trunk/src/VBox
- Timestamp:
- Apr 4, 2007 6:08:36 AM (18 years ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/EM.cpp
r1894 r1907 1068 1068 return emR3RawExecuteInstruction(pVM, "PATCHIR"); 1069 1069 } 1070 #if 0 /** @note no noticable change; revisit later when we can emulate iret ourselves. */ 1070 1071 else if (rcGC == VINF_PATM_PENDING_IRQ_AFTER_IRET) 1071 1072 { … … 1073 1074 return emR3RawExecuteInstruction(pVM, "PATCHIRET"); 1074 1075 } 1076 #endif 1075 1077 return VINF_EM_RESCHEDULE_REM; 1076 1078 -
trunk/src/VBox/VMM/PATM/PATMA.asm
r1898 r1907 1218 1218 ; we can't do an iret to v86 code, as we run with CPL=1. The iret would attempt a protected mode iret and (most likely) fault. 1219 1219 test dword [esp+12], X86_EFL_VM 1220 jnz 1220 jnz near iret_return_to_v86 1221 1221 1222 1222 ;;!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! … … 1234 1234 iret_notring0: 1235 1235 1236 ; if interrupts are pending, then we must go back to the host context to handle them!1237 ; Note: This is very important as pending pic interrupts can be overriden by apic interrupts if we don't check early enough (Fedora 5 boot)1238 ; @@todo fix this properly, so we can dispatch pending interrupts in GC1239 test dword [ss:PATM_VM_FORCEDACTIONS], VM_FF_INTERRUPT_APIC | VM_FF_INTERRUPT_PIC1240 jz iret_continue1241 1242 ; Go to our hypervisor trap handler to dispatch the pending irq1243 mov dword [ss:PATM_TEMP_EAX], eax1244 mov dword [ss:PATM_TEMP_ECX], ecx1245 mov dword [ss:PATM_TEMP_EDI], edi1246 mov dword [ss:PATM_TEMP_RESTORE_FLAGS], PATM_RESTORE_EAX | PATM_RESTORE_ECX | PATM_RESTORE_EDI1247 mov eax, PATM_ACTION_PENDING_IRQ_AFTER_IRET1248 lock or dword [ss:PATM_PENDINGACTION], eax1249 mov ecx, PATM_ACTION_MAGIC1250 mov edi, PATM_CURINSTRADDR1251 1252 popfd1253 db 0fh, 0bh ; illegal instr (hardcoded assumption in PATMHandleIllegalInstrTrap)1254 ; does not return1255 1256 iret_continue :1257 1236 ; This section must *always* be executed (!!) 1258 1237 ; Extract the IOPL from the return flags, save them to our virtual flags and … … 1369 1348 DD PATMIretEnd- PATMIretStart 1370 1349 %ifdef PATM_LOG_PATCHIRET 1371 DD 261350 DD 19 1372 1351 %else 1373 DD 251352 DD 18 1374 1353 %endif 1375 1354 DD PATM_INTERRUPTFLAG … … 1379 1358 DD 0 1380 1359 %endif 1381 DD PATM_VM_FORCEDACTIONS1382 DD 01383 DD PATM_TEMP_EAX1384 DD 01385 DD PATM_TEMP_ECX1386 DD 01387 DD PATM_TEMP_EDI1388 DD 01389 DD PATM_TEMP_RESTORE_FLAGS1390 DD 01391 DD PATM_PENDINGACTION1392 DD 01393 DD PATM_CURINSTRADDR1394 DD 01395 1360 DD PATM_VMFLAGS 1396 1361 DD 0
Note:
See TracChangeset
for help on using the changeset viewer.