Blob Blame History Raw
From ac371ebbc83fd09970f259f77481956673c885cf Mon Sep 17 00:00:00 2001
From: Suraj Jitindar Singh <sursingh@redhat.com>
Date: Tue, 13 Mar 2018 05:21:37 +0100
Subject: [PATCH 15/17] redhat: Define the pseries-rhel7.5-sxxm machine type

RH-Author: Suraj Jitindar Singh <sursingh@redhat.com>
Message-id: <1520918499-27663-10-git-send-email-sursingh@redhat.com>
Patchwork-id: 79250
O-Subject: [RHEL7.5 qemu-kvm-rhev PATCH 09/11] redhat: Define the pseries-rhel7.5-sxxm machine type
Bugzilla: 1554957
RH-Acked-by: David Gibson <dgibson@redhat.com>
RH-Acked-by: Laurent Vivier <lvivier@redhat.com>
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>

The sxxm (speculative execution exploit mitigation) machine type is a
variant of the 7.5 machine type with workarounds for speculative
execution vulnerabilities enabled by default.

Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1548919

Signed-off-by: Suraj Jitindar Singh <sursingh@redhat.com>
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
---
 hw/ppc/spapr.c | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index a43e64c..9d63c00 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -4131,6 +4131,28 @@ static void spapr_machine_rhel750_class_options(MachineClass *mc)
 
 DEFINE_SPAPR_MACHINE(rhel750, "rhel7.5.0", true);
 
+/*
+ * pseries-rhel7.5.0-sxxm
+ *
+ * pseries-rhel7.5.0 with speculative execution exploit mitigations enabled by default
+ */
+static void spapr_machine_rhel750sxxm_instance_options(MachineState *machine)
+{
+    spapr_machine_rhel750_instance_options(machine);
+}
+
+static void spapr_machine_rhel750sxxm_class_options(MachineClass *mc)
+{
+    sPAPRMachineClass *smc = SPAPR_MACHINE_CLASS(mc);
+
+    spapr_machine_rhel750_class_options(mc);
+    smc->default_caps.caps[SPAPR_CAP_CFPC] = SPAPR_CAP_WORKAROUND;
+    smc->default_caps.caps[SPAPR_CAP_SBBC] = SPAPR_CAP_WORKAROUND;
+    smc->default_caps.caps[SPAPR_CAP_IBS] = SPAPR_CAP_FIXED_CCD;
+}
+
+DEFINE_SPAPR_MACHINE(rhel750sxxm, "rhel7.5.0-sxxm", false);
+
 #if defined(CONFIG_RHV)
 
 /*
-- 
1.8.3.1