]> www.infradead.org Git - users/dwmw2/linux.git/commit
KVM: arm64: Reload vCPU for accesses to OSLAR_EL1
authorOliver Upton <oliver.upton@linux.dev>
Thu, 19 Dec 2024 22:41:09 +0000 (14:41 -0800)
committerMarc Zyngier <maz@kernel.org>
Fri, 20 Dec 2024 09:01:25 +0000 (09:01 +0000)
commit06d22a9c1b94006ebfa67693a38baed86b9a75e8
treec51bd30335aa3e89002d966f6565c050599c8776
parentbeb470d96cec8dd8f4e05b2135c74d828f7b114b
KVM: arm64: Reload vCPU for accesses to OSLAR_EL1

KVM takes ownership of the debug regs if the guest enables the OS lock,
as it needs to use MDSCR_EL1 to mask debug exceptions. Just reload the
vCPU if the guest toggles the OS lock, relying on kvm_vcpu_load_debug()
to update the debug owner and get the right trap configuration in place.

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-13-oliver.upton@linux.dev
Signed-off-by: Marc Zyngier <maz@kernel.org>
arch/arm64/include/asm/kvm_host.h
arch/arm64/kvm/debug.c
arch/arm64/kvm/sys_regs.c