qemu-kvm/SOURCES/kvm-hw-i386-Fix-machine-type-compatibility.patch

88 lines
3.1 KiB
Diff

From 9bd4a89d3e1410b3a5994ab2b33f4332a4246955 Mon Sep 17 00:00:00 2001
From: Sebastian Ott <sebott@redhat.com>
Date: Thu, 15 May 2025 18:45:51 +0200
Subject: [PATCH] hw/i386: Fix machine type compatibility
RH-Author: Sebastian Ott <sebott@redhat.com>
RH-MergeRequest: 452: hw/i386: Fix machine type compatibility
RH-Jira: RHEL-92077
RH-Acked-by: Cornelia Huck <cohuck@redhat.com>
RH-Acked-by: Jon Maloy <jmaloy@redhat.com>
RH-Commit: [1/1] d594f142e8ce616b6fd1accd6950ab5cebc34984
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 <sebott@redhat.com>
---
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 fa0e42d072..d8f1b2d899 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 656abb5d39..80d366bf17 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 578f63524f..e3653b44cd 100644
--- a/hw/i386/pc_q35.c
+++ b/hw/i386/pc_q35.c
@@ -701,6 +701,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