OSDN Git Service

arm64: KVM: Report SMCCC_ARCH_WORKAROUND_1 BP hardening support
authorMark Rutland <mark.rutland@arm.com>
Thu, 12 Apr 2018 11:11:31 +0000 (12:11 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 20 Apr 2018 06:21:05 +0000 (08:21 +0200)
commitc9ae3d5717bf14c05299f184c4bfee79e9a22efe
tree56e038254767f70d46c1bed63961d0c41aaf3519
parent142cfd60faba9cfa34adc1a3cf7e184a8066c12f
arm64: KVM: Report SMCCC_ARCH_WORKAROUND_1 BP hardening support

From: Marc Zyngier <marc.zyngier@arm.com>

commit 6167ec5c9145cdf493722dfd80a5d48bafc4a18a upstream.

A new feature of SMCCC 1.1 is that it offers firmware-based CPU
workarounds. In particular, SMCCC_ARCH_WORKAROUND_1 provides
BP hardening for CVE-2017-5715.

If the host has some mitigation for this issue, report that
we deal with it using SMCCC_ARCH_WORKAROUND_1, as we apply the
host workaround on every guest exit.

Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
[v4.9: account for files moved to virt/ upstream]
Signed-off-by: Mark Rutland <mark.rutland@arm.com> [v4.9 backport]
Tested-by: Greg Hackmann <ghackmann@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/arm/include/asm/kvm_host.h
arch/arm/kvm/psci.c
arch/arm64/include/asm/kvm_host.h
include/linux/arm-smccc.h