From 2511c637a95e2a5f2a471c03a4dafcb14fbe4db8 Mon Sep 17 00:00:00 2001 From: Laurent Vivier Date: Fri, 24 May 2019 12:13:03 +0100 Subject: [PATCH 3/4] redhat: sync pseries-rhel7.6.0 with rhel-av-8.0.1 RH-Author: Laurent Vivier Message-id: <20190524121304.15530-4-lvivier@redhat.com> Patchwork-id: 88199 O-Subject: [RHEL-AV qemu-kvm PATCH v4 3/4] redhat: sync pseries-rhel7.6.0 with rhel-av-8.0.1 Bugzilla: 1709726 RH-Acked-by: David Gibson RH-Acked-by: Cornelia Huck RH-Acked-by: Dr. David Alan Gilbert The default values for SPAPR_CAP_CFPC, SPAPR_CAP_SBBC and SPAPR_CAP_IBS are SPAPR_CAP_WORKAROUND in pseries-4.0 and SPAPR_CAP_BROKEN in pseries-3.1, but the change has been backported to pseries-rhel8.0.0 in rhel-av-8.0.1 so it has to be reset to SPAPR_CAP_BROKEN in pseries-rhe7.6.0 rather than in pseries-rhel8.0.0. This patch also removes default_cpu_type to POWER8 as it will be set in pseries-rhel8.0.0 (POWER9 appears with pseries-4.0) Signed-off-by: Laurent Vivier Signed-off-by: Danilo C. L. de Paula --- hw/ppc/spapr.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index daa5920..67c9e01 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -4719,8 +4719,14 @@ static void spapr_machine_rhel760_class_options(MachineClass *mc) * yet. Postpone this to machine init (see default_caps_with_cpu()). */ smc->default_caps.caps[SPAPR_CAP_HPT_MAXPAGESIZE] = 0; - /* Defaults for the latest behaviour inherited from the base class */ - mc->default_cpu_type = POWERPC_CPU_TYPE_NAME("power8_v2.0"); + + /* SPAPR_CAP_WORKAROUND enabled in pseries-rhel800 by + * f21757edc554 + * "Enable mitigations by default for pseries-4.0 machine type") + */ + smc->default_caps.caps[SPAPR_CAP_CFPC] = SPAPR_CAP_BROKEN; + smc->default_caps.caps[SPAPR_CAP_SBBC] = SPAPR_CAP_BROKEN; + smc->default_caps.caps[SPAPR_CAP_IBS] = SPAPR_CAP_BROKEN; } DEFINE_SPAPR_MACHINE(rhel760, "rhel7.6.0", false); -- 1.8.3.1