VirtualBox

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


Ignore:
Timestamp:
Oct 23, 2017 10:51:34 AM (7 years ago)
Author:
vboxsync
Message:

VMM/HMSVMR0: If we don't program VINTR intercepts, we shouldn't get those VM-exits when running the nested-guest.

File:
1 edited

Legend:

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

    r69159 r69161  
    47664766            if (pVmcbNstGstCache->u64InterceptCtrl & SVM_CTRL_INTERCEPT_VINTR)
    47674767                HM_SVM_RET_VMEXIT_NESTED(pVCpu, uExitCode, uExitInfo1, uExitInfo2);
    4768             return hmR0SvmNestedExitVIntr(pVCpu, pCtx, pSvmTransient);
     4768            return hmR0SvmExitUnexpected(pVCpu, pCtx, pSvmTransient);
    47694769        }
    47704770
     
    73647364}
    73657365
     7366
    73667367/**
    73677368 * Nested-guest \#VMEXIT handler for IRET (SVM_EXIT_VMRUN). Conditional \#VMEXIT.
     
    73817382    return VINF_SUCCESS;
    73827383}
    7383 
    7384 
    7385 /**
    7386  * \#VMEXIT handler for virtual interrupt (SVM_EXIT_VINTR). Conditional
    7387  * \#VMEXIT.
    7388  */
    7389 HMSVM_EXIT_DECL hmR0SvmNestedExitVIntr(PVMCPU pVCpu, PCPUMCTX pCtx, PSVMTRANSIENT pSvmTransient)
    7390 {
    7391     HMSVM_VALIDATE_EXIT_HANDLER_PARAMS();
    7392 
    7393     /* No virtual interrupts pending, we'll inject the current one/NMI before reentry. */
    7394     PSVMVMCB pVmcbNstGst = pCtx->hwvirt.svm.CTX_SUFF(pVmcb);
    7395     pVmcbNstGst->ctrl.IntCtrl.n.u1VIrqPending = 0;
    7396     pVmcbNstGst->ctrl.IntCtrl.n.u8VIntrVector = 0;
    7397 
    7398     /* Indicate that we no longer need to #VMEXIT when the nested-guest is ready to receive interrupts/NMIs, it is now ready. */
    7399     pVmcbNstGst->ctrl.u64InterceptCtrl &= ~SVM_CTRL_INTERCEPT_VINTR;
    7400     pVmcbNstGst->ctrl.u64VmcbCleanBits &= ~(HMSVM_VMCB_CLEAN_INTERCEPTS | HMSVM_VMCB_CLEAN_TPR);
    7401 
    7402     /* Deliver the pending interrupt/NMI via hmR0SvmEvaluatePendingEventNested() and resume guest execution. */
    7403     STAM_COUNTER_INC(&pVCpu->hm.s.StatExitIntWindow);
    7404     return VINF_SUCCESS;
    7405 }
    7406 
    74077384#endif /* VBOX_WITH_NESTED_HWVIRT */
    74087385
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