VirtualBox

Changeset 46707 in vbox


Ignore:
Timestamp:
Jun 20, 2013 12:45:41 PM (11 years ago)
Author:
vboxsync
Message:

VMM/HMVMXR0: Fix guru with re-injecting software interrupts during event delivery for EPT violation exits (non-exception exits).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR0/HMVMXR0.cpp

    r46665 r46707  
    47944794                    && uExitVector == X86_XCPT_PF)
    47954795                {
    4796                     Log4(("IDT: Contributory #PF uCR2=%#RX64\n", pMixedCtx->cr2));
     4796                    Log4(("IDT: vcpu[%RU32] Contributory #PF uCR2=%#RX64\n", pVCpu->idCpu, pMixedCtx->cr2));
    47974797                }
    47984798#endif
     
    48014801                {
    48024802                    pVmxTransient->fVectoringPF = true;
    4803                     Log4(("IDT: Vectoring #PF uCR2=%#RX64\n", pMixedCtx->cr2));
     4803                    Log4(("IDT: vcpu[%RU32] Vectoring #PF uCR2=%#RX64\n", pVCpu->idCpu, pMixedCtx->cr2));
    48044804                }
    48054805                else if (   (pVCpu->hm.s.vmx.u32XcptBitmap & HMVMX_CONTRIBUTORY_XCPT_MASK)
     
    48134813                    enmReflect = VMXREFLECTXCPT_TF;
    48144814            }
    4815             else if (   uIntType != VMX_IDT_VECTORING_INFO_TYPE_SW_INT
    4816                      && uIntType != VMX_IDT_VECTORING_INFO_TYPE_SW_XCPT
    4817                      && uIntType != VMX_IDT_VECTORING_INFO_TYPE_PRIV_SW_XCPT)
     4815            else if (   uIntType == VMX_IDT_VECTORING_INFO_TYPE_HW_XCPT
     4816                     || uIntType == VMX_IDT_VECTORING_INFO_TYPE_EXT_INT
     4817                     || uIntType == VMX_IDT_VECTORING_INFO_TYPE_NMI)
    48184818            {
    48194819                /*
     
    48314831             * original exception to the guest after handling the VM-exit.
    48324832             */
    4833             enmReflect = VMXREFLECTXCPT_XCPT;
     4833            if (   uIntType == VMX_IDT_VECTORING_INFO_TYPE_HW_XCPT
     4834                || uIntType == VMX_IDT_VECTORING_INFO_TYPE_EXT_INT
     4835                || uIntType == VMX_IDT_VECTORING_INFO_TYPE_NMI)
     4836            {
     4837                enmReflect = VMXREFLECTXCPT_XCPT;
     4838            }
    48344839        }
    48354840
     
    48384843            case VMXREFLECTXCPT_XCPT:
    48394844            {
     4845                Assert(   uIntType != VMX_IDT_VECTORING_INFO_TYPE_SW_INT
     4846                       && uIntType != VMX_IDT_VECTORING_INFO_TYPE_SW_XCPT
     4847                       && uIntType != VMX_IDT_VECTORING_INFO_TYPE_PRIV_SW_XCPT);
     4848
    48404849                uint32_t u32ErrCode = 0;
    48414850                if (VMX_IDT_VECTORING_INFO_ERROR_CODE_IS_VALID(pVCpu->hm.s.Event.u64IntrInfo))
     
    48504859                                       0 /* cbInstr */,  u32ErrCode, pMixedCtx->cr2);
    48514860                rc = VINF_SUCCESS;
    4852                 Log4(("IDT: Pending vectoring event %#RX64 Err=%#RX32\n", pVCpu->hm.s.Event.u64IntrInfo,
    4853                       pVCpu->hm.s.Event.u32ErrCode));
     4861                Log4(("IDT: vcpu[%RU32] Pending vectoring event %#RX64 Err=%#RX32\n", pVCpu->idCpu,
     4862                      pVCpu->hm.s.Event.u64IntrInfo, pVCpu->hm.s.Event.u32ErrCode));
    48544863                break;
    48554864            }
     
    48594868                hmR0VmxSetPendingXcptDF(pVCpu, pMixedCtx);
    48604869                rc = VINF_HM_DOUBLE_FAULT;
    4861                 Log4(("IDT: Pending vectoring #DF %#RX64 uIdtVector=%#x uExitVector=%#x\n", pVCpu->hm.s.Event.u64IntrInfo,
    4862                       uIdtVector, uExitVector));
     4870                Log4(("IDT: vcpu[%RU32] Pending vectoring #DF %#RX64 uIdtVector=%#x uExitVector=%#x\n", pVCpu->idCpu,
     4871                      pVCpu->hm.s.Event.u64IntrInfo, uIdtVector, uExitVector));
    48634872                break;
    48644873            }
     
    48674876            {
    48684877                rc = VINF_EM_RESET;
    4869                 Log4(("IDT: Pending vectoring triple-fault uIdt=%#x uExit=%#x\n", uIdtVector, uExitVector));
     4878                Log4(("IDT: vcpu[%RU32] Pending vectoring triple-fault uIdt=%#x uExit=%#x\n", pVCpu->idCpu, uIdtVector,
     4879                      uExitVector));
    48704880                break;
    48714881            }
     
    60836093        if (fInject)
    60846094        {
    6085             Log4(("Injecting pending event\n"));
     6095            Log4(("Injecting pending event vcpu[%RU32]\n", pVCpu->idCpu));
    60866096            rc = hmR0VmxInjectEventVmcs(pVCpu, pMixedCtx, pVCpu->hm.s.Event.u64IntrInfo, pVCpu->hm.s.Event.cbInstr,
    60876097                                        pVCpu->hm.s.Event.u32ErrCode, pVCpu->hm.s.Event.GCPtrFaultAddress, &uIntrState);
     
    64946504    }
    64956505
    6496     Log4(("Injecting u32IntrInfo=%#x u32ErrCode=%#x cbInstr=%#x pMixedCtx->uCR2=%#RX64\n", u32IntrInfo, u32ErrCode, cbInstr,
    6497           pMixedCtx->cr2));
     6506    Log4(("Injecting vcpu[%RU32] u32IntrInfo=%#x u32ErrCode=%#x cbInstr=%#x pMixedCtx->uCR2=%#RX64\n", pVCpu->idCpu,
     6507          u32IntrInfo, u32ErrCode, cbInstr, pMixedCtx->cr2));
    64986508
    64996509    AssertRCReturn(rc, rc);
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