]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: arm64: Plumb cp10 ID traps through the AArch64 sysreg handler
authorOliver Upton <oupton@google.com>
Tue, 3 May 2022 06:02:02 +0000 (06:02 +0000)
committerMarc Zyngier <maz@kernel.org>
Tue, 3 May 2022 10:14:34 +0000 (11:14 +0100)
commitb41a17351de2d7d776f7d2ce66293a88f1a620c3
tree464983c7edc9a6f52eef313cc6f8dcd313eb895d
parent21dbafd225c0bd93a8b1f89751eb56bc169b2f38
KVM: arm64: Plumb cp10 ID traps through the AArch64 sysreg handler

In order to enable HCR_EL2.TID3 for AArch32 guests KVM needs to handle
traps where ESR_EL2.EC=0x8, which corresponds to an attempted VMRS
access from an ID group register. Specifically, the MVFR{0-2} registers
are accessed this way from AArch32. Conveniently, these registers are
architecturally mapped to MVFR{0-2}_EL1 in AArch64. Furthermore, KVM
already handles reads to these aliases in AArch64.

Plumb VMRS read traps through to the general AArch64 system register
handler.

Signed-off-by: Oliver Upton <oupton@google.com>
Reviewed-by: Reiji Watanabe <reijiw@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20220503060205.2823727-5-oupton@google.com
arch/arm64/include/asm/kvm_host.h
arch/arm64/kvm/handle_exit.c
arch/arm64/kvm/sys_regs.c