]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: KVM: Trap VM ops when ARM64_WORKAROUND_CAVIUM_TX2_219_TVM is set
authorMarc Zyngier <marc.zyngier@arm.com>
Thu, 7 Feb 2019 16:01:21 +0000 (16:01 +0000)
committerWill Deacon <will@kernel.org>
Tue, 8 Oct 2019 11:25:03 +0000 (12:25 +0100)
commitc1e00df92be66dc23d0fdf95cc67e95439d1c53b
treeb2a7d312cb9bbafbfe0564a59fdc1ef0d1b2a411
parent52b7759f73b03afc7cba59d3686ec69261291235
arm64: KVM: Trap VM ops when ARM64_WORKAROUND_CAVIUM_TX2_219_TVM is set

In order to workaround the TX2-219 erratum, it is necessary to trap
TTBRx_EL1 accesses to EL2. This is done by setting HCR_EL2.TVM on
guest entry, which has the side effect of trapping all the other
VM-related sysregs as well.

To minimize the overhead, a fast path is used so that we don't
have to go all the way back to the main sysreg handling code,
unless the rest of the hypervisor expects to see these accesses.

Cc: <stable@vger.kernel.org>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Will Deacon <will@kernel.org>
arch/arm64/include/asm/cpucaps.h
arch/arm64/kvm/hyp/switch.c