VirtualBox

Changeset 1143 in vbox


Ignore:
Timestamp:
Mar 2, 2007 8:28:55 AM (18 years ago)
Author:
vboxsync
Message:

Incorrect checking of pending interrupts. Potential problems with sti/iret combinations.
(irq would not be dispatched, but we would execute iret natively)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/PATM/PATMA.asm

    r1125 r1143  
    11431143    jz      iret_clearIF
    11441144
    1145     ; if interrupts are pending, then we must go back to the host context to handle them!
    1146     ; @@todo fix this properly, so we can dispatch pending interrupts in GC
    1147     test    dword [ss:PATM_VM_FORCEDACTIONS], VM_FF_INTERRUPT_APIC | VM_FF_INTERRUPT_PIC | VM_FF_TIMER | VM_FF_REQUEST
    1148     jz      iret_continue
    1149 
    1150     ; Go to our hypervisor trap handler to dispatch the pending irq
    1151     mov     dword [ss:PATM_TEMP_EAX], eax
    1152     mov     dword [ss:PATM_TEMP_ECX], ecx
    1153     mov     dword [ss:PATM_TEMP_EDI], edi
    1154     mov     dword [ss:PATM_TEMP_RESTORE_FLAGS], PATM_RESTORE_EAX | PATM_RESTORE_ECX | PATM_RESTORE_EDI
    1155     mov     eax, PATM_ACTION_PENDING_IRQ_AFTER_IRET
    1156     lock    or dword [ss:PATM_PENDINGACTION], eax
    1157     mov     ecx, PATM_ACTION_MAGIC
    1158     mov     edi, PATM_CURINSTRADDR
    1159 
    1160     popfd
    1161 
    1162     db      0fh, 0bh        ; illegal instr (hardcoded assumption in PATMHandleIllegalInstrTrap)
    1163     ; does not return
    1164 
    1165 iret_continue:
     1145    ; force ring 1 CS RPL
    11661146    or      dword [esp+8], 1
    11671147iret_notring0:
     
    12781258    DD      PATMIretEnd- PATMIretStart
    12791259%ifdef PATM_LOG_PATCHIRET
    1280     DD      26
     1260    DD      19
    12811261%else
    1282     DD      25
     1262    DD      18
    12831263%endif
    12841264    DD      PATM_INTERRUPTFLAG
     
    12881268    DD      0
    12891269%endif
    1290     DD      PATM_VM_FORCEDACTIONS
    1291     DD      0
    1292     DD      PATM_TEMP_EAX
    1293     DD      0
    1294     DD      PATM_TEMP_ECX
    1295     DD      0
    1296     DD      PATM_TEMP_EDI
    1297     DD      0
    1298     DD      PATM_TEMP_RESTORE_FLAGS
    1299     DD      0
    1300     DD      PATM_PENDINGACTION
    1301     DD      0
    1302     DD      PATM_CURINSTRADDR
    1303     DD      0
    13041270    DD      PATM_VMFLAGS
    13051271    DD      0
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette