KVM: arm64: Restructure check for SVE support in FP trap handler
authorMark Brown <broonie@kernel.org>
Tue, 7 Mar 2023 17:37:15 +0000 (17:37 +0000)
committerMarc Zyngier <maz@kernel.org>
Fri, 21 Apr 2023 12:46:20 +0000 (13:46 +0100)
commitd071cefdcca39fdbcdd4bf36868448820dbac34b
tree9b8696dbfcd7f2c509ca1af1fa7d58873038c603
parent4c181e3d352e9280c84fb4b4c7a8940ce005374e
KVM: arm64: Restructure check for SVE support in FP trap handler

We share the same handler for general floating point and SVE traps with a
check to make sure we don't handle any SVE traps if the system doesn't
have SVE support. Since we will be adding SME support and wishing to handle
that along with other FP related traps rewrite the check to be more scalable
and a bit clearer too, ensuring we don't misidentify SME traps as SVE ones.

Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20221214-kvm-arm64-sme-context-switch-v2-2-57ba0082e9ff@kernel.org
arch/arm64/kvm/hyp/include/hyp/switch.h