arm64: KVM: Report SMCCC_ARCH_WORKAROUND_1 BP hardening support
authorMarc Zyngier <marc.zyngier@arm.com>
Tue, 6 Feb 2018 17:56:14 +0000 (17:56 +0000)
committerHaibo Chen <haibo.chen@nxp.com>
Thu, 12 Apr 2018 10:46:32 +0000 (18:46 +0800)
commit9d7ea762c59151d658be61f0222114190d795c11
tree0952baefde18e6dd5bdac98e3e43848222d46b7b
parent56ebd7307e0fe8b230011eb911fc8b38f9d51d09
arm64: KVM: Report SMCCC_ARCH_WORKAROUND_1 BP hardening support

commit 6167ec5c9145 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>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Alex Shi <alex.shi@linaro.org>
Conflicts:
no sve support in arch/arm64/include/asm/kvm_host.h
mv changes from virt/kvm/arm/psci.c to arch/arm/kvm/psci.c
using cpus_have_cap instead of cpus_have_const_cap
arch/arm/include/asm/kvm_host.h
arch/arm/kvm/psci.c
arch/arm64/include/asm/kvm_host.h
include/linux/arm-smccc.h