From 0bd708dd99893132f44b9455d1ae8b234ce2d0a2 Mon Sep 17 00:00:00 2001 From: Sebastian Ott Date: Thu, 15 May 2025 18:45:51 +0200 Subject: [PATCH] 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 | 10 ++++++++++ hw/i386/pc_q35.c | 2 ++ include/hw/i386/pc.h | 3 +++ 3 files changed, 15 insertions(+) diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 7af762065..bb47d157a 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -298,6 +298,16 @@ GlobalProperty pc_rhel_compat[] = { }; const size_t pc_rhel_compat_len = G_N_ELEMENTS(pc_rhel_compat); +GlobalProperty pc_rhel_10_0_compat[] = { + /* pc_rhel_10_0_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, "guest-phys-bits", "0" }, + { "sev-guest", "legacy-vm-type", "on" }, + { TYPE_X86_CPU, "legacy-multi-node", "on" }, +}; +const size_t pc_rhel_10_0_compat_len = G_N_ELEMENTS(pc_rhel_10_0_compat); + GlobalProperty pc_rhel_9_3_compat[] = { /* pc_rhel_9_3_compat from pc_compat_8_0 */ { "virtio-mem", "unplugged-inaccessible", "auto" }, diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index b2b812422..4a326f2f9 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c @@ -714,6 +714,8 @@ static void pc_q35_rhel_machine_9_4_0_options(MachineClass *m) compat_props_add(m->compat_props, hw_compat_rhel_10_0, hw_compat_rhel_10_0_len); + compat_props_add(m->compat_props, pc_rhel_10_0_compat, + pc_rhel_10_0_compat_len); compat_props_add(m->compat_props, hw_compat_rhel_9_5, hw_compat_rhel_9_5_len); } diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index 61609027d..2befb4453 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_10_0_compat[]; +extern const size_t pc_rhel_10_0_compat_len; + extern GlobalProperty pc_rhel_9_3_compat[]; extern const size_t pc_rhel_9_3_compat_len; -- 2.43.5