arm64: Advertise mitigation of Spectre-v2, or lack thereof
authorMarc Zyngier <marc.zyngier@arm.com>
Mon, 15 Apr 2019 21:21:23 +0000 (16:21 -0500)
committerWill Deacon <will.deacon@arm.com>
Fri, 26 Apr 2019 15:29:15 +0000 (16:29 +0100)
commit73f38166095947f3b86b02fbed6bd592223a7ac8
tree16032db50050c80804cda45bcc8258af81a13a86
parent1b3ccf4be0e7be8c4bd8522066b6cbc92591e912
arm64: Advertise mitigation of Spectre-v2, or lack thereof

We currently have a list of CPUs affected by Spectre-v2, for which
we check that the firmware implements ARCH_WORKAROUND_1. It turns
out that not all firmwares do implement the required mitigation,
and that we fail to let the user know about it.

Instead, let's slightly revamp our checks, and rely on a whitelist
of cores that are known to be non-vulnerable, and let the user know
the status of the mitigation in the kernel log.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Tested-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
arch/arm64/kernel/cpu_errata.c