]> www.infradead.org Git - users/jedix/linux-maple.git/commit
KVM: arm64: nv: Map VNCR-capable registers to a separate page
authorMarc Zyngier <maz@kernel.org>
Wed, 26 Jun 2019 18:59:56 +0000 (19:59 +0100)
committerMarc Zyngier <maz@kernel.org>
Tue, 19 Dec 2023 10:02:42 +0000 (10:02 +0000)
commitd8bd48e3f0ee9e1fdba2a2e453155a5354e48a8d
tree5c78be6dc1ce2b44e5834ff16c668f97d5b177e0
parent9b9cce60be85e6807bdb0eaa2f520e78dbab0659
KVM: arm64: nv: Map VNCR-capable registers to a separate page

With ARMv8.4-NV, registers that can be directly accessed in memory
by the guest have to live at architected offsets in a special page.

Let's annotate the sysreg enum to reflect the offset at which they
are in this page, whith a little twist:

If running on HW that doesn't have the ARMv8.4-NV feature, or even
a VM that doesn't use NV, we store all the system registers in the
usual sys_regs array. The only difference with the pre-8.4
situation is that VNCR-capable registers are at a "similar" offset
as in the VNCR page (we can compute the actual offset at compile
time), and that the sys_regs array is both bigger and sparse.

Reviewed-by: Oliver Upton <oliver.upton@linux.dev>
Signed-off-by: Marc Zyngier <maz@kernel.org>
arch/arm64/include/asm/kvm_host.h