VirtualBox

Changeset 74632 in vbox for trunk/include/VBox/vmm


Ignore:
Timestamp:
Oct 6, 2018 3:14:32 AM (6 years ago)
Author:
vboxsync
Message:

VMM/IEM: Nested VMX: bugref:9180 Let the caller check for VMX non-root mode and free-up the intercept functions to check
only the intercepts. Allows code to check non-root mode once in different places if a lot of intercepts need to be checked.

File:
1 edited

Legend:

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

    r74539 r74632  
    18891889{
    18901890    RT_NOREF(pVCpu);
    1891     if (pCtx->hwvirt.enmHwvirt != CPUMHWVIRT_VMX)
    1892         return false;
    1893     if (!pCtx->hwvirt.vmx.fInVmxNonRootMode)
    1894         return false;
     1891    Assert(pCtx->hwvirt.enmHwvirt == CPUMHWVIRT_VMX);
     1892    Assert(pCtx->hwvirt.vmx.fInVmxNonRootMode);
    18951893    Assert(pCtx->hwvirt.vmx.CTX_SUFF(pVmcs));
    18961894    return RT_BOOL(pCtx->hwvirt.vmx.CTX_SUFF(pVmcs)->u32PinCtls & uPinCtl);
     
    19121910{
    19131911    RT_NOREF(pVCpu);
    1914     if (pCtx->hwvirt.enmHwvirt != CPUMHWVIRT_VMX)
    1915         return false;
    1916     if (!pCtx->hwvirt.vmx.fInVmxNonRootMode)
    1917         return false;
     1912    Assert(pCtx->hwvirt.enmHwvirt == CPUMHWVIRT_VMX);
     1913    Assert(pCtx->hwvirt.vmx.fInVmxNonRootMode);
    19181914    Assert(pCtx->hwvirt.vmx.CTX_SUFF(pVmcs));
    19191915    return RT_BOOL(pCtx->hwvirt.vmx.CTX_SUFF(pVmcs)->u32ProcCtls & uProcCtl);
     
    19371933{
    19381934    RT_NOREF(pVCpu);
    1939     if (pCtx->hwvirt.enmHwvirt != CPUMHWVIRT_VMX)
    1940         return false;
    1941     if (!pCtx->hwvirt.vmx.fInVmxNonRootMode)
    1942         return false;
     1935    Assert(pCtx->hwvirt.enmHwvirt == CPUMHWVIRT_VMX);
     1936    Assert(pCtx->hwvirt.vmx.fInVmxNonRootMode);
    19431937    Assert(pCtx->hwvirt.vmx.CTX_SUFF(pVmcs));
    19441938    return RT_BOOL(pCtx->hwvirt.vmx.CTX_SUFF(pVmcs)->u32ProcCtls2 & uProcCtl2);
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