]> www.infradead.org Git - users/jedix/linux-maple.git/commit
KVM: arm64: Switch to table-driven FGU configuration
authorMarc Zyngier <maz@kernel.org>
Sun, 9 Feb 2025 14:05:01 +0000 (14:05 +0000)
committerMarc Zyngier <maz@kernel.org>
Sat, 10 May 2025 10:04:35 +0000 (11:04 +0100)
commit63d423a7635bca6d817a30adff29be58ee99c6d5
tree9b717e30f9b28460527d64faad46e2151171bd0b
parent397411c743c77a9c1d90f407b502010227a259dc
KVM: arm64: Switch to table-driven FGU configuration

Defining the FGU behaviour is extremely tedious. It relies on matching
each set of bits from FGT registers with am architectural feature, and
adding them to the FGU list if the corresponding feature isn't advertised
to the guest.

It is however relatively easy to dump most of that information from
the architecture JSON description, and use that to control the FGU bits.

Let's introduce a new set of tables descripbing the mapping between
FGT bits and features. Most of the time, this is only a lookup in
an idreg field, with a few more complex exceptions.

While this is obviously many more lines in a new file, this is
mostly generated, and is pretty easy to maintain.

Reviewed-by: Joey Gouly <joey.gouly@arm.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
arch/arm64/include/asm/kvm_host.h
arch/arm64/kvm/Makefile
arch/arm64/kvm/config.c [new file with mode: 0644]
arch/arm64/kvm/sys_regs.c