VirtualBox

Changeset 1914 in vbox for trunk/src/VBox/VMM/PATM


Ignore:
Timestamp:
Apr 4, 2007 8:27:14 AM (18 years ago)
Author:
vboxsync
Message:

Reapplied 20145

File:
1 edited

Legend:

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

    r1907 r1914  
    12181218    ; 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.
    12191219    test    dword [esp+12], X86_EFL_VM
    1220     jnz near iret_return_to_v86
     1220    jnz     near iret_return_to_v86
    12211221
    12221222    ;;!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
     
    12341234iret_notring0:
    12351235
     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 GC
     1239    test    dword [ss:PATM_VM_FORCEDACTIONS], VM_FF_INTERRUPT_APIC | VM_FF_INTERRUPT_PIC
     1240    jz      iret_continue
     1241
     1242; Go to our hypervisor trap handler to dispatch the pending irq
     1243    mov     dword [ss:PATM_TEMP_EAX], eax
     1244    mov     dword [ss:PATM_TEMP_ECX], ecx
     1245    mov     dword [ss:PATM_TEMP_EDI], edi
     1246    mov     dword [ss:PATM_TEMP_RESTORE_FLAGS], PATM_RESTORE_EAX | PATM_RESTORE_ECX | PATM_RESTORE_EDI
     1247    mov     eax, PATM_ACTION_PENDING_IRQ_AFTER_IRET
     1248    lock    or dword [ss:PATM_PENDINGACTION], eax
     1249    mov     ecx, PATM_ACTION_MAGIC
     1250    mov     edi, PATM_CURINSTRADDR
     1251
     1252    popfd
     1253    db      0fh, 0bh        ; illegal instr (hardcoded assumption in PATMHandleIllegalInstrTrap)
     1254    ; does not return
     1255
     1256iret_continue :
    12361257        ; This section must *always* be executed (!!)
    12371258        ; Extract the IOPL from the return flags, save them to our virtual flags and
     
    13481369    DD      PATMIretEnd- PATMIretStart
    13491370%ifdef PATM_LOG_PATCHIRET
    1350     DD      19
     1371    DD      26
    13511372%else
    1352     DD      18
     1373    DD      25
    13531374%endif
    13541375    DD      PATM_INTERRUPTFLAG
     
    13581379    DD      0
    13591380%endif
     1381    DD      PATM_VM_FORCEDACTIONS
     1382    DD      0
     1383    DD      PATM_TEMP_EAX
     1384    DD      0
     1385    DD      PATM_TEMP_ECX
     1386    DD      0
     1387    DD      PATM_TEMP_EDI
     1388    DD      0
     1389    DD      PATM_TEMP_RESTORE_FLAGS
     1390    DD      0
     1391    DD      PATM_PENDINGACTION
     1392    DD      0
     1393    DD      PATM_CURINSTRADDR
     1394    DD      0
    13601395    DD      PATM_VMFLAGS
    13611396    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