]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
KVM: arm64: Simplify handling of negative FGT bits
authorMarc Zyngier <maz@kernel.org>
Sat, 26 Apr 2025 11:05:04 +0000 (12:05 +0100)
committerMarc Zyngier <maz@kernel.org>
Tue, 6 May 2025 16:35:09 +0000 (17:35 +0100)
commit4b4af68dd972aedc4193bd886e383c123511d275
tree1dde5e0a5efaaa7d0c1273053b5edd8d9c3a351a
parent04af8a39684f471e3785261f5d2f0df265fd77b6
KVM: arm64: Simplify handling of negative FGT bits

check_fgt_bit() and triage_sysreg_trap() implement the same thing
twice for no good reason. We have to lookup the FGT register twice,
as we don't communicate it. Similarly, we extract the register value
at the wrong spot.

Reorganise the code in a more logical way so that things are done
at the correct location, removing a lot of duplication.

Reviewed-by: Joey Gouly <joey.gouly@arm.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
arch/arm64/kvm/emulate-nested.c