VirtualBox

Changeset 56873 in vbox for trunk/src/VBox/VMM


Ignore:
Timestamp:
Jul 8, 2015 3:31:28 PM (10 years ago)
Author:
vboxsync
Message:

CPUMR3CpuId.cpp: Don't expose AVX and AVX-2 if the YMM XSAVE state component can't be exposed to the guest.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR3/CPUMR3CpuId.cpp

    r56094 r56873  
    37183718                            && pVM->cpum.s.HostFeatures.fXSaveRstor
    37193719                            && pVM->cpum.s.HostFeatures.fOpSysXSaveRstor;
     3720    uint64_t const fXStateHostMask = pVM->cpum.s.fXStateHostMask;
    37203721
    37213722    /** @cfgm{/CPUM/IsaExts/XSAVE, boolean, depends}
     
    37353736     */
    37363737    rc = cpumR3CpuIdReadIsaExtCfgEx(pVM, pIsaExts, "AVX", &pConfig->enmAvx, fNestedPagingAndFullGuestExec,
    3737                                     fMayHaveXSave && pConfig->enmXSave /*fAllowed*/);
     3738                                    fMayHaveXSave && pConfig->enmXSave && (fXStateHostMask & XSAVE_C_YMM)  /*fAllowed*/);
    37383739    AssertLogRelRCReturn(rc, rc);
    37393740
     
    37443745     */
    37453746    rc = cpumR3CpuIdReadIsaExtCfgEx(pVM, pIsaExts, "AVX2", &pConfig->enmAvx2, fNestedPagingAndFullGuestExec,
    3746                                     fMayHaveXSave && pConfig->enmXSave /*fAllowed*/);
     3747                                    fMayHaveXSave && pConfig->enmXSave && (fXStateHostMask & XSAVE_C_YMM) /*fAllowed*/);
    37473748    AssertLogRelRCReturn(rc, rc);
    37483749
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