KVM: arm64: Compute MDCR_EL2 at vcpu_load()
authorOliver Upton <oliver.upton@linux.dev>
Thu, 19 Dec 2024 22:41:10 +0000 (14:41 -0800)
committerMarc Zyngier <maz@kernel.org>
Fri, 20 Dec 2024 09:01:25 +0000 (09:01 +0000)
commit75a5fbaf6623328d3ac69719145c2247f7b4e299
treeb49242e944f26aef5b414294606fe405ca6822da
parent06d22a9c1b94006ebfa67693a38baed86b9a75e8
KVM: arm64: Compute MDCR_EL2 at vcpu_load()

KVM has picked up several hacks to cope with vcpu->arch.mdcr_el2 needing
to be prepared before vcpu_load(), which is when it gets programmed
into hardware on VHE.

Now that the flows for reprogramming MDCR_EL2 have been simplified, move
that computation to vcpu_load().

Tested-by: James Clark <james.clark@linaro.org>
Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
Link: https://lore.kernel.org/r/20241219224116.3941496-14-oliver.upton@linux.dev
Signed-off-by: Marc Zyngier <maz@kernel.org>
arch/arm64/include/asm/kvm_host.h
arch/arm64/kvm/arm.c
arch/arm64/kvm/debug.c