VirtualBox

Changeset 58891 in vbox for trunk/include


Ignore:
Timestamp:
Nov 27, 2015 12:28:57 AM (9 years ago)
Author:
vboxsync
Message:

dbgf.h: Extended DBGFEVENTTYPE with a bunch of events that may be useful. The CPU exceptions (DBGFEVENT_XCPT_XXX) are of immediate use. Events starting with DBGFEVENT_FIRST_SELECTABLE are envisioned being configured via a single API operating on some bitmask and making HM, IOM, ++ notifications calls to let the components update cached state/whatever. The interrupt events would require it's own API, that operates on a 32 byte bitmap with a bit counter for optimizations. The I/O and MMIO events should be added to the DBGFR3BpXxx API and added as two new DBGFBP variants.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/vmm/dbgf.h

    r58125 r58891  
    148148    DBGFEVENT_INVALID_COMMAND,
    149149
    150 
    151150    /** Fatal error.
    152151     * This notifies a fatal error in the VMM and that the debugger get's a
    153152     * chance to first hand information about the the problem.
    154153     */
    155     DBGFEVENT_FATAL_ERROR = 100,
     154    DBGFEVENT_FATAL_ERROR,
    156155    /** Breakpoint Hit.
    157156     * This notifies that a breakpoint installed by the debugger was hit. The
     
    159158     */
    160159    DBGFEVENT_BREAKPOINT,
     160    /** I/O port breakpoint.
     161     * @todo not yet implemented. */
     162    DBGFEVENT_BREAKPOINT_IO,
     163    /** MMIO breakpoint.
     164     * @todo not yet implemented. */
     165    DBGFEVENT_BREAKPOINT_MMIO,
    161166    /** Breakpoint Hit in the Hypervisor.
    162167     * This notifies that a breakpoint installed by the debugger was hit. The
     
    185190    DBGFEVENT_POWERING_OFF,
    186191
     192    /** The first selectable event.
     193     * Whether the debugger wants or doesn't want these events can be configured
     194     * via DBGFR3xxx and queried via DBGFR3yyy.  */
     195    DBGFEVENT_FIRST_SELECTABLE,
     196    /** Tripple fault.
     197     * @todo not yet implemented.  */
     198    DBGFEVENT_TRIPPLE_FAULT = DBGFEVENT_FIRST_SELECTABLE,
     199    DBGFEVENT_XCPT_DE,      /**< 0x00 - \#DE - Fault - NoErr - Integer divide error (zero/overflow). */
     200    DBGFEVENT_XCPT_DB,      /**< 0x01 - \#DB - trap/fault - NoErr - debug event. */
     201    DBGFEVENT_XCPT_02,      /**< 0x02 - Reserved for NMI, see interrupt events. */
     202    DBGFEVENT_XCPT_BP,      /**< 0x03 - \#BP - Trap  - NoErr - Breakpoint, INT 3 instruction. */
     203    DBGFEVENT_XCPT_OF,      /**< 0x04 - \#OF - Trap  - NoErr - Overflow, INTO instruction. */
     204    DBGFEVENT_XCPT_BR,      /**< 0x05 - \#BR - Fault - NoErr - BOUND Range Exceeded, BOUND instruction. */
     205    DBGFEVENT_XCPT_UD,      /**< 0x06 - \#UD - Fault - NoErr - Undefined(/Invalid) Opcode. */
     206    DBGFEVENT_XCPT_NM,      /**< 0x07 - \#NM - Fault - NoErr - Device not available, FP or (F)WAIT instruction. */
     207    DBGFEVENT_XCPT_DF,      /**< 0x08 - \#DF - Abort - Err=0 - Double fault. */
     208    DBGFEVENT_XCPT_09,      /**< 0x09 - Int9 - Fault - NoErr - Coprocessor Segment Overrun (obsolete). */
     209    DBGFEVENT_XCPT_TS,      /**< 0x0a - \#TS - Fault - ErrCd - Invalid TSS, Taskswitch or TSS access. */
     210    DBGFEVENT_XCPT_NP,      /**< 0x0b - \#NP - Fault - ErrCd - Segment not present. */
     211    DBGFEVENT_XCPT_SS,      /**< 0x0c - \#SS - Fault - ErrCd - Stack-Segment fault. */
     212    DBGFEVENT_XCPT_GP,      /**< 0x0d - \#GP - Fault - ErrCd - General protection fault. */
     213    DBGFEVENT_XCPT_PF,      /**< 0x0e - \#PF - Fault - ErrCd - Page fault. - interrupt gate!!! */
     214    DBGFEVENT_XCPT_0f,      /**< 0x0f - Rsvd - Resvd - Resvd - Intel Reserved. */
     215    DBGFEVENT_XCPT_MF,      /**< 0x10 - \#MF - Fault - NoErr - x86 FPU Floating-Point Error (Math fault), FP or (F)WAIT instruction. */
     216    DBGFEVENT_XCPT_AC,      /**< 0x11 - \#AC - Fault - Err=0 - Alignment Check. */
     217    DBGFEVENT_XCPT_MC,      /**< 0x12 - \#MC - Abort - NoErr - Machine Check. */
     218    DBGFEVENT_XCPT_XM,      /**< 0x13 - \#XF - Fault - NoErr - SIMD Floating-Point Exception. */
     219    DBGFEVENT_XCPT_VE,      /**< 0x14 - \#VE - Fault - Noerr - Virtualization exception. */
     220    DBGFEVENT_XCPT_15,      /**< 0x15 - Intel Reserved. */
     221    DBGFEVENT_XCPT_16,      /**< 0x16 - Intel Reserved. */
     222    DBGFEVENT_XCPT_17,      /**< 0x17 - Intel Reserved. */
     223    DBGFEVENT_XCPT_18,      /**< 0x18 - Intel Reserved. */
     224    DBGFEVENT_XCPT_19,      /**< 0x19 - Intel Reserved. */
     225    DBGFEVENT_XCPT_1a,      /**< 0x1a - Intel Reserved. */
     226    DBGFEVENT_XCPT_1b,      /**< 0x1b - Intel Reserved. */
     227    DBGFEVENT_XCPT_1c,      /**< 0x1c - Intel Reserved. */
     228    DBGFEVENT_XCPT_1d,      /**< 0x1d - Intel Reserved. */
     229    DBGFEVENT_XCPT_1e,      /**< 0x1e - \#SX - Fault - ErrCd - Security Exception. */
     230    DBGFEVENT_XCPT_1f,      /**< 0x1f - Intel Reserved. */
     231    /** The first exception event. */
     232    DBGFEVENT_XCPT_FIRST = DBGFEVENT_XCPT_DE,
     233    /** The last exception event. */
     234    DBGFEVENT_XCPT_LAST  = DBGFEVENT_XCPT_1f,
     235    /** Interrupt event.
     236     * @todo not yet implemented.  */
     237    DBGFEVENT_INT,
     238    /** Access to an unassigned I/O port.
     239     * @todo not yet implemented. */
     240    DBGFEVENT_IOPORT_UNASSIGNED,
     241    /** Access to an unused I/O port on a device.
     242     * @todo not yet implemented.  */
     243    DBGFEVENT_IOPORT_UNUSED,
     244    /** Unassigned memory event.
     245     * @todo not yet implemented.  */
     246    DBGFEVENT_MEMORY_UNASSIGNED,
     247    /** Attempt to write to unshadowed ROM.
     248     * @todo not yet implemented.  */
     249    DBGFEVENT_MEMORY_ROM_WRITE,
     250
     251    /** Exit - Task switch.
     252     * @todo not yet implemented.  */
     253    DBGFEVENT_EXIT_TASK_SWITCH,
     254    /** Exit - HALT instruction.
     255     * @todo not yet implemented.  */
     256    DBGFEVENT_EXIT_HALT,
     257    /** Exit - MWAIT instruction.
     258     * @todo not yet implemented.  */
     259    DBGFEVENT_EXIT_MWAIT,
     260    /** Exit - MONITOR instruction.
     261     * @todo not yet implemented.  */
     262    DBGFEVENT_EXIT_MONITOR,
     263    /** Exit - CPUID instruction (missing stuff in raw-mode).
     264     * @todo not yet implemented.  */
     265    DBGFEVENT_EXIT_CPUID,
     266    /** Exit - INV instruction.
     267     * @todo not yet implemented.  */
     268    DBGFEVENT_EXIT_INV,
     269    /** Exit - WBINVD instruction.
     270     * @todo not yet implemented.  */
     271    DBGFEVENT_EXIT_WBINVD,
     272    /** Exit - INVLPG instruction.
     273     * @todo not yet implemented.  */
     274    DBGFEVENT_EXIT_INVLPG,
     275    /** Exit - RDTSC instruction.
     276     * @todo not yet implemented.  */
     277    DBGFEVENT_EXIT_RDTSC,
     278    /** Exit - RDTSCP instruction.
     279     * @todo not yet implemented.  */
     280    DBGFEVENT_EXIT_RDTSCP,
     281    /** Exit - RDPMC instruction.
     282     * @todo not yet implemented.  */
     283    DBGFEVENT_EXIT_RDPMC,
     284    /** Exit - RDMSR instruction.
     285     * @todo not yet implemented.  */
     286    DBGFEVENT_EXIT_RDMSR,
     287    /** Exit - WRMSR instruction.
     288     * @todo not yet implemented.  */
     289    DBGFEVENT_EXIT_WRMSR,
     290    /** Exit - CRx read instruction (missing smsw in raw-mode).
     291     * @todo not yet implemented.  */
     292    DBGFEVENT_EXIT_CRX_READ,
     293    /** Exit - CRx write instruction.
     294     * @todo not yet implemented.  */
     295    DBGFEVENT_EXIT_CRX_WRITE,
     296    /** Exit - DRx read instruction.
     297     * @todo not yet implemented.  */
     298    DBGFEVENT_EXIT_DRX_READ,
     299    /** Exit - DRx write instruction.
     300     * @todo not yet implemented.  */
     301    DBGFEVENT_EXIT_DRx_WRITE,
     302    /** Exit - PAUSE instruction (not in raw-mode).
     303     * @todo not yet implemented.  */
     304    DBGFEVENT_EXIT_PAUSE,
     305    /** Exit - XSETBV instruction.
     306     * @todo not yet implemented.  */
     307    DBGFEVENT_EXIT_XSETBV,
     308    /** Exit - VMCALL (intel) or VMMCALL (AMD) instruction.
     309     * @todo not yet implemented.  */
     310    DBGFEVENT_EXIT_VMM_CALL,
     311    /** Exit - VT-x VMCLEAR instruction.
     312     * @todo not yet implemented.  */
     313    DBGFEVENT_EXIT_VTX_VMCLEAR,
     314    /** Exit - VT-x VMLAUNCH instruction.
     315     * @todo not yet implemented.  */
     316    DBGFEVENT_EXIT_VTX_VMLAUNCH,
     317    /** Exit - VT-x VMPTRLD instruction.
     318     * @todo not yet implemented.  */
     319    DBGFEVENT_EXIT_VTX_VMPTRLD,
     320    /** Exit - VT-x VMPTRST instruction.
     321     * @todo not yet implemented.  */
     322    DBGFEVENT_EXIT_VTX_VMPTRST,
     323    /** Exit - VT-x VMREAD instruction.
     324     * @todo not yet implemented.  */
     325    DBGFEVENT_EXIT_VTX_VMREAD,
     326    /** Exit - VT-x VMRESUME instruction.
     327     * @todo not yet implemented.  */
     328    DBGFEVENT_EXIT_VTX_VMRESUME,
     329    /** Exit - VT-x VMWRITE instruction.
     330     * @todo not yet implemented.  */
     331    DBGFEVENT_EXIT_VTX_VMWRITE,
     332    /** Exit - VT-x VMXOFF instruction.
     333     * @todo not yet implemented.  */
     334    DBGFEVENT_EXIT_VTX_VMXOFF,
     335    /** Exit - VT-x VMXON instruction.
     336     * @todo not yet implemented.  */
     337    DBGFEVENT_EXIT_VTX_VMXON,
     338    /** Exit - VT-x VMFUNC instruction.
     339     * @todo not yet implemented.  */
     340    DBGFEVENT_EXIT_VTX_VMFUNC,
     341    /** Exit - AMD-V VMRUN instruction.
     342     * @todo not yet implemented.  */
     343    DBGFEVENT_EXIT_SVM_VMRUN,
     344    /** Exit - AMD-V VMLOAD instruction.
     345     * @todo not yet implemented.  */
     346    DBGFEVENT_EXIT_SVM_VMLOAD,
     347    /** Exit - AMD-V VMSAVE instruction.
     348     * @todo not yet implemented.  */
     349    DBGFEVENT_EXIT_SVM_VMSAVE,
     350    /** Exit - AMD-V STGI instruction.
     351     * @todo not yet implemented.  */
     352    DBGFEVENT_EXIT_SVM_STGI,
     353    /** Exit - AMD-V CLGI instruction.
     354     * @todo not yet implemented.  */
     355    DBGFEVENT_EXIT_SVM_CLGI,
     356
     357    /** End of valid event values. */
     358    DBGFEVENT_END,
    187359    /** The usual 32-bit hack. */
    188360    DBGFEVENT_32BIT_HACK = 0x7fffffff
    189361} DBGFEVENTTYPE;
    190 
     362AssertCompile(DBGFEVENT_XCPT_LAST - DBGFEVENT_XCPT_FIRST == 0x1f);
    191363
    192364/**
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