[PATCH v6 07/64] KVM: arm64: nv: Handle HCR_EL2.NV system register traps
Russell King (Oracle)
linux at armlinux.org.uk
Tue Feb 1 06:32:26 PST 2022
On Fri, Jan 28, 2022 at 12:18:15PM +0000, Marc Zyngier wrote:
> From: Jintack Lim <jintack.lim at linaro.org>
>
> 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.
>
> Signed-off-by: Jintack Lim <jintack.lim at linaro.org>
> [maz: EL2_REG() macros]
> Signed-off-by: Marc Zyngier <maz at kernel.org>
Reviewed-by: Russell King (Oracle) <rmk+kernel at armlinux.org.uk>
Thanks!
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!
More information about the linux-arm-kernel
mailing list