[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 3/6] spapr/xive: Add a warning when StoreEOI is activated on P
From: |
Cédric Le Goater |
Subject: |
[PATCH v2 3/6] spapr/xive: Add a warning when StoreEOI is activated on POWER9 CPUs |
Date: |
Mon, 5 Oct 2020 18:51:44 +0200 |
StoreEOI on POWER9 CPUs is racy because load-after-store ordering is
not enforced.
Signed-off-by: Cédric Le Goater <clg@kaod.org>
---
hw/ppc/spapr_caps.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/hw/ppc/spapr_caps.c b/hw/ppc/spapr_caps.c
index b0a9d0227db2..9251badbdc27 100644
--- a/hw/ppc/spapr_caps.c
+++ b/hw/ppc/spapr_caps.c
@@ -549,6 +549,15 @@ static void cap_storeeoi_apply(SpaprMachineState *spapr,
uint8_t val,
error_setg(errp, "StoreEOI not supported by KVM");
return;
}
+
+ /*
+ * load-after-store ordering is not enforced on POWER9 CPUs
+ * and StoreEOI can be racy.
+ */
+ if (!ppc_type_check_compat(machine->cpu_type, CPU_POWERPC_LOGICAL_3_10,
+ 0, spapr->max_compat_pvr)) {
+ warn_report("StoreEOI on a POWER9 CPU is unsafe on KVM.");
+ }
}
}
--
2.25.4
- Re: [PATCH v2 6/6] spapr/xive: Introduce a new CAS value for the StoreEOI capability, (continued)
[PATCH v2 5/6] spapr/xive: Activate StoreEOI at the source level, Cédric Le Goater, 2020/10/05
[PATCH v2 4/6] spapr/xive: Enforce load-after-store ordering, Cédric Le Goater, 2020/10/05
[PATCH v2 3/6] spapr/xive: Add a warning when StoreEOI is activated on POWER9 CPUs,
Cédric Le Goater <=
[PATCH v2 2/6] spapr/xive: Add a warning when StoreEOI is activated on POWER8 CPUs, Cédric Le Goater, 2020/10/05
[PATCH v2 1/6] spapr/xive: Introduce a StoreEOI capability, Cédric Le Goater, 2020/10/05