Brad Bishop | bec4ebc | 2022-08-03 09:55:16 -0400 | [diff] [blame] | 1 | Upstream-Status: Inappropriate |
| 2 | Signed-off-by: Andre Przywara <andre.przywara@arm.com> |
| 3 | |
| 4 | From d20f5afffadcdbaca7032f547cce80720d8a414a Mon Sep 17 00:00:00 2001 |
| 5 | From: Andre Przywara <andre.przywara@arm.com> |
| 6 | Date: Fri, 17 May 2019 17:39:27 +0100 |
| 7 | Subject: [PATCH 5/5] arm64: kpti: Whitelist early Arm Neoverse N1 revisions |
| 8 | |
| 9 | Early revisions (r1p0) of the Neoverse N1 core did not feature the |
| 10 | CSV3 field in ID_AA64PFR0_EL1 to advertise they are not affected by |
| 11 | the Spectre variant 3 (aka Meltdown) vulnerability. |
| 12 | |
| 13 | Add this particular revision to the whitelist to avoid enabling KPTI. |
| 14 | |
| 15 | Signed-off-by: Andre Przywara <andre.przywara@arm.com> |
| 16 | --- |
| 17 | arch/arm64/kernel/cpufeature.c | 1 + |
| 18 | 1 file changed, 1 insertion(+) |
| 19 | |
| 20 | diff --git a/arch/arm64/kernel/cpufeature.c b/arch/arm64/kernel/cpufeature.c |
| 21 | index 6ec7036ef7e1..ceba98773608 100644 |
| 22 | --- a/arch/arm64/kernel/cpufeature.c |
| 23 | +++ b/arch/arm64/kernel/cpufeature.c |
| 24 | @@ -1509,6 +1509,7 @@ static bool unmap_kernel_at_el0(const struct arm64_cpu_capabilities *entry, |
| 25 | MIDR_ALL_VERSIONS(MIDR_QCOM_KRYO_2XX_SILVER), |
| 26 | MIDR_ALL_VERSIONS(MIDR_QCOM_KRYO_3XX_SILVER), |
| 27 | MIDR_ALL_VERSIONS(MIDR_QCOM_KRYO_4XX_SILVER), |
| 28 | + MIDR_REV(MIDR_NEOVERSE_N1, 1, 0), /* missing CSV3 */ |
| 29 | { /* sentinel */ } |
| 30 | }; |
| 31 | char const *str = "kpti command line option"; |
| 32 | -- |
| 33 | 2.17.1 |
| 34 | |