VirtualBox

Changeset 44096 in vbox


Ignore:
Timestamp:
Dec 11, 2012 3:01:52 PM (12 years ago)
Author:
vboxsync
Message:

VMM/VMMR0: naming.

Location:
trunk
Files:
2 edited

Legend:

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

    r43947 r44096  
    10161016 * @{
    10171017 */
    1018 #define VMX_EXIT_INTERRUPTION_INFO_TYPE_EXT             0
     1018#define VMX_EXIT_INTERRUPTION_INFO_TYPE_EXT_INT         0
    10191019#define VMX_EXIT_INTERRUPTION_INFO_TYPE_NMI             2
    1020 #define VMX_EXIT_INTERRUPTION_INFO_TYPE_HWEXCPT         3
    1021 #define VMX_EXIT_INTERRUPTION_INFO_TYPE_SW              4 /**< int xx */
    1022 #define VMX_EXIT_INTERRUPTION_INFO_TYPE_DBEXCPT         5 /**< Why are we getting this one?? */
    1023 #define VMX_EXIT_INTERRUPTION_INFO_TYPE_SWEXCPT         6
     1020#define VMX_EXIT_INTERRUPTION_INFO_TYPE_HW_XCPT         3
     1021#define VMX_EXIT_INTERRUPTION_INFO_TYPE_SW_INT          4 /**< int xx */
     1022#define VMX_EXIT_INTERRUPTION_INFO_TYPE_DB_XCPT         5 /**< Why are we getting this one?? */
     1023#define VMX_EXIT_INTERRUPTION_INFO_TYPE_SW_XCPT         6
    10241024/** @} */
    10251025
     
    11051105#define VMX_VMCS_RO_IO_RDI                                      0x6406
    11061106#define VMX_VMCS_RO_IO_RIP                                      0x6408
    1107 #define VMX_VMCS_EXIT_GUEST_LINEAR_ADDR                         0x640A
     1107#define VMX_VMCS_RO_EXIT_GUEST_LINEAR_ADDR                      0x640A
    11081108/** @} */
    11091109
     
    11761176/** Task switch caused by an interrupt gate. */
    11771177#define VMX_EXIT_QUALIFICATION_TASK_SWITCH_TYPE_IDT     3
    1178 
    11791178/** @} */
    11801179
  • trunk/src/VBox/VMM/VMMR0/HWVMXR0.cpp

    r44089 r44096  
    884884    {
    885885        LogFlow(("INJ-EI: %x at %RGv\n", iGate, (RTGCPTR)pCtx->rip));
    886         Assert(   VMX_EXIT_INTERRUPTION_INFO_TYPE(intInfo) == VMX_EXIT_INTERRUPTION_INFO_TYPE_SW
     886        Assert(   VMX_EXIT_INTERRUPTION_INFO_TYPE(intInfo) == VMX_EXIT_INTERRUPTION_INFO_TYPE_SW_INT
    887887               || !VMCPU_FF_ISSET(pVCpu, VMCPU_FF_INHIBIT_INTERRUPTS));
    888         Assert(   VMX_EXIT_INTERRUPTION_INFO_TYPE(intInfo) == VMX_EXIT_INTERRUPTION_INFO_TYPE_SW
     888        Assert(   VMX_EXIT_INTERRUPTION_INFO_TYPE(intInfo) == VMX_EXIT_INTERRUPTION_INFO_TYPE_SW_INT
    889889               || pCtx->eflags.u32 & X86_EFL_IF);
    890890    }
     
    920920                intInfo2 |= (1 << VMX_EXIT_INTERRUPTION_INFO_VALID_SHIFT);
    921921                intInfo2 |= VMX_EXIT_INTERRUPTION_INFO_ERROR_CODE_VALID;
    922                 intInfo2 |= (VMX_EXIT_INTERRUPTION_INFO_TYPE_HWEXCPT << VMX_EXIT_INTERRUPTION_INFO_TYPE_SHIFT);
     922                intInfo2 |= (VMX_EXIT_INTERRUPTION_INFO_TYPE_HW_XCPT << VMX_EXIT_INTERRUPTION_INFO_TYPE_SHIFT);
    923923
    924924                return hmR0VmxInjectEvent(pVM, pVCpu, pCtx, intInfo2, 0, 0 /* no error code according to the Intel docs */);
     
    927927            return VINF_EM_RESET;
    928928        }
    929         if (    VMX_EXIT_INTERRUPTION_INFO_TYPE(intInfo) == VMX_EXIT_INTERRUPTION_INFO_TYPE_SW
     929        if (    VMX_EXIT_INTERRUPTION_INFO_TYPE(intInfo) == VMX_EXIT_INTERRUPTION_INFO_TYPE_SW_INT
    930930            ||  iGate == 3 /* Both #BP and #OF point to the instruction after. */
    931931            ||  iGate == 4)
     
    11341134                || u8Vector == X86_XCPT_OF)
    11351135            {
    1136                 intInfo |= (VMX_EXIT_INTERRUPTION_INFO_TYPE_SWEXCPT << VMX_EXIT_INTERRUPTION_INFO_TYPE_SHIFT);
     1136                intInfo |= (VMX_EXIT_INTERRUPTION_INFO_TYPE_SW_XCPT << VMX_EXIT_INTERRUPTION_INFO_TYPE_SHIFT);
    11371137            }
    11381138            else
    1139                 intInfo |= (VMX_EXIT_INTERRUPTION_INFO_TYPE_HWEXCPT << VMX_EXIT_INTERRUPTION_INFO_TYPE_SHIFT);
     1139                intInfo |= (VMX_EXIT_INTERRUPTION_INFO_TYPE_HW_XCPT << VMX_EXIT_INTERRUPTION_INFO_TYPE_SHIFT);
    11401140        }
    11411141        else
    1142             intInfo |= (VMX_EXIT_INTERRUPTION_INFO_TYPE_EXT << VMX_EXIT_INTERRUPTION_INFO_TYPE_SHIFT);
     1142            intInfo |= (VMX_EXIT_INTERRUPTION_INFO_TYPE_EXT_INT << VMX_EXIT_INTERRUPTION_INFO_TYPE_SHIFT);
    11431143
    11441144        STAM_COUNTER_INC(&pVCpu->hm.s.StatIntInject);
     
    11731173        switch (VMX_EXIT_INTERRUPTION_INFO_TYPE(pVCpu->hm.s.Event.u64IntrInfo))
    11741174        {
    1175         case VMX_EXIT_INTERRUPTION_INFO_TYPE_EXT:
     1175        case VMX_EXIT_INTERRUPTION_INFO_TYPE_EXT_INT:
    11761176        case VMX_EXIT_INTERRUPTION_INFO_TYPE_NMI:
    11771177            enmTrapType = TRPM_HARDWARE_INT;
    11781178            break;
    1179         case VMX_EXIT_INTERRUPTION_INFO_TYPE_SW:
    1180         case VMX_EXIT_INTERRUPTION_INFO_TYPE_SWEXCPT:
    1181         case VMX_EXIT_INTERRUPTION_INFO_TYPE_DBEXCPT:
     1179        case VMX_EXIT_INTERRUPTION_INFO_TYPE_SW_INT:
     1180        case VMX_EXIT_INTERRUPTION_INFO_TYPE_SW_XCPT:
     1181        case VMX_EXIT_INTERRUPTION_INFO_TYPE_DB_XCPT:
    11821182            enmTrapType = TRPM_SOFTWARE_INT;
    11831183            break;
    1184         case VMX_EXIT_INTERRUPTION_INFO_TYPE_HWEXCPT:
     1184        case VMX_EXIT_INTERRUPTION_INFO_TYPE_HW_XCPT:
    11851185            enmTrapType = TRPM_TRAP;
    11861186            break;
     
    33353335    if (    VMX_EXIT_INTERRUPTION_INFO_VALID(pVCpu->hm.s.Event.u64IntrInfo)
    33363336        /* Ignore 'int xx' as they'll be restarted anyway. */
    3337         &&  VMX_EXIT_INTERRUPTION_INFO_TYPE(pVCpu->hm.s.Event.u64IntrInfo) != VMX_EXIT_INTERRUPTION_INFO_TYPE_SW
     3337        &&  VMX_EXIT_INTERRUPTION_INFO_TYPE(pVCpu->hm.s.Event.u64IntrInfo) != VMX_EXIT_INTERRUPTION_INFO_TYPE_SW_INT
    33383338        /* Ignore software exceptions (such as int3) as they'll reoccur when we restart the instruction anyway. */
    3339         &&  VMX_EXIT_INTERRUPTION_INFO_TYPE(pVCpu->hm.s.Event.u64IntrInfo) != VMX_EXIT_INTERRUPTION_INFO_TYPE_SWEXCPT)
     3339        &&  VMX_EXIT_INTERRUPTION_INFO_TYPE(pVCpu->hm.s.Event.u64IntrInfo) != VMX_EXIT_INTERRUPTION_INFO_TYPE_SW_XCPT)
    33403340    {
    33413341        Assert(!pVCpu->hm.s.Event.fPending);
     
    33603360    else if (   VMX_EXIT_INTERRUPTION_INFO_VALID(pVCpu->hm.s.Event.u64IntrInfo)
    33613361                /* Ignore software exceptions (such as int3) as they're reoccur when we restart the instruction anyway. */
    3362              && VMX_EXIT_INTERRUPTION_INFO_TYPE(pVCpu->hm.s.Event.u64IntrInfo) == VMX_EXIT_INTERRUPTION_INFO_TYPE_SWEXCPT)
     3362             && VMX_EXIT_INTERRUPTION_INFO_TYPE(pVCpu->hm.s.Event.u64IntrInfo) == VMX_EXIT_INTERRUPTION_INFO_TYPE_SW_XCPT)
    33633363    {
    33643364        Log(("Ignore pending inject %RX64 at %RGv exit=%08x intInfo=%08x exitQualification=%RGv\n",
     
    34113411        switch (VMX_EXIT_INTERRUPTION_INFO_TYPE(intInfo))
    34123412        {
    3413         case VMX_EXIT_INTERRUPTION_INFO_TYPE_NMI:   /* Non-maskable interrupt. */
     3413        case VMX_EXIT_INTERRUPTION_INFO_TYPE_NMI:       /* Non-maskable interrupt. */
    34143414            /* External interrupt; leave to allow it to be dispatched again. */
    34153415            rc = VINF_EM_RAW_INTERRUPT;
    34163416            break;
    34173417
    3418         case VMX_EXIT_INTERRUPTION_INFO_TYPE_EXT:   /* External hardware interrupt. */
     3418        case VMX_EXIT_INTERRUPTION_INFO_TYPE_EXT_INT:   /* External hardware interrupt. */
    34193419            AssertFailed(); /* can't come here; fails the first check. */
    34203420            break;
    34213421
    3422         case VMX_EXIT_INTERRUPTION_INFO_TYPE_DBEXCPT:   /* Unknown why we get this type for #DB */
    3423         case VMX_EXIT_INTERRUPTION_INFO_TYPE_SWEXCPT:   /* Software exception. (#BP or #OF) */
     3422        case VMX_EXIT_INTERRUPTION_INFO_TYPE_DB_XCPT:   /* Unknown why we get this type for #DB */
     3423        case VMX_EXIT_INTERRUPTION_INFO_TYPE_SW_XCPT:   /* Software exception. (#BP or #OF) */
    34243424            Assert(vector == 1 || vector == 3 || vector == 4);
    34253425            /* no break */
    3426         case VMX_EXIT_INTERRUPTION_INFO_TYPE_HWEXCPT:   /* Hardware exception. */
     3426        case VMX_EXIT_INTERRUPTION_INFO_TYPE_HW_XCPT:   /* Hardware exception. */
    34273427            Log2(("Hardware/software interrupt %d\n", vector));
    34283428            switch (vector)
     
    38703870                            intInfo2  = pDis->Param1.uValue & 0xff;
    38713871                            intInfo2 |= (1 << VMX_EXIT_INTERRUPTION_INFO_VALID_SHIFT);
    3872                             intInfo2 |= (VMX_EXIT_INTERRUPTION_INFO_TYPE_SW << VMX_EXIT_INTERRUPTION_INFO_TYPE_SHIFT);
     3872                            intInfo2 |= (VMX_EXIT_INTERRUPTION_INFO_TYPE_SW_INT << VMX_EXIT_INTERRUPTION_INFO_TYPE_SHIFT);
    38733873
    38743874                            rc = hmR0VmxInjectEvent(pVM, pVCpu, pCtx, intInfo2, cbOp, 0);
     
    38883888                                intInfo2  = X86_XCPT_OF;
    38893889                                intInfo2 |= (1 << VMX_EXIT_INTERRUPTION_INFO_VALID_SHIFT);
    3890                                 intInfo2 |= (VMX_EXIT_INTERRUPTION_INFO_TYPE_SW << VMX_EXIT_INTERRUPTION_INFO_TYPE_SHIFT);
     3890                                intInfo2 |= (VMX_EXIT_INTERRUPTION_INFO_TYPE_SW_INT << VMX_EXIT_INTERRUPTION_INFO_TYPE_SHIFT);
    38913891
    38923892                                rc = hmR0VmxInjectEvent(pVM, pVCpu, pCtx, intInfo2, cbOp, 0);
     
    39053905                            intInfo2  = 3;
    39063906                            intInfo2 |= (1 << VMX_EXIT_INTERRUPTION_INFO_VALID_SHIFT);
    3907                             intInfo2 |= (VMX_EXIT_INTERRUPTION_INFO_TYPE_SW << VMX_EXIT_INTERRUPTION_INFO_TYPE_SHIFT);
     3907                            intInfo2 |= (VMX_EXIT_INTERRUPTION_INFO_TYPE_SW_INT << VMX_EXIT_INTERRUPTION_INFO_TYPE_SHIFT);
    39083908
    39093909                            rc = hmR0VmxInjectEvent(pVM, pVCpu, pCtx, intInfo2, cbOp, 0);
     
    44834483
    44844484            /* Disassemble manually to deal with segment prefixes. */
    4485             /** @todo VMX_VMCS_EXIT_GUEST_LINEAR_ADDR contains the flat pointer operand of the instruction. */
     4485            /** @todo VMX_VMCS_RO_EXIT_GUEST_LINEAR_ADDR contains the flat pointer
     4486             *        operand of the instruction. */
    44864487            /** @todo VMX_VMCS32_RO_EXIT_INSTR_INFO also contains segment prefix info. */
    44874488            rc2 = EMInterpretDisasCurrent(pVM, pVCpu, pDis, NULL);
     
    45894590                            intInfo  = X86_XCPT_DB;
    45904591                            intInfo |= (1 << VMX_EXIT_INTERRUPTION_INFO_VALID_SHIFT);
    4591                             intInfo |= (VMX_EXIT_INTERRUPTION_INFO_TYPE_HWEXCPT << VMX_EXIT_INTERRUPTION_INFO_TYPE_SHIFT);
     4592                            intInfo |= (VMX_EXIT_INTERRUPTION_INFO_TYPE_HW_XCPT << VMX_EXIT_INTERRUPTION_INFO_TYPE_SHIFT);
    45924593
    45934594                            Log(("Inject IO debug trap at %RGv\n", (RTGCPTR)pCtx->rip));
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