From 2bb5dff02fb393530a12f4f00219cd2f90cd442a Mon Sep 17 00:00:00 2001 From: Sebastian Ott Date: Thu, 15 May 2025 18:45:51 +0200 Subject: [PATCH 3/5] hw/i386: Fix machine type compatibility RH-Author: Sebastian Ott RH-MergeRequest: 364: hw/i386: Fix machine type compatibility RH-Jira: RHEL-91307 RH-Acked-by: Cornelia Huck RH-Acked-by: Jon Maloy RH-Commit: [1/1] 44ddbcb3af119c65e99018d7ed90887f3948907e (seott1/cos-qemu-kvm) Upstream Status: RHEL only Ensure compatibility of rhel specific i440fx and q35 machine types. Pick up missing bits from pc_compat_9_0 upstream. Signed-off-by: Sebastian Ott --- hw/i386/pc.c | 8 ++++++++ hw/i386/pc_piix.c | 2 ++ hw/i386/pc_q35.c | 2 ++ include/hw/i386/pc.h | 3 +++ 4 files changed, 15 insertions(+) diff --git a/hw/i386/pc.c b/hw/i386/pc.c index fa9f16cbaf..5237538640 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -298,6 +298,14 @@ GlobalProperty pc_rhel_compat[] = { }; const size_t pc_rhel_compat_len = G_N_ELEMENTS(pc_rhel_compat); +GlobalProperty pc_rhel_9_6_compat[] = { + /* pc_rhel_9_6_compat from pc_compat_9_0 */ + { TYPE_X86_CPU, "x-amd-topoext-features-only", "false" }, + { TYPE_X86_CPU, "x-l1-cache-per-thread", "false" }, + { TYPE_X86_CPU, "legacy-multi-node", "on" }, +}; +const size_t pc_rhel_9_6_compat_len = G_N_ELEMENTS(pc_rhel_9_6_compat); + GlobalProperty pc_rhel_9_5_compat[] = { /* pc_rhel_9_5_compat from pc_compat_pc_9_0 (backported from 9.1) */ { TYPE_X86_CPU, "guest-phys-bits", "0" }, diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index 10764bf596..0687317db5 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -885,6 +885,8 @@ static void pc_i440fx_rhel_machine_7_6_0_options(MachineClass *m) compat_props_add(m->compat_props, hw_compat_rhel_9_6, hw_compat_rhel_9_6_len); + compat_props_add(m->compat_props, pc_rhel_9_6_compat, + pc_rhel_9_6_compat_len); compat_props_add(m->compat_props, pc_rhel_9_5_compat, pc_rhel_9_5_compat_len); compat_props_add(m->compat_props, hw_compat_rhel_9_5, diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index 5bf08be0fb..871c760aea 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c @@ -704,6 +704,8 @@ static void pc_q35_rhel_machine_9_4_0_options(MachineClass *m) compat_props_add(m->compat_props, hw_compat_rhel_9_6, hw_compat_rhel_9_6_len); + compat_props_add(m->compat_props, pc_rhel_9_6_compat, + pc_rhel_9_6_compat_len); compat_props_add(m->compat_props, pc_rhel_9_5_compat, pc_rhel_9_5_compat_len); compat_props_add(m->compat_props, hw_compat_rhel_9_5, diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index 75c9271cdd..2b7c18f2b0 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -305,6 +305,9 @@ extern const size_t pc_compat_2_3_len; extern GlobalProperty pc_rhel_compat[]; extern const size_t pc_rhel_compat_len; +extern GlobalProperty pc_rhel_9_6_compat[]; +extern const size_t pc_rhel_9_6_compat_len; + extern GlobalProperty pc_rhel_9_5_compat[]; extern const size_t pc_rhel_9_5_compat_len; -- 2.48.1