]> www.infradead.org Git - users/dwmw2/linux.git/commit
KVM: arm64: Flush/sync debug state in protected mode
authorOliver Upton <oliver.upton@linux.dev>
Fri, 31 Jan 2025 22:29:24 +0000 (22:29 +0000)
committerMarc Zyngier <maz@kernel.org>
Sat, 1 Feb 2025 09:31:11 +0000 (09:31 +0000)
commit0f1a6c5c9784eff7e31e4915e17285fb89ad3644
tree99d19bee40c2f5c482521822a5cfc8425978ecd5
parent9bcbb6104a344d3526e185ee1e7b985509914e90
KVM: arm64: Flush/sync debug state in protected mode

The recent changes to debug state management broke self-hosted debug for
guests when running in protected mode, since both the debug owner and
the debug state itself aren't shared with the hyp's view of the vcpu.

Fix it by flushing/syncing the relevant bits with the hyp vcpu.

Fixes: beb470d96cec ("KVM: arm64: Use debug_owner to track if debug regs need save/restore")
Reported-by: Mark Brown <broonie@kernel.org>
Closes: https://lore.kernel.org/kvmarm/5f62740f-a065-42d9-9f56-8fb648b9c63f@sirena.org.uk/
Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
Link: https://lore.kernel.org/r/20250131222922.1548780-3-oliver.upton@linux.dev
Signed-off-by: Marc Zyngier <maz@kernel.org>
arch/arm64/kvm/hyp/nvhe/hyp-main.c