VirtualBox

Changeset 85419 in vbox for trunk/include


Ignore:
Timestamp:
Jul 22, 2020 4:55:04 PM (5 years ago)
Author:
vboxsync
Message:

include/iprt/x86.h,VMM/CPUMR3CpuId: Work around a bug in some Linux kernel versions causing a NULL pointer exception when trying to configure SSBD in a single vCPU VM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/x86.h

    r83328 r85419  
    633633/** EDX Bit 29 - ARCHCAP - Supports the IA32_ARCH_CAPABILITIES MSR. */
    634634#define X86_CPUID_STEXT_FEATURE_EDX_ARCHCAP           RT_BIT_32(29)
     635/** EDX Bit 31 - SSBD - Supports the SSBD flag in IA32_SPEC_CTRL. */
     636#define X86_CPUID_STEXT_FEATURE_EDX_SSBD              RT_BIT_32(31)
    635637
    636638/** @} */
     
    783785 */
    784786/** Bit 0 - CLZERO - Clear zero instruction. */
    785 #define X86_CPUID_AMD_EFEID_EBX_CLZERO       RT_BIT_32(0)
     787#define X86_CPUID_AMD_EFEID_EBX_CLZERO                      RT_BIT_32(0)
    786788/** Bit 1 - IRPerf - Instructions retired count support. */
    787 #define X86_CPUID_AMD_EFEID_EBX_IRPERF       RT_BIT_32(1)
     789#define X86_CPUID_AMD_EFEID_EBX_IRPERF                      RT_BIT_32(1)
    788790/** Bit 2 - XSaveErPtr - Always XSAVE* and XRSTR* error pointers. */
    789 #define X86_CPUID_AMD_EFEID_EBX_XSAVE_ER_PTR RT_BIT_32(2)
     791#define X86_CPUID_AMD_EFEID_EBX_XSAVE_ER_PTR                RT_BIT_32(2)
    790792/** Bit 4 - RDPRU - Supports the RDPRU instruction. */
    791 #define X86_CPUID_AMD_EFEID_EBX_RDPRU        RT_BIT_32(4)
     793#define X86_CPUID_AMD_EFEID_EBX_RDPRU                       RT_BIT_32(4)
    792794/** Bit 8 - MCOMMIT - Supports the MCOMMIT instruction. */
    793 #define X86_CPUID_AMD_EFEID_EBX_MCOMMIT      RT_BIT_32(8)
     795#define X86_CPUID_AMD_EFEID_EBX_MCOMMIT                     RT_BIT_32(8)
    794796/* AMD pipeline length: 9 feature bits ;-) */
    795797/** Bit 12 - IBPB - Supports the IBPB command in IA32_PRED_CMD. */
    796 #define X86_CPUID_AMD_EFEID_EBX_IBPB         RT_BIT_32(12)
     798#define X86_CPUID_AMD_EFEID_EBX_IBPB                        RT_BIT_32(12)
     799/** Bit 14 - IBRS - Supports the IBRS bit in IA32_SPEC_CTRL. */
     800#define X86_CPUID_AMD_EFEID_EBX_IBRS                        RT_BIT_32(14)
     801/** Bit 15 - STIBP - Supports the STIBP bit in IA32_SPEC_CTRL. */
     802#define X86_CPUID_AMD_EFEID_EBX_STIBP                       RT_BIT_32(15)
     803/** Bit 16 - IBRS always on mode - IBRS should be set once during boot only. */
     804#define X86_CPUID_AMD_EFEID_EBX_IBRS_ALWAYS_ON              RT_BIT_32(16)
     805/** Bit 17 - STIBP always on mode - STIBP should be set once during boot only. */
     806#define X86_CPUID_AMD_EFEID_EBX_STIBP_ALWAYS_ON             RT_BIT_32(17)
     807/** Bit 18 - IBRS preferred - IBRS is preferred over software mitigations. */
     808#define X86_CPUID_AMD_EFEID_EBX_IBRS_PREFERRED              RT_BIT_32(18)
     809/** Bit 24 - Speculative Store Bypass Disable supported in SPEC_CTL. */
     810#define X86_CPUID_AMD_EFEID_EBX_SPEC_CTRL_SSBD              RT_BIT_32(24)
     811/** Bit 25 - Speculative Store Bypass Disable supported in VIRT_SPEC_CTL. */
     812#define X86_CPUID_AMD_EFEID_EBX_VIRT_SPEC_CTRL_SSBD         RT_BIT_32(25)
     813/** Bit 26 - Speculative Store Bypass Disable not required. */
     814#define X86_CPUID_AMD_EFEID_EBX_NO_SSBD_REQUIRED            RT_BIT_32(26)
    797815/** @} */
    798816
     
    12131231/** STIBP - Single thread indirect branch predictors. */
    12141232#define MSR_IA32_SPEC_CTRL_F_STIBP          RT_BIT_32(1)
     1233/** SSBD - Speculative Store Bypass Disable. */
     1234#define MSR_IA32_SPEC_CTRL_F_SSBD           RT_BIT_32(2)
    12151235
    12161236/** Prediction command register.
     
    18381858#define MSR_K8_VM_HSAVE_PA                  UINT32_C(0xc0010117)
    18391859
     1860/** Virtualized speculation control for AMD processors.
     1861 *
     1862 * Unified interface among different CPU generations.
     1863 * The VMM will set any architectural MSRs based on the CPU.
     1864 * See "White Paper: AMD64 Technology Speculative Store Bypass Disable 5.21.18"
     1865 * (12441_AMD64_SpeculativeStoreBypassDisable_Whitepaper_final.pdf) */
     1866#define MSR_AMD_VIRT_SPEC_CTL               UINT32_C(0xc001011f)
     1867/** Speculative Store Bypass Disable. */
     1868# define MSR_AMD_VIRT_SPEC_CTL_F_SSBD       RT_BIT(2)
     1869
    18401870/** @} */
    18411871
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