Skip to contentSkip to conversation

i386: pass CLZERO to guests with EPYC CPU model on AMD ZEN platform

PATCH In review Ani Sinha 1 participant 2 messages Dec 4, 2019 – Dec 16, 2019

lore
Share & tools
lore

Ani Sinha

author
#0 lore raw

PATCH 1/1 i386: pass CLZERO to guests with EPYC CPU model on AMD ZEN platform

CLZERO CPUID should be passed on to the guests that use EPYC or EPYC-IBPB CPU model when the AMD ZEN based host supports it. This change makes it recognize this CPUID for guests which use EPYC or EPYC-IBPB CPU model.

---
 target/i386/cpu.c | 2 ++
 1 file changed, 2 insertions(+)
target/i386/cpu.c +2 -0
index 69f518a..55f0691 100644
@@ -3813,6 +3813,8 @@ static X86CPUDefinition builtin_x86_defs[] = {
             CPUID_EXT3_MISALIGNSSE | CPUID_EXT3_SSE4A | CPUID_EXT3_ABM |
             CPUID_EXT3_CR8LEG | CPUID_EXT3_SVM | CPUID_EXT3_LAHF_LM |
             CPUID_EXT3_TOPOEXT,
+        .features[FEAT_8000_0008_EBX] =
+            CPUID_8000_0008_EBX_CLZERO,
         .features[FEAT_7_0_EBX] =
             CPUID_7_0_EBX_FSGSBASE | CPUID_7_0_EBX_BMI1 | CPUID_7_0_EBX_AVX2 |
             CPUID_7_0_EBX_SMEP | CPUID_7_0_EBX_BMI2 | CPUID_7_0_EBX_RDSEED |
Signature · 1 line
1.9.4
author
#1 lore raw

Hi :

Can I get some love for this patch?

thanks
ani

On Dec 4, 2019, 3:06 PM +0530, Ani Sinha <[email protected]>, wrote:
CLZERO CPUID should be passed on to the guests that use EPYC or EPYC-IBPB CPU model when the AMD ZEN based host supports it. This change makes it recognize this CPUID for guests which use EPYC or EPYC-IBPB CPU model.

---
target/i386/cpu.c | 2 ++

1 file changed, 2 insertions(+)
target/i386/cpu.c +0 -0
index 69f518a..55f0691 100644
@@ -3813,6 +3813,8 @@ static X86CPUDefinition builtin_x86_defs[] = {

CPUID_EXT3_MISALIGNSSE | CPUID_EXT3_SSE4A | CPUID_EXT3_ABM | CPUID_EXT3_CR8LEG | CPUID_EXT3_SVM | CPUID_EXT3_LAHF_LM | CPUID_EXT3_TOPOEXT,
+ .features[FEAT_8000_0008_EBX] =
+ CPUID_8000_0008_EBX_CLZERO,
.features[FEAT_7_0_EBX] =
CPUID_7_0_EBX_FSGSBASE | CPUID_7_0_EBX_BMI1 | CPUID_7_0_EBX_AVX2 | CPUID_7_0_EBX_SMEP | CPUID_7_0_EBX_BMI2 | CPUID_7_0_EBX_RDSEED | --
1.9.4