Skip to contentSkip to conversation

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

PATCH In review Ani Sinha 4 participants 16 messages Dec 18, 2019 – Feb 6, 2020

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
#1 lore raw
Quoted 15 lines · Ani Sinha

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

target/i386/cpu.c static X86CPUDefinition builtin_x86_defs[] = { · line 3820

Quoted 8 lines
target/i386/cpu.c +2 -0
@@ -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 |

This needs to be done only for newer machine type (or is it CPU model versions now? need Eduardo to respond).

Paolo

#2 lore raw
Quoted 4 lines · Paolo Bonzini
Quoted 3 lines · Ani Sinha

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.

Can you clarify what's the intended use case here? Why the "if host supports it" conditional?

If you need host-dependent CPU configuration, "-cpu host" (or the libvirt "host-model" mode) is the most appropriate solution.

Quoted 15 lines
Quoted 15 lines
---
 target/i386/cpu.c | 2 ++
 1 file changed, 2 insertions(+)
target/i386/cpu.c +1 -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] =
Quoted 8 lines

target/i386/cpu.c static X86CPUDefinition builtin_x86_defs[] = { · line 3820

Quoted 5 lines
target/i386/cpu.c +1 -0
+            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 |

This needs to be done only for newer machine type (or is it CPU model versions now? need Eduardo to respond).

If we want to add it, it has to be done as a new CPU model version.

But I don't know yet if we want to add it. Do all EPYC CPUs have CLZERO available? If not, it's probably not advisable to add it to EPYC (even if it's just on EPYC-v3).

Signature · 1 line
Eduardo
author
#3 lore raw

Sorry Eduardo, it took a little while for me to get to this thread again.

Quoted 10 lines · Eduardo Habkost
Quoted 4 lines · Paolo Bonzini
Quoted 3 lines · Ani Sinha

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.

Can you clarify what's the intended use case here? Why the "if host supports it" conditional?

Looking at https://www.amd.com/system/files/TechDocs/24594.pdf , it says :

"The CLZERO instruction is supported if the feature flag CPUID Fn8000_0008_EBX[CLZERO] is set.”

This I interpreted to mean that not all AMD Zen architectures supports it. So when the host does support it, this CPUID should be passed on to the guest as well.

Quoted 3 lines

If you need host-dependent CPU configuration, "-cpu host" (or the libvirt "host-model" mode) is the most appropriate solution.

Yes that is an option but we are going to use EPYC-IBPB model for now.

Quoted 25 lines
Quoted 16 lines
Quoted 16 lines

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

1 file changed, 2 insertions(+)
target/i386/cpu.c +1 -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] =
Quoted 8 lines

target/i386/cpu.c static X86CPUDefinition builtin_x86_defs[] = { · line 3820

Quoted 5 lines
target/i386/cpu.c +1 -0
+            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 |

This needs to be done only for newer machine type (or is it CPU model versions now? need Eduardo to respond).

Quoted 1 line

If we want to add it, it has to be done as a new CPU model version.

I see what you mean.

Quoted 4 lines

But I don't know yet if we want to add it. Do all EPYC CPUs have CLZERO available? If not, it's probably not advisable to add it to EPYC (even if it's just on EPYC-v3).

Ok so I think we need to get this clarified from AMD if all their EPYC platforms supports this CPUID or not. Is there any contact point within AMD where we can get this information?

For our use case, I just verified that even without this patch, if we pass CLZERO through libvirt CPU definition xml, like " <feature policy='require' name='clzero’/>”, it gets passed on to the guest. So this patch is not super critical for us.

Thanks,
Ani

Quoted 3 lines
Signature · 2 lines
-- 
Eduardo
#4 lore raw

Hi,

Sorry for the delayed reply. I was away from work for the whole month of January.

Quoted 13 lines · Ani Sinha

Sorry Eduardo, it took a little while for me to get to this thread again.

Quoted 10 lines · Eduardo Habkost
Quoted 4 lines · Paolo Bonzini
Quoted 3 lines · Ani Sinha

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.

Can you clarify what's the intended use case here? Why the "if host supports it" conditional?

Quoted 7 lines

Looking at https://www.amd.com/system/files/TechDocs/24594.pdf , it says :

"The CLZERO instruction is supported if the feature flag CPUID Fn8000_0008_EBX[CLZERO] is set.”

This I interpreted to mean that not all AMD Zen architectures supports it. So when the host does support it, this CPUID should be passed on to the guest as well.

This is not a supported use case of named CPU models. Named CPU models should expose the same guest ABI on all hosts. This means CPUID should be the same on all hosts if using the same CPU model (and same machine type).

If you need features to be automatically enabled/disabled depending on host capabilities, I advise you to use "-cpu host" or libvirt's mode=host-model.

Quoted 39 lines
Quoted 5 lines

If you need host-dependent CPU configuration, "-cpu host" (or the libvirt "host-model" mode) is the most appropriate solution.

Yes that is an option but we are going to use EPYC-IBPB model for now.

Quoted 25 lines
Quoted 16 lines
Quoted 16 lines

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

1 file changed, 2 insertions(+)
target/i386/cpu.c +1 -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] =
Quoted 8 lines

target/i386/cpu.c static X86CPUDefinition builtin_x86_defs[] = { · line 3820

Quoted 5 lines
target/i386/cpu.c +1 -0
+            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 |

This needs to be done only for newer machine type (or is it CPU model versions now? need Eduardo to respond).

Quoted 1 line

If we want to add it, it has to be done as a new CPU model version.

I see what you mean.

Quoted 1 line
Quoted 7 lines
Quoted 3 lines

But I don't know yet if we want to add it. Do all EPYC CPUs have CLZERO available? If not, it's probably not advisable to add it to EPYC (even if it's just on EPYC-v3).

Ok so I think we need to get this clarified from AMD if all their EPYC platforms supports this CPUID or not. Is there any contact point within AMD where we can get this information?

I'm CCing Brijesh Singh and Babu Moger, who works on the EPYC CPU model recently.

Quoted 5 lines

For our use case, I just verified that even without this patch, if we pass CLZERO through libvirt CPU definition xml, like " <feature policy='require' name='clzero’/>”, it gets passed on to the guest. So this patch is not super critical for us.

Note that this is done automatically by libvirt if using mode=host-model.

Signature · 1 line
Eduardo
#5 lore raw

[AMD Official Use Only - Internal Distribution Only]

Quoted 103 lines

-----Original Message-----
From: Eduardo Habkost <[email protected]>
Sent: Wednesday, February 5, 2020 4:38 PM
To: Ani Sinha <[email protected]>
Cc: Paolo Bonzini <[email protected]>; [email protected]; qemu- [email protected]; Singh, Brijesh <[email protected]>; Moger, Babu <[email protected]>
Subject: Re: [PATCH] i386: pass CLZERO to guests with EPYC CPU model on AMD ZEN platform

Hi,

Sorry for the delayed reply. I was away from work for the whole month of January.

Quoted 3 lines · Ani Sinha

Sorry Eduardo, it took a little while for me to get to this thread again.

Quoted 1 line

On Dec 18, 2019, at 8:41 PM, Eduardo Habkost <[email protected]>

Quoted 4 lines · wrote:
Quoted 4 lines · Paolo Bonzini
Quoted 2 lines · Ani Sinha
Quoted 1 line

CLZERO CPUID should be passed on to the guests that use EPYC or

EPYC-IBPB CPU

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

model when the AMD ZEN based host supports it. This change makes it

recognize

Quoted 6 lines
Quoted 4 lines
Quoted 1 line
Quoted 1 line

this CPUID for guests which use EPYC or EPYC-IBPB CPU model.

Can you clarify what's the intended use case here? Why the "if host supports it" conditional?

Looking at

https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fww
w.amd.com%2Fsystem%2Ffiles%2FTechDocs%2F24594.pdf&amp;data=02%7 C01%7Cbabu.moger%40amd.com%7C4d00819020cb4892d50608d7aa8c016b% 7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637165391335697450 &amp;sdata=3%2FFGZeeZoz387eeayAbjQJj9qGhemgw0xC0byr%2F0YJk%3D &amp;reserved=0 , it says :

Quoted 2 lines

"The CLZERO instruction is supported if the feature flag CPUID

Fn8000_0008_EBX[CLZERO] is set.”

Quoted 4 lines

This I interpreted to mean that not all AMD Zen architectures supports it. So when the host does support it, this CPUID should be passed on to the guest as well.

This is not a supported use case of named CPU models. Named CPU models should expose the same guest ABI on all hosts. This means CPUID should be the same on all hosts if using the same CPU model (and same machine type).

If you need features to be automatically enabled/disabled depending on host capabilities, I advise you to use "-cpu host" or libvirt's mode=host-model.

Quoted 16 lines
Quoted 5 lines

If you need host-dependent CPU configuration, "-cpu host" (or the libvirt "host-model" mode) is the most appropriate solution.

Yes that is an option but we are going to use EPYC-IBPB model for now.

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines

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

1 file changed, 2 insertions(+)
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

target/i386/cpu.c static X86CPUDefinition builtin_x86_defs[] = { · line 3813

Quoted 6 lines
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 |

Quoted 1 line
Quoted 1 line
Quoted 1 line

target/i386/cpu.c static X86CPUDefinition builtin_x86_defs[] = { · line 3814

Quoted 1 line
target/i386/cpu.c +0 -0
            CPUID_EXT3_CR8LEG | CPUID_EXT3_SVM |

CPUID_EXT3_LAHF_LM |

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines

target/i386/cpu.c static X86CPUDefinition builtin_x86_defs[] = {

Quoted 5 lines
target/i386/cpu.c +2 -0
            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 |

Quoted 1 line
Quoted 1 line
Quoted 1 line

target/i386/cpu.c static X86CPUDefinition builtin_x86_defs[] = { · line 3820

Quoted 1 line
target/i386/cpu.c +0 -0
            CPUID_7_0_EBX_SMEP | CPUID_7_0_EBX_BMI2 |

CPUID_7_0_EBX_RDSEED |

Quoted 14 lines
Quoted 6 lines
Quoted 4 lines
Quoted 1 line

This needs to be done only for newer machine type (or is it CPU model versions now? need Eduardo to respond).

If we want to add it, it has to be done as a new CPU model version.

I see what you mean.

Quoted 4 lines

But I don't know yet if we want to add it. Do all EPYC CPUs have CLZERO available? If not, it's probably not advisable to add it to EPYC (even if it's just on EPYC-v3).

Quoted 6 lines
Quoted 3 lines

Ok so I think we need to get this clarified from AMD if all their EPYC platforms supports this CPUID or not. Is there any contact point within AMD where we can get this information?

I'm CCing Brijesh Singh and Babu Moger, who works on the EPYC CPU model recently.

Ani, I am already working on it.

Eduardo, I am still waiting for your feedback on this series.
https://lore.kernel.org/qemu-devel/[email protected]/

I have added all the missing feature bits for EPYC models(as EPYC-v3) and also added EPYC-Rome model.

Quoted 12 lines
Quoted 6 lines

For our use case, I just verified that even without this patch, if we pass CLZERO through libvirt CPU definition xml, like " <feature policy='require' name='clzero’/>”, it gets passed on to the guest. So this patch is not super critical for us.

Note that this is done automatically by libvirt if using mode=host-model.

--
Eduardo

#8 lore raw
Quoted 8 lines · Ani Sinha
Quoted 8 lines · Ani Sinha
Quoted 5 lines · Babu
Quoted 7 lines
Quoted 5 lines
Quoted 1 line

Ani, I am already working on it.

Wow, I see a whole new AMD-Rome CPU model with it’s own cache info data :

https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flore.kernel.org%2Fqemu-devel%2F157314966312.23828.17684821666338093910.stgit%40naples-babu.amd.com%2F&amp;data=02%7C01%7CBabu.Moger%40amd.com%7Cc566dc5cf3cc407b5ee608d7aac8d9bc%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637165651955089264&amp;sdata=tlafWD6m5%2BZ12cqd4vqJcWh0%2FIgly%2FPVMgAbjxK5Mog%3D&amp;reserved=0

Do you think the ROME specific guest cpu cache data will have significant impact on performance?

I have not done performance benchmarks myself. Yes. Rome is expected to perform better than its previous generations.

#9 lore raw
Quoted 13 lines · Babu Moger
Quoted 10 lines · Ani Sinha
Quoted 10 lines · Ani Sinha
Quoted 6 lines · Babu

Ani, I am already working on it.

Quoted 8 lines
Quoted 5 lines
Quoted 3 lines

Wow, I see a whole new AMD-Rome CPU model with it’s own cache info data :

https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flore.kernel.org%2Fqemu-devel%2F157314966312.23828.17684821666338093910.stgit%40naples-babu.amd.com%2F&amp;data=02%7C01%7CBabu.Moger%40amd.com%7Cc566dc5cf3cc407b5ee608d7aac8d9bc%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637165651955089264&amp;sdata=tlafWD6m5%2BZ12cqd4vqJcWh0%2FIgly%2FPVMgAbjxK5Mog%3D&amp;reserved=0

Do you think the ROME specific guest cpu cache data will have significant impact on performance?

I have not done performance benchmarks myself. Yes. Rome is expected to perform better than its previous generations.

Note that virtual cache information on CPUID doesn't affect host software or hardware behavior in any way. In the exceptional cases it affects performance, it's solely because guest software behavior changed depending on the cache information it sees.

Signature · 1 line
Eduardo
#10 lore raw
In reply to Moger, Babu
Quoted 1 line · Babu

[AMD Official Use Only - Internal Distribution Only]

Considering that this was posted to qemu-devel, I'm assuming this notice was added by accident.

Quoted 1 line

[...]

Quoted 5 lines

Eduardo, I am still waiting for your feedback on this series.
https://lore.kernel.org/qemu-devel/[email protected]/

I have added all the missing feature bits for EPYC models(as EPYC-v3) and also added EPYC-Rome model.

I'm still catching up on email and my review queue, but this is on my list. Sorry for the long delay!

Signature · 1 line
Eduardo
#11 lore raw
Quoted 5 lines · Eduardo Habkost
Quoted 1 line · Babu

[AMD Official Use Only - Internal Distribution Only]

Considering that this was posted to qemu-devel, I'm assuming this notice was added by accident.

Yes. I noticed that after sending out the email. Please ignore that line.

author
#12 lore raw
In reply to Paolo Bonzini

Ping …

Quoted 31 lines · Paolo Bonzini
Quoted 15 lines · Ani Sinha

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

target/i386/cpu.c static X86CPUDefinition builtin_x86_defs[] = { · line 3820

Quoted 8 lines
target/i386/cpu.c +2 -0
@@ -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 |

This needs to be done only for newer machine type (or is it CPU model versions now? need Eduardo to respond).

Paolo

#13 lore raw

Il dom 22 dic 2019, 08:49 Ani Sinha <[email protected]> ha scritto:

Quoted 3 lines

Ping …

Why ping? You got questions from Eduardo, so you need to answer them and/or send a fixed version of the patch.

Thanks,

Paolo

Quoted 37 lines
Quoted 4 lines · Paolo Bonzini
Quoted 1 line · Ani Sinha

CLZERO CPUID should be passed on to the guests that use EPYC or

EPYC-IBPB CPU

Quoted 1 line
Quoted 1 line

model when the AMD ZEN based host supports it. This change makes it

recognize

Quoted 7 lines
Quoted 7 lines

this CPUID for guests which use EPYC or EPYC-IBPB CPU model.

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

1 file changed, 2 insertions(+)
Quoted 12 lines

target/i386/cpu.c static X86CPUDefinition builtin_x86_defs[] = { · line 3819

Quoted 12 lines
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 |

Quoted 1 line

target/i386/cpu.c static X86CPUDefinition builtin_x86_defs[] = { · line 3820

Quoted 1 line
target/i386/cpu.c +0 -0
            CPUID_7_0_EBX_SMEP | CPUID_7_0_EBX_BMI2 |

CPUID_7_0_EBX_RDSEED |

Quoted 6 lines
Quoted 1 line

This needs to be done only for newer machine type (or is it CPU model versions now? need Eduardo to respond).

Paolo

author
#14 lore raw
Quoted 12 lines · Paolo Bonzini

Il dom 22 dic 2019, 08:49 Ani Sinha <[email protected]> ha scritto:

Ping …

Why ping? You got questions from Eduardo, so you need to answer them and/or send a fixed version of the patch.

Maybe he responded privately but I did not get any questions from Eduardo.

Ani

Quoted 37 lines

Thanks,

Paolo

Quoted 31 lines · Paolo Bonzini
Quoted 15 lines · Ani Sinha

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

target/i386/cpu.c static X86CPUDefinition builtin_x86_defs[] = { · line 3820

Quoted 8 lines
target/i386/cpu.c +2 -0
@@ -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 |

This needs to be done only for newer machine type (or is it CPU model versions now? need Eduardo to respond).

Paolo

author
#15 lore raw
Quoted 12 lines · Ani Sinha
Quoted 9 lines · Paolo Bonzini

Il dom 22 dic 2019, 08:49 Ani Sinha <[email protected]> ha scritto:

Quoted 8 lines
Quoted 4 lines

Ping …

Why ping? You got questions from Eduardo, so you need to answer them and/or send a fixed version of the patch.

Maybe he responded privately but I did not get any questions from Eduardo.

Ok I see his response in the mailing list archives:
https://lists.gnu.org/archive/html/qemu-devel/2019-12/msg03927.html

I generally do not pay attention to emails sent to @qemu-dev and they arrive as a digest and get filtered out. So please do send the responses with me in the CC or To list. That way, I won’t miss them.

thanks
ani