VirtualBox

Changeset 71640 in vbox for trunk/include


Ignore:
Timestamp:
Apr 4, 2018 6:30:54 AM (7 years ago)
Author:
vboxsync
Message:

VMM: Nested hw.virt: Abstract SVM V_INTR_MASKING so we can refer to the original VMCB value rather than a potentially modified
value while executing the nested-guest in hardware-assisted SVM.

Location:
trunk/include/VBox/vmm
Files:
2 edited

Legend:

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

    r71108 r71640  
    14681468 *
    14691469 * @returns @c true if in intercept is active, @c false otherwise.
    1470  * @param   pVCpu   The cross context virtual CPU structure of the calling EMT.
     1470 * @param   pVCpu       The cross context virtual CPU structure of the calling EMT.
    14711471 * @param   pCtx        Pointer to the context.
    14721472 * @param   uVector     The exception / interrupt vector.
     
    14831483}
    14841484
     1485
     1486/**
     1487 * Checks if the guest VMCB has virtual-interrupt masking enabled.
     1488 *
     1489 * @returns @c true if virtual-interrupts are masked, @c false otherwise.
     1490 * @param   pVCpu       The cross context virtual CPU structure of the calling EMT.
     1491 * @param   pCtx        Pointer to the context.
     1492 *
     1493 * @remarks Should only be called when SVM feature is exposed to the guest.
     1494 */
     1495DECLINLINE(bool) CPUMIsGuestSvmVirtIntrMasking(PVMCPU pVCpu, PCCPUMCTX pCtx)
     1496{
     1497    PCSVMVMCB pVmcb = pCtx->hwvirt.svm.CTX_SUFF(pVmcb);
     1498    Assert(pVmcb);
     1499    if (!pCtx->hwvirt.svm.fHMCachedVmcb)
     1500    {
     1501        PCSVMVMCBCTRL pVmcbCtrl = &pCtx->hwvirt.svm.CTX_SUFF(pVmcb)->ctrl;
     1502        return pVmcbCtrl->IntCtrl.n.u1VIntrMasking;
     1503    }
     1504    return HMIsGuestSvmVirtIntrMasking(pVCpu, pCtx);
     1505}
     1506
     1507
    14851508/**
    14861509 * Updates the NextRIP (NRIP) field in the nested-guest VMCB.
     
    14891512 * @param   pCtx        Pointer to the context.
    14901513 * @param   cbInstr     The length of the current instruction in bytes.
     1514 *
     1515 * @remarks Should only be called when SVM feature is exposed to the guest.
    14911516 */
    14921517DECLINLINE(void) CPUMGuestSvmUpdateNRip(PVMCPU pVCpu, PCCPUMCTX pCtx, uint8_t cbInstr)
  • trunk/include/VBox/vmm/hm_svm.h

    r71415 r71640  
    11371137VMM_INT_DECL(bool) HMIsGuestSvmWriteDRxInterceptSet(PVMCPU pVCpu, PCCPUMCTX pCtx, uint8_t uDr);
    11381138VMM_INT_DECL(bool) HMIsGuestSvmXcptInterceptSet(PVMCPU pVCpu, PCCPUMCTX pCtx, uint8_t uVector);
     1139VMM_INT_DECL(bool) HMIsGuestSvmVirtIntrMasking(PVMCPU pVCpu, PCCPUMCTX pCtx);
    11391140VMM_INT_DECL(bool) HMCanSvmNstGstTakePhysIntr(PVMCPU pVCpu, PCCPUMCTX pCtx);
    11401141VMM_INT_DECL(bool) HMCanSvmNstGstTakeVirtIntr(PVMCPU pVCpu, PCCPUMCTX pCtx);
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