]> www.infradead.org Git - users/jedix/linux-maple.git/commit
KVM: arm64: Unify UNDEF injection helpers
authorMarc Zyngier <maz@kernel.org>
Tue, 27 Aug 2024 15:25:16 +0000 (16:25 +0100)
committerMarc Zyngier <maz@kernel.org>
Tue, 27 Aug 2024 17:32:56 +0000 (18:32 +0100)
commitcd08d3216fc4e684f05fe4cf696a275a975f6499
tree413bb47904e8a549eb1baf5729e36fe1f28d6528
parent4a999a1d7ae52592723a9a219aaa7a3406d66dd6
KVM: arm64: Unify UNDEF injection helpers

We currently have two helpers (undef_access() and trap_undef()) that
do exactly the same thing: inject an UNDEF and return 'false' (as an
indication that PC should not be incremented).

We definitely could do with one less. Given that undef_access() is
used 80ish times, while trap_undef() is only used 30 times, the
latter loses the battle and is immediately sacrificed.

We also have a large number of instances where undef_access() is
open-coded. Let's also convert those.

Reviewed-by: Oliver Upton <oliver.upton@linux.dev>
Link: https://lore.kernel.org/r/20240827152517.3909653-11-maz@kernel.org
Signed-off-by: Marc Zyngier <maz@kernel.org>
arch/arm64/kvm/sys_regs.c