KVM: arm64: Refactor HFGxTR configuration into separate helpers
authorOliver Upton <oliver.upton@linux.dev>
Fri, 9 Jun 2023 22:01:03 +0000 (22:01 +0000)
committerOliver Upton <oliver.upton@linux.dev>
Fri, 16 Jun 2023 00:31:44 +0000 (00:31 +0000)
commitce4a36225753a1a5f3641bff47ecd32fb394dd22
tree3049186627a129fa044afe5a5e90ca3cc71a5c9b
parent6df696cd9bc1ceed0e92e36908f88bbd16d18255
KVM: arm64: Refactor HFGxTR configuration into separate helpers

A subsequent change will need to flip more trap bits in HFGWTR_EL2. Make
room for this by factoring out the programming of the HFGxTR registers
into helpers and using locals to build the set/clear masks.

Link: https://lore.kernel.org/r/20230609220104.1836988-3-oliver.upton@linux.dev
Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
arch/arm64/kvm/hyp/include/hyp/switch.h