Blame SOURCES/kvm-redhat-Define-the-pseries-rhel7.5-sxxm-machine-type.patch

37e7a1
From ac371ebbc83fd09970f259f77481956673c885cf Mon Sep 17 00:00:00 2001
37e7a1
From: Suraj Jitindar Singh <sursingh@redhat.com>
37e7a1
Date: Tue, 13 Mar 2018 05:21:37 +0100
37e7a1
Subject: [PATCH 15/17] redhat: Define the pseries-rhel7.5-sxxm machine type
37e7a1
37e7a1
RH-Author: Suraj Jitindar Singh <sursingh@redhat.com>
37e7a1
Message-id: <1520918499-27663-10-git-send-email-sursingh@redhat.com>
37e7a1
Patchwork-id: 79250
37e7a1
O-Subject: [RHEL7.5 qemu-kvm-rhev PATCH 09/11] redhat: Define the pseries-rhel7.5-sxxm machine type
37e7a1
Bugzilla: 1554957
37e7a1
RH-Acked-by: David Gibson <dgibson@redhat.com>
37e7a1
RH-Acked-by: Laurent Vivier <lvivier@redhat.com>
37e7a1
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
37e7a1
37e7a1
The sxxm (speculative execution exploit mitigation) machine type is a
37e7a1
variant of the 7.5 machine type with workarounds for speculative
37e7a1
execution vulnerabilities enabled by default.
37e7a1
37e7a1
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1548919
37e7a1
37e7a1
Signed-off-by: Suraj Jitindar Singh <sursingh@redhat.com>
37e7a1
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
37e7a1
---
37e7a1
 hw/ppc/spapr.c | 22 ++++++++++++++++++++++
37e7a1
 1 file changed, 22 insertions(+)
37e7a1
37e7a1
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
37e7a1
index a43e64c..9d63c00 100644
37e7a1
--- a/hw/ppc/spapr.c
37e7a1
+++ b/hw/ppc/spapr.c
37e7a1
@@ -4131,6 +4131,28 @@ static void spapr_machine_rhel750_class_options(MachineClass *mc)
37e7a1
 
37e7a1
 DEFINE_SPAPR_MACHINE(rhel750, "rhel7.5.0", true);
37e7a1
 
37e7a1
+/*
37e7a1
+ * pseries-rhel7.5.0-sxxm
37e7a1
+ *
37e7a1
+ * pseries-rhel7.5.0 with speculative execution exploit mitigations enabled by default
37e7a1
+ */
37e7a1
+static void spapr_machine_rhel750sxxm_instance_options(MachineState *machine)
37e7a1
+{
37e7a1
+    spapr_machine_rhel750_instance_options(machine);
37e7a1
+}
37e7a1
+
37e7a1
+static void spapr_machine_rhel750sxxm_class_options(MachineClass *mc)
37e7a1
+{
37e7a1
+    sPAPRMachineClass *smc = SPAPR_MACHINE_CLASS(mc);
37e7a1
+
37e7a1
+    spapr_machine_rhel750_class_options(mc);
37e7a1
+    smc->default_caps.caps[SPAPR_CAP_CFPC] = SPAPR_CAP_WORKAROUND;
37e7a1
+    smc->default_caps.caps[SPAPR_CAP_SBBC] = SPAPR_CAP_WORKAROUND;
37e7a1
+    smc->default_caps.caps[SPAPR_CAP_IBS] = SPAPR_CAP_FIXED_CCD;
37e7a1
+}
37e7a1
+
37e7a1
+DEFINE_SPAPR_MACHINE(rhel750sxxm, "rhel7.5.0-sxxm", false);
37e7a1
+
37e7a1
 #if defined(CONFIG_RHV)
37e7a1
 
37e7a1
 /*
37e7a1
-- 
37e7a1
1.8.3.1
37e7a1