]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
arm64: Make use of ARCH_WORKAROUND_1 even when KVM is not enabled
authorMarc Zyngier <maz@kernel.org>
Thu, 16 Jul 2020 16:11:08 +0000 (17:11 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 29 Oct 2020 09:10:58 +0000 (10:10 +0100)
commit b11483ef5a502663732c6ca1b58d14ff9eedd6f7 upstream.

We seem to be pretending that we don't have any firmware mitigation
when KVM is not compiled in, which is not quite expected.

Bring back the mitigation in this case.

Fixes: 4db61fef16a1 ("arm64: kvm: Modernize __smccc_workaround_1_smc_start annotations")
Cc: <stable@vger.kernel.org>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/arm64/kernel/cpu_errata.c

index 560ba69e13c11b0fccd018fe0cba0e76b8edd292..fe3a7695a4202f4c54b39a0a1b17f3a04b4dc7e1 100644 (file)
@@ -234,14 +234,17 @@ static int detect_harden_bp_fw(void)
                smccc_end = NULL;
                break;
 
-#if IS_ENABLED(CONFIG_KVM)
        case SMCCC_CONDUIT_SMC:
                cb = call_smc_arch_workaround_1;
+#if IS_ENABLED(CONFIG_KVM)
                smccc_start = __smccc_workaround_1_smc;
                smccc_end = __smccc_workaround_1_smc +
                        __SMCCC_WORKAROUND_1_SMC_SZ;
-               break;
+#else
+               smccc_start = NULL;
+               smccc_end = NULL;
 #endif
+               break;
 
        default:
                return -1;