KVM: arm64: Use the xarray as the primary sysreg/sysinsn walker
authorMarc Zyngier <maz@kernel.org>
Wed, 14 Feb 2024 13:18:16 +0000 (13:18 +0000)
committerOliver Upton <oliver.upton@linux.dev>
Mon, 19 Feb 2024 17:13:01 +0000 (17:13 +0000)
commitcc5f84fbb008ff0904e0a8c0fb207cee2eb99bc9
tree42c8c9ccaf40dfc3f41dabaa1c7c82860321beb0
parent19f3e7ea29f8f485f06b47f7c38f9e9e81013ada
KVM: arm64: Use the xarray as the primary sysreg/sysinsn walker

Since we always start sysreg/sysinsn handling by searching the
xarray, use it as the source of the index in the correct sys_reg_desc
array.

This allows some cleanup, such as moving the handling of unknown
sysregs in a single location.

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