arm64/sve: Check SVE virtualisability
authorDave Martin <Dave.Martin@arm.com>
Fri, 28 Sep 2018 13:39:10 +0000 (14:39 +0100)
committerMarc Zyngier <marc.zyngier@arm.com>
Fri, 29 Mar 2019 14:41:52 +0000 (14:41 +0000)
commitd06b76be8dad2e2fa62f68264887cc295d67a3ef
tree38203fa633b3e90e6d6e0c95eb766520fb5b30f3
parent8b08e8401fb49fe1274a91bb5fa981c2f819589c
arm64/sve: Check SVE virtualisability

Due to the way the effective SVE vector length is controlled and
trapped at different exception levels, certain mismatches in the
sets of vector lengths supported by different physical CPUs in the
system may prevent straightforward virtualisation of SVE at parity
with the host.

This patch analyses the extent to which SVE can be virtualised
safely without interfering with migration of vcpus between physical
CPUs, and rejects late secondary CPUs that would erode the
situation further.

It is left up to KVM to decide what to do with this information.

Signed-off-by: Dave Martin <Dave.Martin@arm.com>
Reviewed-by: Julien Thierry <julien.thierry@arm.com>
Tested-by: zhang.lei <zhang.lei@jp.fujitsu.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
arch/arm64/include/asm/fpsimd.h
arch/arm64/kernel/cpufeature.c
arch/arm64/kernel/fpsimd.c