KVM: arm64: nv: Add sanitising to VNCR-backed FGT sysregs
authorMarc Zyngier <maz@kernel.org>
Wed, 14 Feb 2024 13:18:06 +0000 (13:18 +0000)
committerOliver Upton <oliver.upton@linux.dev>
Mon, 19 Feb 2024 17:13:00 +0000 (17:13 +0000)
commit11adda4010ba332d9977c98faf1848625348fe40
treec5afe8263c0c18ff5c153e28c2887ae924f43726
parent81ffcace31c24b79d2891d72b3f892dd2b5937d9
KVM: arm64: nv: Add sanitising to VNCR-backed FGT sysregs

Fine Grained Traps are controlled by a whole bunch of features.
Each one of them must be checked and the corresponding masks
computed so that we don't let the guest apply traps it shouldn't
be using.

This takes care of HFG[IRW]TR_EL2, HDFG[RW]TR_EL2, and HAFGRTR_EL2.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Reviewed-by: Joey Gouly <joey.gouly@arm.com>
Link: https://lore.kernel.org/r/20240214131827.2856277-6-maz@kernel.org
Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
arch/arm64/kvm/nested.c