KVM: arm64: Explicitly trap unsupported HFGxTR_EL2 features
authorFuad Tabba <tabba@google.com>
Thu, 14 Dec 2023 10:01:45 +0000 (10:01 +0000)
committerMarc Zyngier <maz@kernel.org>
Mon, 18 Dec 2023 09:22:32 +0000 (09:22 +0000)
commit1565c881c3df053447309ff69ec7fd5dee2085e4
tree2b65e8194a5bf33b54e461e96c4afa915e5becaf
parente32afede682ee6c3ad2f1990967dc90dac51b9f6
KVM: arm64: Explicitly trap unsupported HFGxTR_EL2 features

Do not rely on the value of __HFGRTR_EL2_nMASK to trap
unsupported features, since the nMASK can (and will) change as
new traps are added and as its value is updated. Instead,
explicitly specify the trap bits.

Suggested-by: Joey Gouly <joey.gouly@arm.com>
Signed-off-by: Fuad Tabba <tabba@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20231214100158.2305400-6-tabba@google.com
arch/arm64/kvm/hyp/include/hyp/switch.h