linux-stable/arch/arm64
Marc Zyngier 14ca930d82 KVM: arm64: Correctly access TCR2_EL1, PIR_EL1, PIRE0_EL1 with VHE
For code that accesses any of the guest registers for emulation
purposes, it is crucial to know where the most up-to-date data is.

While this is pretty clear for nVHE (memory is the sole repository),
things are a lot muddier for VHE, as depending on the SYSREGS_ON_CPU
flag, registers can either be loaded on the HW or be in memory.

Even worse with NV, where the loaded state is by definition partial.

For these reasons, KVM offers the vcpu_read_sys_reg() and
vcpu_write_sys_reg() primitives that always do the right thing.
However, these primitive must know what register to access, and
this is the role of the __vcpu_read_sys_reg_from_cpu() and
__vcpu_write_sys_reg_to_cpu() helpers.

As it turns out, TCR2_EL1, PIR_EL1, PIRE0_EL1 and not described
in the latter helpers, meaning that the AT code cannot use them
to emulate S1PIE.

Add the three registers to the (long) list.

Fixes: 86f9de9db1 ("KVM: arm64: Save/restore PIE registers")
Signed-off-by: Marc Zyngier <maz@kernel.org>
Cc: Joey Gouly <joey.gouly@arm.com>
Reviewed-by: Joey Gouly <joey.gouly@arm.com>
Link: https://lore.kernel.org/r/20241023145345.1613824-9-maz@kernel.org
Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
2024-10-31 02:42:30 +00:00
..
boot arm64: dts: marvell: cn9130-sr-som: fix cp0 mdio pin numbers 2024-10-07 10:05:35 +02:00
configs i2c-for-6.12-rc1 2024-09-23 14:34:19 -07:00
crypto move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
hyperv x86/hyperv: Use Hyper-V entropy to seed guest random number generator 2024-03-18 22:01:52 +00:00
include KVM: arm64: Correctly access TCR2_EL1, PIR_EL1, PIRE0_EL1 with VHE 2024-10-31 02:42:30 +00:00
kernel ARM64: 2024-10-21 11:22:04 -07:00
kvm KVM: arm64: nv: Save/Restore vEL2 sysregs 2024-10-31 02:42:30 +00:00
lib arm64: crypto: use CC_FLAGS_FPU for NEON CFLAGS 2024-05-19 14:36:18 -07:00
mm dma-mapping updates for linux 6.12 2024-09-19 11:12:49 +02:00
net bpf, arm64: Fix address emission with tag-based KASAN enabled 2024-10-21 09:45:19 +02:00
tools arm64: Add encoding for PIRE0_EL2 2024-10-31 02:42:29 +00:00
xen
Kbuild
Kconfig arm64: fix selection of HAVE_DYNAMIC_FTRACE_WITH_ARGS 2024-10-01 12:47:19 +01:00
Kconfig.debug
Kconfig.platforms Updates for the interrupt subsystem: 2024-07-22 13:52:05 -07:00
Makefile arm64: Force position-independent veneers 2024-10-01 12:46:27 +01:00