KVM: arm64: Always set HCR_TID2
authorAkihiko Odaki <akihiko.odaki@daynix.com>
Thu, 12 Jan 2023 02:38:50 +0000 (11:38 +0900)
committerOliver Upton <oliver.upton@linux.dev>
Thu, 12 Jan 2023 21:07:43 +0000 (21:07 +0000)
commit8cc6dedaff424d8a9bb6687a7b5763a5eeee125b
treeee1f42a2735ab1f33998081ef08dc16d050319fa
parent805e6ec1c5e0ba4919a569535d63d2113dc17fed
KVM: arm64: Always set HCR_TID2

Always set HCR_TID2 to trap CTR_EL0, CCSIDR2_EL1, CLIDR_EL1, and
CSSELR_EL1. This saves a few lines of code and allows to employ their
access trap handlers for more purposes anticipated by the old
condition for setting HCR_TID2.

Suggested-by: Marc Zyngier <maz@kernel.org>
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Reviewed-by: Reiji Watanabe <reijiw@google.com>
Link: https://lore.kernel.org/r/20230112023852.42012-6-akihiko.odaki@daynix.com
Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
arch/arm64/include/asm/kvm_arm.h
arch/arm64/include/asm/kvm_emulate.h
arch/arm64/include/asm/kvm_host.h
arch/arm64/kvm/hyp/include/hyp/sysreg-sr.h