VirtualBox

Changeset 99814 in vbox for trunk


Ignore:
Timestamp:
May 16, 2023 4:32:30 PM (20 months ago)
Author:
vboxsync
Message:

IEM: Added a separate CPU flag to enable VEX decoding to allow BMI1/2 to be enabled without AVX (see bugref:5653).

Location:
trunk
Files:
3 edited

Legend:

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

    r99648 r99814  
    916916    uint32_t        fLeakyFxSR : 1;
    917917
     918    /** Supports VEX instruction encoding (AVX, BMI, etc.). */
     919    uint32_t        fVex : 1;
     920
    918921    /** AMD64: Supports AMD SVM. */
    919922    uint32_t        fSvm : 1;
     
    945948    /** Alignment padding / reserved for future use (96 bits total, plus 12 bytes
    946949     *  prior to the bit fields -> total of 24 bytes) */
    947     uint32_t        fPadding0 : 24;
     950    uint32_t        fPadding0 : 23;
    948951
    949952
  • trunk/src/VBox/VMM/VMMAll/CPUMAllCpuId.cpp

    r99023 r99814  
    15991599                                          pFeatures->fXSaveRstor = 0);
    16001600        }
     1601
     1602        /*
     1603         * Enable or disable VEX support depending on whether it's needed. Note that AVX,
     1604         * BMI1, and BMI2 all use VEX encoding but are theoretically independent of each other.
     1605         */
     1606        pFeatures->fVex = pFeatures->fAvx | pFeatures->fBmi1 | pFeatures->fBmi2;
    16011607    }
    16021608    else
  • trunk/src/VBox/VMM/VMMAll/IEMAllInstructionsOneByte.cpp.h

    r99685 r99814  
    71677167    {
    71687168        IEMOP_MNEMONIC(vex3_prefix, "vex3");
    7169         if (IEM_GET_GUEST_CPU_FEATURES(pVCpu)->fAvx)
     7169        if (IEM_GET_GUEST_CPU_FEATURES(pVCpu)->fVex)
    71707170        {
    71717171            /* Note! The real mode, v8086 mode and invalid prefix checks are done once
     
    72147214            }
    72157215        }
    7216         Log(("VEX3: AVX support disabled!\n"));
     7216        Log(("VEX3: VEX support disabled!\n"));
    72177217        return IEMOP_RAISE_INVALID_OPCODE();
    72187218    }
     
    72397239    {
    72407240        IEMOP_MNEMONIC(vex2_prefix, "vex2");
    7241         if (IEM_GET_GUEST_CPU_FEATURES(pVCpu)->fAvx)
     7241        if (IEM_GET_GUEST_CPU_FEATURES(pVCpu)->fVex)
    72427242        {
    72437243            /* Note! The real mode, v8086 mode and invalid prefix checks are done once
     
    72597259
    72607260        /** @todo does intel completely decode the sequence with SIB/disp before \#UD? */
    7261         Log(("VEX2: AVX support disabled!\n"));
     7261        Log(("VEX2: VEX support disabled!\n"));
    72627262        return IEMOP_RAISE_INVALID_OPCODE();
    72637263    }
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