VirtualBox

Changeset 1437 in vbox for trunk/src


Ignore:
Timestamp:
Mar 13, 2007 10:46:52 AM (18 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
19471
Message:

Added trap/irq gate logging

Location:
trunk/src/VBox/VMM/PATM
Files:
2 edited

Legend:

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

    r1393 r1437  
    394394    pushf
    395395
     396%ifdef PATM_LOG_PATCHIRET
     397    push    eax
     398    push    ecx
     399    push    edx
     400    lea     edx, dword [ss:esp+12+4]        ;3 dwords + pushed flags -> iret eip
     401    mov     eax, PATM_ACTION_LOG_GATE_ENTRY
     402    lock    or dword [ss:PATM_PENDINGACTION], eax
     403    mov     ecx, PATM_ACTION_MAGIC
     404    db      0fh, 0bh        ; illegal instr (hardcoded assumption in PATMHandleIllegalInstrTrap)
     405    pop     edx
     406    pop     ecx
     407    pop     eax
     408%endif
     409
    396410    test    dword [esp+12], X86_EFL_VM
    397411    jnz     PATMTrapNoRing1
     
    429443    DD      0
    430444    DD      PATMTrapEntryEnd - PATMTrapEntryStart
     445%ifdef PATM_LOG_PATCHIRET
     446    DD      4
     447%else
    431448    DD      3
    432     DD      PATM_INTERRUPTFLAG
    433     DD      0
     449%endif
     450    DD      PATM_INTERRUPTFLAG
     451    DD      0
     452%ifdef PATM_LOG_PATCHIRET
     453    DD      PATM_PENDINGACTION
     454    DD      0
     455%endif
    434456    DD      PATM_VMFLAGS
    435457    DD      0
     
    457479    pushf
    458480
     481%ifdef PATM_LOG_PATCHIRET
     482    push    eax
     483    push    ecx
     484    push    edx
     485    lea     edx, dword [ss:esp+12+4+4]        ;3 dwords + pushed flags + error code -> iret eip
     486    mov     eax, PATM_ACTION_LOG_GATE_ENTRY
     487    lock    or dword [ss:PATM_PENDINGACTION], eax
     488    mov     ecx, PATM_ACTION_MAGIC
     489    db      0fh, 0bh        ; illegal instr (hardcoded assumption in PATMHandleIllegalInstrTrap)
     490    pop     edx
     491    pop     ecx
     492    pop     eax
     493%endif
     494
    459495    test    dword [esp+16], X86_EFL_VM
    460496    jnz     PATMTrapErrorCodeNoRing1
     
    492528    DD      0
    493529    DD      PATMTrapErrorCodeEntryEnd - PATMTrapErrorCodeEntryStart
     530%ifdef PATM_LOG_PATCHIRET
     531    DD      4
     532%else
    494533    DD      3
    495     DD      PATM_INTERRUPTFLAG
    496     DD      0
     534%endif
     535    DD      PATM_INTERRUPTFLAG
     536    DD      0
     537%ifdef PATM_LOG_PATCHIRET
     538    DD      PATM_PENDINGACTION
     539    DD      0
     540%endif
    497541    DD      PATM_VMFLAGS
    498542    DD      0
     
    520564    pushf
    521565
     566%ifdef PATM_LOG_PATCHIRET
     567    push    eax
     568    push    ecx
     569    push    edx
     570    lea     edx, dword [ss:esp+12+4]        ;3 dwords + pushed flags -> iret eip
     571    mov     eax, PATM_ACTION_LOG_GATE_ENTRY
     572    lock    or dword [ss:PATM_PENDINGACTION], eax
     573    mov     ecx, PATM_ACTION_MAGIC
     574    db      0fh, 0bh        ; illegal instr (hardcoded assumption in PATMHandleIllegalInstrTrap)
     575    pop     edx
     576    pop     ecx
     577    pop     eax
     578%endif
     579
    522580    test    dword [esp+12], X86_EFL_VM
    523581    jnz     PATMIntNoRing1
     
    552610    DD      0
    553611    DD      PATMIntEntryEnd - PATMIntEntryStart
     612%ifdef PATM_LOG_PATCHIRET
     613    DD      4
     614%else
    554615    DD      3
    555     DD      PATM_INTERRUPTFLAG
    556     DD      0
     616%endif
     617    DD      PATM_INTERRUPTFLAG
     618    DD      0
     619%ifdef PATM_LOG_PATCHIRET
     620    DD      PATM_PENDINGACTION
     621    DD      0
     622%endif
    557623    DD      PATM_VMFLAGS
    558624    DD      0
     
    580646    pushf
    581647
     648%ifdef PATM_LOG_PATCHIRET
     649    push    eax
     650    push    ecx
     651    push    edx
     652    lea     edx, dword [ss:esp+12+4+4]        ;3 dwords + pushed flags + error code -> iret eip
     653    mov     eax, PATM_ACTION_LOG_GATE_ENTRY
     654    lock    or dword [ss:PATM_PENDINGACTION], eax
     655    mov     ecx, PATM_ACTION_MAGIC
     656    db      0fh, 0bh        ; illegal instr (hardcoded assumption in PATMHandleIllegalInstrTrap)
     657    pop     edx
     658    pop     ecx
     659    pop     eax
     660%endif
     661
    582662    test    dword [esp+16], X86_EFL_VM
    583663    jnz     PATMIntNoRing1_ErrorCode
     
    612692    DD      0
    613693    DD      PATMIntEntryErrorCodeEnd - PATMIntEntryErrorCodeStart
     694%ifdef PATM_LOG_PATCHIRET
     695    DD      4
     696%else
    614697    DD      3
    615     DD      PATM_INTERRUPTFLAG
    616     DD      0
     698%endif
     699    DD      PATM_INTERRUPTFLAG
     700    DD      0
     701%ifdef PATM_LOG_PATCHIRET
     702    DD      PATM_PENDINGACTION
     703    DD      0
     704%endif
    617705    DD      PATM_VMFLAGS
    618706    DD      0
  • trunk/src/VBox/VMM/PATM/PATMA.mac

    r1125 r1437  
    9393%define PATM_ACTION_LOG_RET                     12
    9494%define PATM_ACTION_LOG_CALL                    13
     95%define PATM_ACTION_LOG_GATE_ENTRY              14
    9596
    9697;/* Magic dword found in ecx for patm pending actions. */
Note: See TracChangeset for help on using the changeset viewer.

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