KVM: arm64: nv: Correctly handle negative polarity FGTs
authorMarc Zyngier <maz@kernel.org>
Wed, 14 Feb 2024 13:18:10 +0000 (13:18 +0000)
committerOliver Upton <oliver.upton@linux.dev>
Mon, 19 Feb 2024 17:13:00 +0000 (17:13 +0000)
commit9958d58779c92b72ef5b29284d073ecaa2a28764
tree46f22018097d5d1ca4e88be3936850a61fcfcaba
parent0beb14de740df93a5af0edc0bd4941dc037e6688
KVM: arm64: nv: Correctly handle negative polarity FGTs

Negative trap bits are a massive pain. They are, on the surface,
indistinguishable from RES0 bits. Do you trap? or do you ignore?

Thankfully, we now have the right infrastructure to check for RES0
bits as long as the register is backed by VNCR, which is the case
for the FGT registers.

Use that information as a discriminant when handling a trap that
is potentially caused by a FGT.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20240214131827.2856277-10-maz@kernel.org
Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
arch/arm64/kvm/emulate-nested.c