VirtualBox

Changeset 70654 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Jan 20, 2018 7:02:32 AM (7 years ago)
Author:
vboxsync
Message:

VMM/CPUM: Mask out INVPCID in addition to PCID when FSGSBASE is not present.

File:
1 edited

Legend:

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

    r70612 r70654  
    26962696                           ;
    26972697
    2698     /* Mask out the PCID unless FSGSBASE is exposed due to a bug in Windows 10 SMP guests, see @bugref{9089#c15}. */
     2698    /* Mask out PCID unless FSGSBASE is exposed due to a bug in Windows 10 SMP guests, see @bugref{9089#c15}. */
    26992699    if (   !pVM->cpum.s.GuestFeatures.fFsGsBase
    27002700        && (pStdFeatureLeaf->uEcx & X86_CPUID_FEATURE_ECX_PCID))
     
    31483148                pCurLeaf->uEdx &= 0; /** @todo X86_CPUID_STEXT_FEATURE_EDX_IBRS_IBPB, X86_CPUID_STEXT_FEATURE_EDX_STIBP and X86_CPUID_STEXT_FEATURE_EDX_ARCHCAP */
    31493149
     3150                /* Mask out INVPCID unless FSGSBASE is exposed due to a bug in Windows 10 SMP guests, see @bugref{9089#c15}. */
     3151                if (  !pVM->cpum.s.GuestFeatures.fFsGsBase
     3152                   && (pCurLeaf->uEbx & X86_CPUID_STEXT_FEATURE_EBX_INVPCID))
     3153                {
     3154                    pCurLeaf->uEbx &= ~X86_CPUID_STEXT_FEATURE_EBX_INVPCID;
     3155                    LogRel(("CPUM: Disabled INVPCID without FSGSBASE to workaround buggy guests\n"));
     3156                }
     3157
    31503158                if (pCpum->u8PortableCpuIdLevel > 0)
    31513159                {
     
    40934101     * Whether to expose the PCID feature to the guest.
    40944102     */
    4095     rc = cpumR3CpuIdReadIsaExtCfg(pVM, pIsaExts, "PCID", &pConfig->enmPcid, true);
     4103    rc = cpumR3CpuIdReadIsaExtCfg(pVM, pIsaExts, "PCID", &pConfig->enmPcid, pConfig->enmFsGsBase);
    40964104    AssertLogRelRCReturn(rc, rc);
    40974105
     
    40994107     * Whether to expose the INVPCID instruction to the guest.
    41004108     */
    4101     rc = cpumR3CpuIdReadIsaExtCfg(pVM, pIsaExts, "INVPCID", &pConfig->enmInvpcid, true);
     4109    rc = cpumR3CpuIdReadIsaExtCfg(pVM, pIsaExts, "INVPCID", &pConfig->enmInvpcid, pConfig->enmFsGsBase);
    41024110    AssertLogRelRCReturn(rc, rc);
    41034111
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