[PULL 04/14] i386/cpu: Remove unnecessary cache_info fields from builtin CPU model

Paolo Bonzini posted 14 patches 3 weeks, 5 days ago
Maintainers: Paolo Bonzini <pbonzini@redhat.com>, Pierrick Bouvier <pierrick.bouvier@linaro.org>, "Michael S. Tsirkin" <mst@redhat.com>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>, Richard Henderson <richard.henderson@linaro.org>, Eduardo Habkost <eduardo@habkost.net>, Gerd Hoffmann <kraxel@redhat.com>, Stefano Garzarella <sgarzare@redhat.com>, Ani Sinha <anisinha@redhat.com>, Zhao Liu <zhao1.liu@intel.com>, Marcelo Tosatti <mtosatti@redhat.com>
[PULL 04/14] i386/cpu: Remove unnecessary cache_info fields from builtin CPU model
Posted by Paolo Bonzini 3 weeks, 5 days ago
From: Zhao Liu <zhao1.liu@intel.com>

In x86_cpu_get_versioned_cache_info(), higher version CPU models will
inherit cache_info from lower versions if the cache_info field is not
specified, so there is no need to repeatedly set the same cache_info.

Therefore, remove the repeated cache models from SapphireRapids-v6
(SapphireRapids-v4 has set the cache model), GraniteRapids-v5
(GraniteRapids-v3 has set) and SierraForest-v5 (SierraForest-v3 has
set).

Signed-off-by: Zhao Liu <zhao1.liu@intel.com>
Link: https://lore.kernel.org/r/20260310140819.1563084-4-zhao1.liu@intel.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 target/i386/cpu.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/target/i386/cpu.c b/target/i386/cpu.c
index 08450a9142e..05121c5b324 100644
--- a/target/i386/cpu.c
+++ b/target/i386/cpu.c
@@ -5264,7 +5264,6 @@ static const X86CPUDefinition builtin_x86_defs[] = {
             {
                 .version = 6,
                 .note = "with cet-ss, cet-ibt, its-no",
-                .cache_info = &xeon_spr_cache_info,
                 .props = (PropValue[]) {
                     { "its-no", "on" },
                     { /* end of list */ },
@@ -5446,7 +5445,6 @@ static const X86CPUDefinition builtin_x86_defs[] = {
             {
                 .version = 5,
                 .note = "with cet-ss, cet-ibt, its-no",
-                .cache_info = &xeon_gnr_cache_info,
                 .props = (PropValue[]) {
                     { "its-no", "on" },
                     { /* end of list */ },
@@ -5812,7 +5810,6 @@ static const X86CPUDefinition builtin_x86_defs[] = {
             {
                 .version = 5,
                 .note = "with ITS_NO",
-                .cache_info = &xeon_srf_cache_info,
                 .props = (PropValue[]) {
                     { "its-no", "on" },
                     { /* end of list */ },
-- 
2.53.0