VirtualBox

Changeset 53613 in vbox for trunk/src/VBox/VMM/VMMR0


Ignore:
Timestamp:
Dec 30, 2014 8:48:05 PM (10 years ago)
Author:
vboxsync
Message:

HMVMXR0.cpp: hmR0VmxCheckExitDueToEventDelivery returns error codes in at least three places, so the user need to check for more than just VINF_EM_RESET and VINF_EM_DOUBLE_FAULT. Also, check for positive result and then do return code massaging in RT_UNLIKELY branch, instead of multiple negative results checks.

File:
1 edited

Legend:

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

    r53612 r53613  
    99179917    /* If this VM-exit occurred while delivering an event through the guest IDT, handle it accordingly. */
    99189918    rc = hmR0VmxCheckExitDueToEventDelivery(pVCpu, pMixedCtx, pVmxTransient);
    9919     if (RT_UNLIKELY(rc == VINF_HM_DOUBLE_FAULT))
    9920     {
    9921         STAM_PROFILE_ADV_STOP(&pVCpu->hm.s.StatExitXcptNmi, y3);
    9922         return VINF_SUCCESS;
    9923     }
    9924     if (RT_UNLIKELY(rc == VINF_EM_RESET))
    9925     {
     9919    if (RT_UNLIKELY(rc != VINF_SUCCESS))
     9920    {
     9921        if (rc == VINF_HM_DOUBLE_FAULT)
     9922            rc = VINF_SUCCESS;
    99269923        STAM_PROFILE_ADV_STOP(&pVCpu->hm.s.StatExitXcptNmi, y3);
    99279924        return rc;
     
    1126511262    /* If this VM-exit occurred while delivering an event through the guest IDT, handle it accordingly. */
    1126611263    int rc = hmR0VmxCheckExitDueToEventDelivery(pVCpu, pMixedCtx, pVmxTransient);
    11267     if (RT_UNLIKELY(rc == VINF_HM_DOUBLE_FAULT))
    11268         return VINF_SUCCESS;
    11269     if (RT_UNLIKELY(rc == VINF_EM_RESET))
     11264    if (RT_UNLIKELY(rc != VINF_SUCCESS))
     11265    {
     11266        if (rc == VINF_HM_DOUBLE_FAULT)
     11267            rc = VINF_SUCCESS;
    1127011268        return rc;
     11269    }
    1127111270
    1127211271#if 0
     
    1143811437    /* If this VM-exit occurred while delivering an event through the guest IDT, handle it accordingly. */
    1143911438    int rc = hmR0VmxCheckExitDueToEventDelivery(pVCpu, pMixedCtx, pVmxTransient);
    11440     if (RT_UNLIKELY(rc == VINF_HM_DOUBLE_FAULT))
    11441         return VINF_SUCCESS;
    11442     if (RT_UNLIKELY(rc == VINF_EM_RESET))
     11439    if (RT_UNLIKELY(rc != VINF_SUCCESS))
     11440    {
     11441        if (rc == VINF_HM_DOUBLE_FAULT)
     11442            rc = VINF_SUCCESS;
    1144311443        return rc;
     11444    }
    1144411445
    1144511446    RTGCPHYS GCPhys = 0;
     
    1149311494    /* If this VM-exit occurred while delivering an event through the guest IDT, handle it accordingly. */
    1149411495    int rc = hmR0VmxCheckExitDueToEventDelivery(pVCpu, pMixedCtx, pVmxTransient);
    11495     if (RT_UNLIKELY(rc == VINF_HM_DOUBLE_FAULT))
    11496         return VINF_SUCCESS;
    11497     if (RT_UNLIKELY(rc == VINF_EM_RESET))
     11496    if (RT_UNLIKELY(rc != VINF_SUCCESS))
     11497    {
     11498        if (rc == VINF_HM_DOUBLE_FAULT)
     11499            rc = VINF_SUCCESS;
    1149811500        return rc;
     11501    }
    1149911502
    1150011503    RTGCPHYS GCPhys = 0;
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