]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: Drop early setting of MDSCR_EL2.TPMS
authorMarc Zyngier <maz@kernel.org>
Mon, 8 Feb 2021 09:57:15 +0000 (09:57 +0000)
committerWill Deacon <will@kernel.org>
Tue, 9 Feb 2021 13:47:11 +0000 (13:47 +0000)
commit0b705d1b66202de221e1348b19e72322dfc1e772
treee138e4705e17f09c904d61ece0ca90202d248ec9
parent9903f14f368d4b839bd587fff6df3e1df02ba789
arm64: Drop early setting of MDSCR_EL2.TPMS

When running VHE, we set MDSCR_EL2.TPMS very early on to force
the trapping of EL1 SPE accesses to EL2.

However:
- we are running with HCR_EL2.{E2H,TGE}={1,1}, meaning that there
  is no EL1 to trap from

- before entering a guest, we call kvm_arm_setup_debug(), which
  sets MDCR_EL2_TPMS in the per-vcpu shadow mdscr_el2, which gets
  applied on entry by __activate_traps_common().

The early setting of MDSCR_EL2.TPMS is therefore useless and can
be dropped.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20210208095732.3267263-7-maz@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>
arch/arm64/include/asm/el2_setup.h