Commit 5a5d2a51 authored by Marc Zyngier's avatar Marc Zyngier Committed by Treehugger Robot
Browse files

UPSTREAM: KVM: arm64: Always start with clearing SVE flag on load



On each vcpu load, we set the KVM_ARM64_HOST_SVE_ENABLED
flag if SVE is enabled for EL0 on the host. This is used to restore
the correct state on vpcu put.

However, it appears that nothing ever clears this flag. Once
set, it will stick until the vcpu is destroyed, which has the
potential to spuriously enable SVE for userspace.

We probably never saw the issue because no VMM uses SVE, but
that's still pretty bad. Unconditionally clearing the flag
on vcpu load addresses the issue.

Bug: 254441685
Fixes: 8383741a ("KVM: arm64: Get rid of host SVE tracking/saving")
Signed-off-by: default avatarMarc Zyngier <maz@kernel.org>
Cc: stable@vger.kernel.org
Reviewed-by: default avatarMark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220528113829.1043361-2-maz@kernel.org


(cherry picked from commit d52d165d)
Signed-off-by: default avatarLee Jones <joneslee@google.com>
Change-Id: Ib7f7b912890f91b6b24dc835d170a7ff3f4d827a
parent 7a0652b4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment