summaryrefslogtreecommitdiff
path: root/arch/arm64/include/asm/kvm_arm.h
diff options
context:
space:
mode:
authorJintack Lim <jintack.lim@linaro.org>2023-02-09 17:58:10 +0000
committerOliver Upton <oliver.upton@linux.dev>2023-02-11 09:16:11 +0000
commit6ff9dc238a53f4554d97b561fe4e8467d86544d9 (patch)
treeeda014e2444891faf29b7a2b4a22b6d42b26de54 /arch/arm64/include/asm/kvm_arm.h
parent0043b29038e23573f529d8cd7c32967c2b6b976d (diff)
KVM: arm64: nv: Handle HCR_EL2.NV system register traps
ARM v8.3 introduces a new bit in the HCR_EL2, which is the NV bit. When this bit is set, accessing EL2 registers in EL1 traps to EL2. In addition, executing the following instructions in EL1 will trap to EL2: tlbi, at, eret, and msr/mrs instructions to access SP_EL1. Most of the instructions that trap to EL2 with the NV bit were undef at EL1 prior to ARM v8.3. The only instruction that was not undef is eret. This patch sets up a handler for EL2 registers and SP_EL1 register accesses at EL1. The host hypervisor keeps those register values in memory, and will emulate their behavior. This patch doesn't set the NV bit yet. It will be set in a later patch once nested virtualization support is completed. Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Signed-off-by: Jintack Lim <jintack.lim@linaro.org> [maz: EL2_REG() macros] Signed-off-by: Marc Zyngier <maz@kernel.org> Link: https://lore.kernel.org/r/20230209175820.1939006-9-maz@kernel.org Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
Diffstat (limited to 'arch/arm64/include/asm/kvm_arm.h')
0 files changed, 0 insertions, 0 deletions