VirtualBox

Changeset 66686 in vbox for trunk/include/VBox


Ignore:
Timestamp:
Apr 27, 2017 12:38:17 PM (8 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
115079
Message:

VMM/IEM: Handle raising of exceptions during delivery of a previous exception or interrupt.
The code takes into account additional info. required by HM for handling recursive exceptions as well.

File:
1 edited

Legend:

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

    r66581 r66686  
    3838 * @{
    3939 */
     40
     41/** @name IEMXCPTRAISEINFO_XXX - Extra info. on a recursive exception situation.
     42 *
     43 * This is primarily used by HM for working around a PGM limitation (see
     44 * @bugref{6607}) and special NMI/IRET handling. In the future, this may be
     45 * used for diagnostics.
     46 *
     47 * @{
     48 */
     49typedef uint32_t IEMXCPTRAISEINFO;
     50/** Pointer to a IEMXCPTINFO type. */
     51typedef IEMXCPTRAISEINFO *PIEMXCPTRAISEINFO;
     52/** No addition info. available. */
     53#define IEMXCPTRAISEINFO_NONE                    RT_BIT_32(0)
     54/** Delivery of a \#AC caused another \#AC. */
     55#define IEMXCPTRAISEINFO_AC_AC                   RT_BIT_32(1)
     56/** Delivery of a \#PF caused another \#PF. */
     57#define IEMXCPTRAISEINFO_PF_PF                   RT_BIT_32(2)
     58/** Delivery of a \#PF caused some contributory exception. */
     59#define IEMXCPTRAISEINFO_PF_CONTRIBUTORY_XCPT    RT_BIT_32(3)
     60/** Delivery of an external interrupt caused an exception. */
     61#define IEMXCPTRAISEINFO_EXT_INT_XCPT            RT_BIT_32(4)
     62/** Delivery of an software interrupt caused an exception. */
     63#define IEMXCPTRAISEINFO_EXT_INT_PF              RT_BIT_32(5)
     64/** Delivery of an external interrupt caused a \#PF. */
     65#define IEMXCPTRAISEINFO_SOFT_INT_XCPT           RT_BIT_32(6)
     66/** Delivery of an NMI caused a \#PF. */
     67#define IEMXCPTRAISEINFO_NMI_PF                  RT_BIT_32(7)
     68/** Can re-execute the instruction at CS:RIP. */
     69#define IEMXCPTRAISEINFO_CAN_REEXEC_INSTR        RT_BIT_32(8)
     70/** @} */
     71
     72
     73/** @name IEMXCPTRAISE_XXX - Ways to handle a recursive exception condition.
     74 * @{ */
     75typedef enum IEMXCPTRAISE
     76{
     77    /** Raise the current (second) exception. */
     78    IEMXCPTRAISE_CURRENT_XCPT = 0,
     79    /** Re-raise the previous (first) event (for HM, unused by IEM). */
     80    IEMXCPTRAISE_PREV_EVENT,
     81    /** Re-execute instruction at CS:RIP (for HM, unused by IEM). */
     82    IEMXCPTRAISE_REEXEC_INSTR,
     83    /** Raise a \#DF exception. */
     84    IEMXCPTRAISE_DOUBLE_FAULT,
     85    /** Raise a triple fault. */
     86    IEMXCPTRAISE_TRIPLE_FAULT,
     87    /** Cause a CPU hang. */
     88    IEMXCPTRAISE_CPU_HANG,
     89    /** Invalid sequence of events. */
     90    IEMXCPTRAISE_INVALID = 0x7fffffff
     91} IEMXCPTRAISE;
     92/** Pointer to a IEMXCPTRAISE type. */
     93typedef IEMXCPTRAISE *PIEMXCPTRAISE;
     94/** @} */
    4095
    4196
     
    66121/** Generated by a DRx instruction breakpoint and RF should be cleared. */
    67122#define IEM_XCPT_FLAGS_DRx_INSTR_BP     RT_BIT_32(6)
     123/** Generated by the icebp instruction. */
     124#define IEM_XCPT_FLAGS_ICEBP_INSTR      RT_BIT_32(7)
     125/** Generated by the overflow instruction. */
     126#define IEM_XCPT_FLAGS_OF_INSTR         RT_BIT_32(8)
    68127/** @}  */
    69128
     
    139198VMM_INT_DECL(bool)          IEMGetCurrentXcpt(PVMCPU pVCpu, uint8_t *puVector, uint32_t *pfFlags, uint32_t *puErr,
    140199                                              uint64_t *puCr2);
     200VMM_INT_DECL(IEMXCPTRAISE)  IEMEvaluateRecursiveXcpt(PVMCPU pVCpu, uint32_t fPrevFlags, uint8_t uPrevVector, uint32_t fCurFlags,
     201                                                     uint8_t uCurVector, PIEMXCPTRAISEINFO pXcptRaiseInfo);
    141202
    142203/** @name Given Instruction Interpreters
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