Blame SOURCES/0019-WRB-Introduce-RHEL-9.0.0-hw-compat-structure.patch

29b115
From 1d6439527aa6ccabb58208c94417778ccc19de39 Mon Sep 17 00:00:00 2001
29b115
From: Miroslav Rezanina <mrezanin@redhat.com>
29b115
Date: Wed, 9 Feb 2022 04:16:25 -0500
29b115
Subject: WRB: Introduce RHEL 9.0.0 hw compat structure
29b115
29b115
General compatibility structure for post RHEL 9.0.0 rebase.
29b115
29b115
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
29b115
---
29b115
 hw/core/machine.c          | 9 +++++++++
29b115
 hw/i386/pc.c               | 6 ++++++
29b115
 hw/i386/pc_piix.c          | 4 ++++
29b115
 hw/i386/pc_q35.c           | 4 ++++
29b115
 hw/s390x/s390-virtio-ccw.c | 2 ++
29b115
 include/hw/boards.h        | 3 +++
29b115
 include/hw/i386/pc.h       | 3 +++
29b115
 7 files changed, 31 insertions(+)
29b115
29b115
diff --git a/hw/core/machine.c b/hw/core/machine.c
29b115
index 28989b6e7b..dffc3ef4ab 100644
29b115
--- a/hw/core/machine.c
29b115
+++ b/hw/core/machine.c
29b115
@@ -53,6 +53,15 @@ GlobalProperty hw_compat_rhel_8_6[] = {
29b115
 };
29b115
 const size_t hw_compat_rhel_8_6_len = G_N_ELEMENTS(hw_compat_rhel_8_6);
29b115
 
29b115
+/*
29b115
+ * Mostly the same as hw_compat_6_2
29b115
+ */
29b115
+GlobalProperty hw_compat_rhel_9_0[] = {
29b115
+    /* hw_compat_rhel_9_0 from hw_compat_6_2 */
29b115
+    { "PIIX4_PM", "x-not-migrate-acpi-index", "on"},
29b115
+};
29b115
+const size_t hw_compat_rhel_9_0_len = G_N_ELEMENTS(hw_compat_rhel_9_0);
29b115
+
29b115
 /*
29b115
  * Mostly the same as hw_compat_6_0 and hw_compat_6_1
29b115
  */
29b115
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
29b115
index 263d882af6..0886cfe3fe 100644
29b115
--- a/hw/i386/pc.c
29b115
+++ b/hw/i386/pc.c
29b115
@@ -391,6 +391,12 @@ GlobalProperty pc_rhel_compat[] = {
29b115
 };
29b115
 const size_t pc_rhel_compat_len = G_N_ELEMENTS(pc_rhel_compat);
29b115
 
29b115
+GlobalProperty pc_rhel_9_0_compat[] = {
29b115
+    /* pc_rhel_9_0_compat from pc_compat_6_2 */
29b115
+    { "virtio-mem", "unplugged-inaccessible", "off" },
29b115
+};
29b115
+const size_t pc_rhel_9_0_compat_len = G_N_ELEMENTS(pc_rhel_9_0_compat);
29b115
+
29b115
 GlobalProperty pc_rhel_8_5_compat[] = {
29b115
     /* pc_rhel_8_5_compat from pc_compat_6_0 */
29b115
     { "qemu64" "-" TYPE_X86_CPU, "family", "6" },
29b115
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
29b115
index 0cacc0d623..dc987fe93b 100644
29b115
--- a/hw/i386/pc_piix.c
29b115
+++ b/hw/i386/pc_piix.c
29b115
@@ -1014,6 +1014,10 @@ static void pc_machine_rhel760_options(MachineClass *m)
29b115
     pcmc->kvmclock_create_always = false;
29b115
     /* From pc_i440fx_5_1_machine_options() */
29b115
     pcmc->pci_root_uid = 1;
29b115
+    compat_props_add(m->compat_props, hw_compat_rhel_9_0,
29b115
+                     hw_compat_rhel_9_0_len);
29b115
+    compat_props_add(m->compat_props, pc_rhel_9_0_compat,
29b115
+                     pc_rhel_9_0_compat_len);
29b115
     compat_props_add(m->compat_props, hw_compat_rhel_8_6,
29b115
                      hw_compat_rhel_8_6_len);
29b115
     compat_props_add(m->compat_props, hw_compat_rhel_8_5,
29b115
diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
29b115
index 157160e069..52c253c570 100644
29b115
--- a/hw/i386/pc_q35.c
29b115
+++ b/hw/i386/pc_q35.c
29b115
@@ -669,6 +669,10 @@ static void pc_q35_machine_rhel900_options(MachineClass *m)
29b115
     m->desc = "RHEL-9.0.0 PC (Q35 + ICH9, 2009)";
29b115
     pcmc->smbios_stream_product = "RHEL";
29b115
     pcmc->smbios_stream_version = "9.0.0";
29b115
+    compat_props_add(m->compat_props, hw_compat_rhel_9_0,
29b115
+                     hw_compat_rhel_9_0_len);
29b115
+    compat_props_add(m->compat_props, pc_rhel_9_0_compat,
29b115
+                     pc_rhel_9_0_compat_len);
29b115
 }
29b115
 
29b115
 DEFINE_PC_MACHINE(q35_rhel900, "pc-q35-rhel9.0.0", pc_q35_init_rhel900,
29b115
diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c
29b115
index 465a2a09d2..08e0f6a79b 100644
29b115
--- a/hw/s390x/s390-virtio-ccw.c
29b115
+++ b/hw/s390x/s390-virtio-ccw.c
29b115
@@ -1118,12 +1118,14 @@ static void ccw_machine_2_4_class_options(MachineClass *mc)
29b115
 DEFINE_CCW_MACHINE(2_4, "2.4", false);
29b115
 #endif
29b115
 
29b115
+
29b115
 static void ccw_machine_rhel900_instance_options(MachineState *machine)
29b115
 {
29b115
 }
29b115
 
29b115
 static void ccw_machine_rhel900_class_options(MachineClass *mc)
29b115
 {
29b115
+    compat_props_add(mc->compat_props, hw_compat_rhel_9_0, hw_compat_rhel_9_0_len);
29b115
 }
29b115
 DEFINE_CCW_MACHINE(rhel900, "rhel9.0.0", true);
29b115
 
29b115
diff --git a/include/hw/boards.h b/include/hw/boards.h
29b115
index d1555665df..635e45dd71 100644
29b115
--- a/include/hw/boards.h
29b115
+++ b/include/hw/boards.h
29b115
@@ -451,6 +451,9 @@ extern const size_t hw_compat_2_2_len;
29b115
 extern GlobalProperty hw_compat_2_1[];
29b115
 extern const size_t hw_compat_2_1_len;
29b115
 
29b115
+extern GlobalProperty hw_compat_rhel_9_0[];
29b115
+extern const size_t hw_compat_rhel_9_0_len;
29b115
+
29b115
 extern GlobalProperty hw_compat_rhel_8_6[];
29b115
 extern const size_t hw_compat_rhel_8_6_len;
29b115
 
29b115
diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
29b115
index 419a6ec24b..a492c420b5 100644
29b115
--- a/include/hw/i386/pc.h
29b115
+++ b/include/hw/i386/pc.h
29b115
@@ -292,6 +292,9 @@ extern const size_t pc_compat_1_4_len;
29b115
 extern GlobalProperty pc_rhel_compat[];
29b115
 extern const size_t pc_rhel_compat_len;
29b115
 
29b115
+extern GlobalProperty pc_rhel_9_0_compat[];
29b115
+extern const size_t pc_rhel_9_0_compat_len;
29b115
+
29b115
 extern GlobalProperty pc_rhel_8_5_compat[];
29b115
 extern const size_t pc_rhel_8_5_compat_len;
29b115
 
29b115
-- 
29b115
2.31.1
29b115