VirtualBox

Changeset 58918 in vbox


Ignore:
Timestamp:
Nov 30, 2015 12:55:40 AM (9 years ago)
Author:
vboxsync
Message:

HM: More VBOXSTRICTRC and related stuff.

File:
1 edited

Legend:

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

    r58917 r58918  
    56125612 * IDT.
    56135613 *
    5614  * @returns VBox status code (informational error codes included).
    5615  * @retval VINF_SUCCESS if we should continue handling the VM-exit.
    5616  * @retval VINF_HM_DOUBLE_FAULT if a \#DF condition was detected and we ought to
    5617  *         continue execution of the guest which will delivery the \#DF.
    5618  * @retval VINF_EM_RESET if we detected a triple-fault condition.
    5619  * @retval VERR_EM_GUEST_CPU_HANG if we detected a guest CPU hang.
     5614 * @returns Strict VBox status code (informational error codes included).
     5615 * @retval  VINF_SUCCESS if we should continue handling the VM-exit.
     5616 * @retval  VINF_HM_DOUBLE_FAULT if a \#DF condition was detected and we ought
     5617 *          to continue execution of the guest which will delivery the \#DF.
     5618 * @retval  VINF_EM_RESET if we detected a triple-fault condition.
     5619 * @retval  VERR_EM_GUEST_CPU_HANG if we detected a guest CPU hang.
    56205620 *
    56215621 * @param   pVCpu           The cross context virtual CPU structure.
     
    56275627 * @remarks No-long-jump zone!!!
    56285628 */
    5629 static int hmR0VmxCheckExitDueToEventDelivery(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient)
     5629static VBOXSTRICTRC hmR0VmxCheckExitDueToEventDelivery(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient)
    56305630{
    56315631    uint32_t uExitVector = VMX_EXIT_INTERRUPTION_INFO_VECTOR(pVmxTransient->uExitIntInfo);
    56325632
    5633     int rc = hmR0VmxReadIdtVectoringInfoVmcs(pVmxTransient);
    5634     AssertRCReturn(rc, rc);
    5635     rc = hmR0VmxReadExitIntInfoVmcs(pVmxTransient);
    5636     AssertRCReturn(rc, rc);
    5637 
     5633    int rc2 = hmR0VmxReadIdtVectoringInfoVmcs(pVmxTransient);
     5634    AssertRCReturn(rc2, rc2);
     5635    rc2 = hmR0VmxReadExitIntInfoVmcs(pVmxTransient);
     5636    AssertRCReturn(rc2, rc2);
     5637
     5638    VBOXSTRICTRC rcStrict = VINF_SUCCESS;
    56385639    if (VMX_IDT_VECTORING_INFO_VALID(pVmxTransient->uIdtVectoringInfo))
    56395640    {
     
    57405741                if (VMX_IDT_VECTORING_INFO_ERROR_CODE_IS_VALID(pVmxTransient->uIdtVectoringInfo))
    57415742                {
    5742                     rc = hmR0VmxReadIdtVectoringErrorCodeVmcs(pVmxTransient);
    5743                     AssertRCReturn(rc, rc);
     5743                    rc2 = hmR0VmxReadIdtVectoringErrorCodeVmcs(pVmxTransient);
     5744                    AssertRCReturn(rc2, rc2);
    57445745                    u32ErrCode = pVmxTransient->uIdtVectoringErrorCode;
    57455746                }
     
    57485749                hmR0VmxSetPendingEvent(pVCpu, VMX_ENTRY_INT_INFO_FROM_EXIT_IDT_INFO(pVmxTransient->uIdtVectoringInfo),
    57495750                                       0 /* cbInstr */,  u32ErrCode, pMixedCtx->cr2);
    5750                 rc = VINF_SUCCESS;
     5751                rcStrict = VINF_SUCCESS;
    57515752                Log4(("IDT: vcpu[%RU32] Pending vectoring event %#RX64 Err=%#RX32\n", pVCpu->idCpu,
    57525753                      pVCpu->hm.s.Event.u64IntInfo, pVCpu->hm.s.Event.u32ErrCode));
     
    57585759            {
    57595760                hmR0VmxSetPendingXcptDF(pVCpu, pMixedCtx);
    5760                 rc = VINF_HM_DOUBLE_FAULT;
     5761                rcStrict = VINF_HM_DOUBLE_FAULT;
    57615762                Log4(("IDT: vcpu[%RU32] Pending vectoring #DF %#RX64 uIdtVector=%#x uExitVector=%#x\n", pVCpu->idCpu,
    57625763                      pVCpu->hm.s.Event.u64IntInfo, uIdtVector, uExitVector));
     
    57675768            case VMXREFLECTXCPT_TF:
    57685769            {
    5769                 rc = VINF_EM_RESET;
     5770                rcStrict = VINF_EM_RESET;
    57705771                Log4(("IDT: vcpu[%RU32] Pending vectoring triple-fault uIdt=%#x uExit=%#x\n", pVCpu->idCpu, uIdtVector,
    57715772                      uExitVector));
     
    57755776            case VMXREFLECTXCPT_HANG:
    57765777            {
    5777                 rc = VERR_EM_GUEST_CPU_HANG;
     5778                rcStrict = VERR_EM_GUEST_CPU_HANG;
    57785779                break;
    57795780            }
    57805781
    57815782            default:
    5782                 Assert(rc == VINF_SUCCESS);
     5783                Assert(rcStrict == VINF_SUCCESS);
    57835784                break;
    57845785        }
     
    58025803    }
    58035804
    5804     Assert(rc == VINF_SUCCESS || rc == VINF_HM_DOUBLE_FAULT || rc == VINF_EM_RESET || rc == VERR_EM_GUEST_CPU_HANG);
    5805     return rc;
     5805    Assert(   rcStrict == VINF_SUCCESS  || rcStrict == VINF_HM_DOUBLE_FAULT
     5806           || rcStrict == VINF_EM_RESET || rcStrict == VERR_EM_GUEST_CPU_HANG);
     5807    return rcStrict;
    58065808}
    58075809
     
    75797581 * Injects a double-fault (\#DF) exception into the VM.
    75807582 *
    7581  * @returns VBox status code (informational status code included).
     7583 * @returns Strict VBox status code (informational status code included).
    75827584 * @param   pVCpu           The cross context virtual CPU structure.
    75837585 * @param   pMixedCtx       Pointer to the guest-CPU context. The data may be
     
    76417643 * Injects a general-protection (\#GP) fault into the VM.
    76427644 *
    7643  * @returns VBox status code (informational status code included).
     7645 * @returns Strict VBox status code (informational status code included).
    76447646 * @param   pVCpu               The cross context virtual CPU structure.
    76457647 * @param   pMixedCtx           Pointer to the guest-CPU context. The data may be
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