[PATCH 3/5] i386: Enable CPUID 80000026 for EPYC-Genoa/Turin vCPU

Shivansh Dhiman posted 5 patches 2 months, 2 weeks ago
Maintainers: Paolo Bonzini <pbonzini@redhat.com>, Zhao Liu <zhao1.liu@intel.com>, Marcelo Tosatti <mtosatti@redhat.com>
[PATCH 3/5] i386: Enable CPUID 80000026 for EPYC-Genoa/Turin vCPU
Posted by Shivansh Dhiman 2 months, 2 weeks ago
Enable CPUID leaf 0x80000026 (Extended CPU Topology) for AMD Zen4+ processors,
i.e, Genoa and above. Add version 3 to EPYC-Genoa and version 2 to EPYC-Turin
CPU models with x-force-cpuid-0x80000026 property enabled.

Signed-off-by: Shivansh Dhiman <shivansh.dhiman@amd.com>
---
 target/i386/cpu.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/target/i386/cpu.c b/target/i386/cpu.c
index 01c4da7cf134..12500d6b7bed 100644
--- a/target/i386/cpu.c
+++ b/target/i386/cpu.c
@@ -6505,6 +6505,13 @@ static const X86CPUDefinition builtin_x86_defs[] = {
                 },
                 .cache_info = &epyc_genoa_v2_cache_info
             },
+            {
+                .version = 3,
+                .props = (PropValue[]) {
+                    { "x-force-cpuid-0x80000026", "on" },
+                    { /* end of list */ }
+                }
+            },
             { /* end of list */ }
         }
     },
@@ -6735,6 +6742,17 @@ static const X86CPUDefinition builtin_x86_defs[] = {
         .xlevel = 0x80000022,
         .model_id = "AMD EPYC-Turin Processor",
         .cache_info = &epyc_turin_cache_info,
+        .versions = (X86CPUVersionDefinition[]) {
+            { .version = 1 },
+            {
+                .version = 2,
+                .props = (PropValue[]) {
+                    { "x-force-cpuid-0x80000026", "on" },
+                    { /* end of list */ }
+                }
+            },
+            { /* end of list */ }
+        }
     },
 };
 
-- 
2.43.0
Re: [PATCH 3/5] i386: Enable CPUID 80000026 for EPYC-Genoa/Turin vCPU
Posted by Zhao Liu 1 month ago
On Fri, Nov 21, 2025 at 08:34:50AM +0000, Shivansh Dhiman wrote:
> Date: Fri, 21 Nov 2025 08:34:50 +0000
> From: Shivansh Dhiman <shivansh.dhiman@amd.com>
> Subject: [PATCH 3/5] i386: Enable CPUID 80000026 for EPYC-Genoa/Turin vCPU
> X-Mailer: git-send-email 2.43.0
> 
> Enable CPUID leaf 0x80000026 (Extended CPU Topology) for AMD Zen4+ processors,
> i.e, Genoa and above. Add version 3 to EPYC-Genoa and version 2 to EPYC-Turin
> CPU models with x-force-cpuid-0x80000026 property enabled.
> 
> Signed-off-by: Shivansh Dhiman <shivansh.dhiman@amd.com>
> ---
>  target/i386/cpu.c | 18 ++++++++++++++++++
>  1 file changed, 18 insertions(+)

Reviewed-by: Zhao Liu <zhao1.liu@intel.com>