]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
arm64/sve: Enable SVE state tracking for non-task contexts
authorDave Martin <Dave.Martin@arm.com>
Fri, 28 Sep 2018 13:39:11 +0000 (14:39 +0100)
committerMarc Zyngier <marc.zyngier@arm.com>
Fri, 29 Mar 2019 14:41:52 +0000 (14:41 +0000)
commit0495067420f352a0b8ed37ee412d7dd8e7b95c61
treeecb0edab99252da80d37c0b6c5ddc53ac606e43b
parentd06b76be8dad2e2fa62f68264887cc295d67a3ef
arm64/sve: Enable SVE state tracking for non-task contexts

The current FPSIMD/SVE context handling support for non-task (i.e.,
KVM vcpu) contexts does not take SVE into account.  This means that
only task contexts can safely use SVE at present.

In preparation for enabling KVM guests to use SVE, it is necessary
to keep track of SVE state for non-task contexts too.

This patch adds the necessary support, removing assumptions from
the context switch code about the location of the SVE context
storage.

When binding a vcpu context, its vector length is arbitrarily
specified as SVE_VL_MIN for now.  In any case, because TIF_SVE is
presently cleared at vcpu context bind time, the specified vector
length will not be used for anything yet.  In later patches TIF_SVE
will be set here as appropriate, and the appropriate maximum vector
length for the vcpu will be passed when binding.

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