VirtualBox

Changeset 74539 in vbox for trunk/include/VBox


Ignore:
Timestamp:
Oct 1, 2018 4:09:23 AM (6 years ago)
Author:
vboxsync
Message:

VMM/IEM: Nested VMX: bugref:9180 VM-exit bits; RDTSC, RDTSCP intercepts.

File:
1 edited

Legend:

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

    r74491 r74539  
    18751875
    18761876/**
    1877  * Checks whether the given Pin-based VM-execution controls are set.
     1877 * Checks whether the given Pin-based VM-execution controls are set when executing a
     1878 * nested-guest.
    18781879 *
    18791880 * @returns @c true if set, @c false otherwise.
     
    18811882 * @param   pCtx        Pointer to the context.
    18821883 * @param   uPinCtl     The Pin-based VM-execution controls to check.
     1884 *
     1885 * @remarks This does not check if all given controls are set if more than one
     1886 *          control is passed in @a uPinCtl.
    18831887 */
    18841888DECLINLINE(bool) CPUMIsGuestVmxPinCtlsSet(PVMCPU pVCpu, PCCPUMCTX pCtx, uint32_t uPinCtl)
     
    18871891    if (pCtx->hwvirt.enmHwvirt != CPUMHWVIRT_VMX)
    18881892        return false;
    1889     Assert(pCtx->hwvirt.vmx.fInVmxNonRootMode);
     1893    if (!pCtx->hwvirt.vmx.fInVmxNonRootMode)
     1894        return false;
    18901895    Assert(pCtx->hwvirt.vmx.CTX_SUFF(pVmcs));
    18911896    return RT_BOOL(pCtx->hwvirt.vmx.CTX_SUFF(pVmcs)->u32PinCtls & uPinCtl);
     
    18931898
    18941899/**
    1895  * Checks whether the given Processor-based VM-execution controls are set.
     1900 * Checks whether the given Processor-based VM-execution controls are set when
     1901 * executing a nested-guest.
    18961902 *
    18971903 * @returns @c true if set, @c false otherwise.
    18981904 * @param   pVCpu       The cross context virtual CPU structure of the calling EMT.
    18991905 * @param   pCtx        Pointer to the context.
    1900  * @param   uPinCtl     The Processor-based VM-execution controls to check.
    1901  */
    1902 DECLINLINE(bool) CPUMIsGuestVmxProcCtlsSet(PVMCPU pVCpu, PCCPUMCTX pCtx, uint32_t uProcCtls)
     1906 * @param   uProcCtl    The Processor-based VM-execution controls to check.
     1907 *
     1908 * @remarks This does not check if all given controls are set if more than one
     1909 *          control is passed in @a uProcCtls.
     1910 */
     1911DECLINLINE(bool) CPUMIsGuestVmxProcCtlsSet(PVMCPU pVCpu, PCCPUMCTX pCtx, uint32_t uProcCtl)
    19031912{
    19041913    RT_NOREF(pVCpu);
    19051914    if (pCtx->hwvirt.enmHwvirt != CPUMHWVIRT_VMX)
    19061915        return false;
    1907     Assert(pCtx->hwvirt.vmx.fInVmxNonRootMode);
     1916    if (!pCtx->hwvirt.vmx.fInVmxNonRootMode)
     1917        return false;
    19081918    Assert(pCtx->hwvirt.vmx.CTX_SUFF(pVmcs));
    1909     return RT_BOOL(pCtx->hwvirt.vmx.CTX_SUFF(pVmcs)->u32ProcCtls & uProcCtls);
    1910 }
    1911 
    1912 /**
    1913  * Checks whether the given Secondary Processor-based VM-execution controls are set.
     1919    return RT_BOOL(pCtx->hwvirt.vmx.CTX_SUFF(pVmcs)->u32ProcCtls & uProcCtl);
     1920}
     1921
     1922/**
     1923 * Checks whether the given Secondary Processor-based VM-execution controls are set
     1924 * when executing a nested-guest.
    19141925 *
    19151926 * @returns @c true if set, @c false otherwise.
    19161927 * @param   pVCpu       The cross context virtual CPU structure of the calling EMT.
    19171928 * @param   pCtx        Pointer to the context.
    1918  * @param   uPinCtl     The Secondary Processor-based VM-execution controls to
     1929 * @param   uProcCtl2   The Secondary Processor-based VM-execution controls to
    19191930 *                      check.
    1920  */
    1921 DECLINLINE(bool) CPUMIsGuestVmxProcCtls2Set(PVMCPU pVCpu, PCCPUMCTX pCtx, uint32_t uProcCtls2)
     1931 *
     1932 * @remarks This does not check if all given controls are set if more than one
     1933 *          control is passed in @a uProcCtl2.
     1934 *
     1935 */
     1936DECLINLINE(bool) CPUMIsGuestVmxProcCtls2Set(PVMCPU pVCpu, PCCPUMCTX pCtx, uint32_t uProcCtl2)
    19221937{
    19231938    RT_NOREF(pVCpu);
    19241939    if (pCtx->hwvirt.enmHwvirt != CPUMHWVIRT_VMX)
    19251940        return false;
    1926     Assert(pCtx->hwvirt.vmx.fInVmxNonRootMode);
     1941    if (!pCtx->hwvirt.vmx.fInVmxNonRootMode)
     1942        return false;
    19271943    Assert(pCtx->hwvirt.vmx.CTX_SUFF(pVmcs));
    1928     return RT_BOOL(pCtx->hwvirt.vmx.CTX_SUFF(pVmcs)->u32ProcCtls2 & uProcCtls2);
     1944    return RT_BOOL(pCtx->hwvirt.vmx.CTX_SUFF(pVmcs)->u32ProcCtls2 & uProcCtl2);
    19291945}
    19301946
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