KVM: arm64: Register AArch64 system register entries with the sysreg xarray
authorMarc Zyngier <maz@kernel.org>
Wed, 14 Feb 2024 13:18:15 +0000 (13:18 +0000)
committerOliver Upton <oliver.upton@linux.dev>
Mon, 19 Feb 2024 17:13:01 +0000 (17:13 +0000)
commit19f3e7ea29f8f485f06b47f7c38f9e9e81013ada
treebcd376abcdae27bc1cf9228641eba4dd74b6e24e
parent7fd498f473f121db10997d720628423e6538f3b7
KVM: arm64: Register AArch64 system register entries with the sysreg xarray

In order to reduce the number of lookups that we have to perform
when handling a sysreg, register each AArch64 sysreg descriptor
with the global xarray. The index of the descriptor is stored
as a 10 bit field in the data word.

Subsequent patches will retrieve and use the stored index.

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