a83cc2
From 1497b5d371a63dd20d3b14ca2f8cce99845a1c2c Mon Sep 17 00:00:00 2001
a83cc2
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
a83cc2
Date: Wed, 19 May 2021 15:46:27 -0400
a83cc2
Subject: [PATCH 03/12] x86: Add x86 rhel8.5 machine types
a83cc2
MIME-Version: 1.0
a83cc2
Content-Type: text/plain; charset=UTF-8
a83cc2
Content-Transfer-Encoding: 8bit
a83cc2
a83cc2
RH-Author: Miroslav Rezanina <mrezanin@redhat.com>
a83cc2
RH-MergeRequest: 16: Synchronize with RHEL-AV 8.5 release 21 to RHEL 9
a83cc2
RH-Commit: [1/8] db81806d99b545abe4dcba576fb33c02ec283dd7 (mrezanin/centos-src-qemu-kvm)
a83cc2
RH-Bugzilla: 1957194
a83cc2
RH-Acked-by: Vitaly Kuznetsov <vkuznets@redhat.com>
a83cc2
RH-Acked-by: Daniel P. Berrangé <berrange@redhat.com>
a83cc2
a83cc2
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
a83cc2
a83cc2
Add the 8.5 machine type and the compat entries.
a83cc2
a83cc2
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
a83cc2
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
a83cc2
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
a83cc2
---
a83cc2
 hw/i386/pc.c         |  6 ++++++
a83cc2
 hw/i386/pc_piix.c    |  2 ++
a83cc2
 hw/i386/pc_q35.c     | 24 ++++++++++++++++++++++--
a83cc2
 include/hw/i386/pc.h |  3 +++
a83cc2
 4 files changed, 33 insertions(+), 2 deletions(-)
a83cc2
a83cc2
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
a83cc2
index edc02a68ca..0a374dec39 100644
a83cc2
--- a/hw/i386/pc.c
a83cc2
+++ b/hw/i386/pc.c
a83cc2
@@ -369,6 +369,12 @@ GlobalProperty pc_rhel_compat[] = {
a83cc2
 };
a83cc2
 const size_t pc_rhel_compat_len = G_N_ELEMENTS(pc_rhel_compat);
a83cc2
 
a83cc2
+GlobalProperty pc_rhel_8_4_compat[] = {
a83cc2
+    /* pc_rhel_8_4_compat from pc_compat_5_2 */
a83cc2
+    { "ICH9-LPC", "x-smi-cpu-hotunplug", "off" },
a83cc2
+};
a83cc2
+const size_t pc_rhel_8_4_compat_len = G_N_ELEMENTS(pc_rhel_8_4_compat);
a83cc2
+
a83cc2
 GlobalProperty pc_rhel_8_3_compat[] = {
a83cc2
     /* pc_rhel_8_3_compat from pc_compat_5_1 */
a83cc2
     { "ICH9-LPC", "x-smi-cpu-hotplug", "off" },
a83cc2
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
a83cc2
index d9c5df16d8..5d61c9b833 100644
a83cc2
--- a/hw/i386/pc_piix.c
a83cc2
+++ b/hw/i386/pc_piix.c
a83cc2
@@ -971,6 +971,8 @@ static void pc_machine_rhel760_options(MachineClass *m)
a83cc2
     pcmc->pci_root_uid = 1;
a83cc2
     compat_props_add(m->compat_props, hw_compat_rhel_8_4,
a83cc2
                      hw_compat_rhel_8_4_len);
a83cc2
+    compat_props_add(m->compat_props, pc_rhel_8_4_compat,
a83cc2
+                     pc_rhel_8_4_compat_len);
a83cc2
     compat_props_add(m->compat_props, hw_compat_rhel_8_3,
a83cc2
                      hw_compat_rhel_8_3_len);
a83cc2
     compat_props_add(m->compat_props, pc_rhel_8_3_compat,
a83cc2
diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
a83cc2
index 44109e4876..01ff3e0544 100644
a83cc2
--- a/hw/i386/pc_q35.c
a83cc2
+++ b/hw/i386/pc_q35.c
a83cc2
@@ -607,6 +607,24 @@ static void pc_q35_machine_rhel_options(MachineClass *m)
a83cc2
     compat_props_add(m->compat_props, pc_rhel_compat, pc_rhel_compat_len);
a83cc2
 }
a83cc2
 
a83cc2
+static void pc_q35_init_rhel850(MachineState *machine)
a83cc2
+{
a83cc2
+    pc_q35_init(machine);
a83cc2
+}
a83cc2
+
a83cc2
+static void pc_q35_machine_rhel850_options(MachineClass *m)
a83cc2
+{
a83cc2
+    PCMachineClass *pcmc = PC_MACHINE_CLASS(m);
a83cc2
+    pc_q35_machine_rhel_options(m);
a83cc2
+    m->desc = "RHEL-8.5.0 PC (Q35 + ICH9, 2009)";
a83cc2
+    pcmc->smbios_stream_product = "RHEL-AV";
a83cc2
+    pcmc->smbios_stream_version = "8.5.0";
a83cc2
+}
a83cc2
+
a83cc2
+DEFINE_PC_MACHINE(q35_rhel850, "pc-q35-rhel8.5.0", pc_q35_init_rhel850,
a83cc2
+                  pc_q35_machine_rhel850_options);
a83cc2
+
a83cc2
+
a83cc2
 static void pc_q35_init_rhel840(MachineState *machine)
a83cc2
 {
a83cc2
     pc_q35_init(machine);
a83cc2
@@ -615,12 +633,15 @@ static void pc_q35_init_rhel840(MachineState *machine)
a83cc2
 static void pc_q35_machine_rhel840_options(MachineClass *m)
a83cc2
 {
a83cc2
     PCMachineClass *pcmc = PC_MACHINE_CLASS(m);
a83cc2
-    pc_q35_machine_rhel_options(m);
a83cc2
+    pc_q35_machine_rhel850_options(m);
a83cc2
     m->desc = "RHEL-8.4.0 PC (Q35 + ICH9, 2009)";
a83cc2
+    m->alias = NULL;
a83cc2
     pcmc->smbios_stream_product = "RHEL-AV";
a83cc2
     pcmc->smbios_stream_version = "8.4.0";
a83cc2
     compat_props_add(m->compat_props, hw_compat_rhel_8_4,
a83cc2
                      hw_compat_rhel_8_4_len);
a83cc2
+    compat_props_add(m->compat_props, pc_rhel_8_4_compat,
a83cc2
+                     pc_rhel_8_4_compat_len);
a83cc2
 }
a83cc2
 
a83cc2
 DEFINE_PC_MACHINE(q35_rhel840, "pc-q35-rhel8.4.0", pc_q35_init_rhel840,
a83cc2
@@ -637,7 +658,6 @@ static void pc_q35_machine_rhel830_options(MachineClass *m)
a83cc2
     PCMachineClass *pcmc = PC_MACHINE_CLASS(m);
a83cc2
     pc_q35_machine_rhel840_options(m);
a83cc2
     m->desc = "RHEL-8.3.0 PC (Q35 + ICH9, 2009)";
a83cc2
-    m->alias = NULL;
a83cc2
     pcmc->smbios_stream_product = "RHEL-AV";
a83cc2
     pcmc->smbios_stream_version = "8.3.0";
a83cc2
     compat_props_add(m->compat_props, hw_compat_rhel_8_3,
a83cc2
diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
a83cc2
index 79a7803a2f..1980c93f41 100644
a83cc2
--- a/include/hw/i386/pc.h
a83cc2
+++ b/include/hw/i386/pc.h
a83cc2
@@ -281,6 +281,9 @@ extern const size_t pc_compat_1_4_len;
a83cc2
 extern GlobalProperty pc_rhel_compat[];
a83cc2
 extern const size_t pc_rhel_compat_len;
a83cc2
 
a83cc2
+extern GlobalProperty pc_rhel_8_4_compat[];
a83cc2
+extern const size_t pc_rhel_8_4_compat_len;
a83cc2
+
a83cc2
 extern GlobalProperty pc_rhel_8_3_compat[];
a83cc2
 extern const size_t pc_rhel_8_3_compat_len;
a83cc2
 
a83cc2
-- 
a83cc2
2.27.0
a83cc2