linux-sg2042/arch/arm64
Dave Martin 07d79fe7c2 arm64/sve: KVM: Hide SVE from CPU features exposed to guests
KVM guests cannot currently use SVE, because SVE is always
configured to trap to EL2.

However, a guest that sees SVE reported as present in
ID_AA64PFR0_EL1 may legitimately expect that SVE works and try to
use it.  Instead of working, the guest will receive an injected
undef exception, which may cause the guest to oops or go into a
spin.

To avoid misleading the guest into believing that SVE will work,
this patch masks out the SVE field from ID_AA64PFR0_EL1 when a
guest attempts to read this register.  No support is explicitly
added for ID_AA64ZFR0_EL1 either, so that is still emulated as
reading as zero, which is consistent with SVE not being
implemented.

This is a temporary measure, and will be removed in a later series
when full KVM support for SVE is implemented.

Signed-off-by: Dave Martin <Dave.Martin@arm.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: Christoffer Dall <christoffer.dall@linaro.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2017-11-03 15:24:20 +00:00
..
boot ARM: arm64: Devicetree updates for v4.14 2017-09-10 20:54:48 -07:00
configs ARM/arm64: SoC platform updates for v4.14 2017-09-10 20:35:46 -07:00
crypto crypto: arm64/aes - avoid expanded lookup tables in the final round 2017-08-04 09:27:26 +08:00
include arm64/sve: KVM: Prevent guests from using SVE 2017-11-03 15:24:19 +00:00
kernel arm64/sve: KVM: Prevent guests from using SVE 2017-11-03 15:24:19 +00:00
kvm arm64/sve: KVM: Hide SVE from CPU features exposed to guests 2017-11-03 15:24:20 +00:00
lib arm64: use WFE for long delays 2017-10-13 18:56:15 +01:00
mm arm64: explicitly mask all exceptions 2017-11-02 15:55:40 +00:00
net bpf, arm64: implement jiting of BPF_J{LT, LE, SLT, SLE} 2017-08-09 16:53:56 -07:00
xen xen/privcmd: Add IOCTL_PRIVCMD_DM_OP 2017-02-14 15:13:43 -05:00
Kconfig arm64/sve: Kconfig update and conditional compilation support 2017-11-03 15:24:14 +00:00
Kconfig.debug arm64: relocation testing module 2017-04-04 17:03:32 +01:00
Kconfig.platforms ARM: arm64: Devicetree updates for v4.14 2017-09-10 20:54:48 -07:00
Makefile arm64: prevent regressions in compressed kernel image size when upgrading to binutils 2.27 2017-10-30 13:45:12 +00:00