VirtualBox

Ignore:
Timestamp:
Oct 9, 2018 8:06:48 AM (6 years ago)
Author:
vboxsync
Message:

VMM/IEM: Nested VMX: bugref:9180 VM-exit bits; Raise #UD for XSAVE/XRSTOR in VMX non-root mode when it isn't supported. We don't support
XSAVE/XRSTOR exiting yet.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMAll/IEMAllCImpl.cpp.h

    r74699 r74702  
    79927992     * Raise exceptions.
    79937993     */
     7994    /* When in VMX non-root mode and XSAVE/XRSTOR is not enabled, it results in #UD. */
     7995    if (    IEM_VMX_IS_NON_ROOT_MODE(pVCpu)
     7996        && !IEM_VMX_IS_PROCCTLS2_SET(pVCpu, VMX_PROC_CTLS2_XSAVES_XRSTORS))
     7997    {
     7998        Log(("xrstor: Not enabled for nested-guest execution -> #UD\n"));
     7999        return iemRaiseUndefinedOpcode(pVCpu);
     8000    }
    79948001    if (!(pVCpu->cpum.GstCtx.cr4 & X86_CR4_OSXSAVE))
    79958002        return iemRaiseUndefinedOpcode(pVCpu);
     
    80088015
    80098016    /*
    8010      * Calc the requested mask
     8017     * Calc the requested mask.
    80118018     */
    80128019    uint64_t const fReqComponents = RT_MAKE_U64(pVCpu->cpum.GstCtx.eax, pVCpu->cpum.GstCtx.edx) & pVCpu->cpum.GstCtx.aXcr[0];
     
    81488155     * Raise exceptions.
    81498156     */
     8157    /* When in VMX non-root mode and XSAVE/XRSTOR is not enabled, it results in #UD. */
     8158    if (    IEM_VMX_IS_NON_ROOT_MODE(pVCpu)
     8159        && !IEM_VMX_IS_PROCCTLS2_SET(pVCpu, VMX_PROC_CTLS2_XSAVES_XRSTORS))
     8160    {
     8161        Log(("xrstor: Not enabled for nested-guest execution -> #UD\n"));
     8162        return iemRaiseUndefinedOpcode(pVCpu);
     8163    }
    81508164    if (!(pVCpu->cpum.GstCtx.cr4 & X86_CR4_OSXSAVE))
    81518165        return iemRaiseUndefinedOpcode(pVCpu);
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