arm64/sve: In-kernel vector length availability query interface
authorDave Martin <Dave.Martin@arm.com>
Fri, 28 Sep 2018 13:39:21 +0000 (14:39 +0100)
committerMarc Zyngier <marc.zyngier@arm.com>
Fri, 29 Mar 2019 14:41:54 +0000 (14:41 +0000)
commitead9e430c0fba1a7aa6d948a626c48ef9c4aa069
treef4c9958e218eee29e80cd3e7de44699cf2e0d44f
parent8e3c54c8b6a9286b1571c4a4ba1d4afbd217f297
arm64/sve: In-kernel vector length availability query interface

KVM will need to interrogate the set of SVE vector lengths
available on the system.

This patch exposes the relevant bits to the kernel, along with a
sve_vq_available() helper to check whether a particular vector
length is supported.

__vq_to_bit() and __bit_to_vq() are not intended for use outside
these functions: now that these are exposed outside fpsimd.c, they
are prefixed with __ in order to provide an extra hint that they
are not intended for general-purpose use.

Signed-off-by: Dave Martin <Dave.Martin@arm.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
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/fpsimd.c