Blame SOURCES/kvm-pc-pc-rhel75.5.0-compat-code.patch

357786
From e1e6a404ee2c4833a05356378da2ffc7bdb5e6fe Mon Sep 17 00:00:00 2001
357786
From: Eduardo Habkost <ehabkost@redhat.com>
357786
Date: Fri, 25 May 2018 23:38:16 +0200
357786
Subject: [PATCH 5/8] pc: pc-*-rhel75.5.0 compat code
357786
357786
RH-Author: Eduardo Habkost <ehabkost@redhat.com>
357786
Message-id: <20180525233816.19506-2-ehabkost@redhat.com>
357786
Patchwork-id: 80481
357786
O-Subject: [RHEL-7.6 qemu-kvm-rhev PATCH 1/1] pc: pc-*-rhel75.5.0 compat code
357786
Bugzilla: 1578068
357786
RH-Acked-by: Peter Xu <peterx@redhat.com>
357786
RH-Acked-by: Igor Mammedov <imammedo@redhat.com>
357786
RH-Acked-by: Laurent Vivier <lvivier@redhat.com>
357786
357786
Based on the pc-*-2.11 and pc-*-2.10 compat code from upstream.
357786
357786
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
357786
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
357786
---
357786
 hw/i386/pc_piix.c    |  2 ++
357786
 hw/i386/pc_q35.c     |  4 ++++
357786
 include/hw/i386/pc.h | 13 +++++++++++++
357786
 3 files changed, 19 insertions(+)
357786
357786
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
357786
index 6794bb7..7b87ef6 100644
357786
--- a/hw/i386/pc_piix.c
357786
+++ b/hw/i386/pc_piix.c
357786
@@ -1166,6 +1166,8 @@ static void pc_machine_rhel750_options(MachineClass *m)
357786
 {
357786
     pc_machine_rhel7_options(m);
357786
     m->desc = "RHEL 7.5.0 PC (i440FX + PIIX, 1996)";
357786
+    m->auto_enable_numa_with_memhp = false;
357786
+    SET_MACHINE_COMPAT(m, PC_RHEL7_5_COMPAT);
357786
 }
357786
 
357786
 DEFINE_PC_MACHINE(rhel750, "pc-i440fx-rhel7.5.0", pc_init_rhel750,
357786
diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
357786
index ecd6255..1805f55 100644
357786
--- a/hw/i386/pc_q35.c
357786
+++ b/hw/i386/pc_q35.c
357786
@@ -430,8 +430,12 @@ static void pc_q35_init_rhel750(MachineState *machine)
357786
 
357786
 static void pc_q35_machine_rhel750_options(MachineClass *m)
357786
 {
357786
+    PCMachineClass *pcmc = PC_MACHINE_CLASS(m);
357786
     pc_q35_machine_rhel7_options(m);
357786
     m->desc = "RHEL-7.5.0 PC (Q35 + ICH9, 2009)";
357786
+    m->auto_enable_numa_with_memhp = false;
357786
+    pcmc->default_nic_model = "e1000";
357786
+    SET_MACHINE_COMPAT(m, PC_RHEL7_5_COMPAT);
357786
 }
357786
 
357786
 DEFINE_PC_MACHINE(q35_rhel750, "pc-q35-rhel7.5.0", pc_q35_init_rhel750,
357786
diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
357786
index faddeba..e94424f 100644
357786
--- a/include/hw/i386/pc.h
357786
+++ b/include/hw/i386/pc.h
357786
@@ -969,6 +969,19 @@ extern void igd_passthrough_isa_bridge_create(PCIBus *bus, uint16_t gpu_dev_id);
357786
             .value = "on",\
357786
         },
357786
 
357786
+/* Similar to PC_COMPAT_2_11 + PC_COMPAT_2_10, but:
357786
+ * - x-hv-max-vps was backported to 7.5
357786
+ * - x-pci-hole64-fix was backported to 7.5
357786
+ */
357786
+#define PC_RHEL7_5_COMPAT \
357786
+        HW_COMPAT_RHEL7_5 \
357786
+        { /* PC_RHEL7_5_COMPAT from PC_COMPAT_2_11 */ \
357786
+            .driver   = "Skylake-Server" "-" TYPE_X86_CPU,\
357786
+            .property = "clflushopt",\
357786
+            .value    = "off",\
357786
+        },
357786
+
357786
+
357786
 #define PC_RHEL7_4_COMPAT \
357786
         HW_COMPAT_RHEL7_4 \
357786
         { /* PC_RHEL7_4_COMPAT from PC_COMPAT_2_9 */ \
357786
-- 
357786
1.8.3.1
357786