Re: [PATCH 0/2] KVM: arm64: Fix host-directed debug for non-protected pKVM guests
From: Oliver Upton
Date: Fri Jul 31 2026 - 14:57:06 EST
On Sun, 26 Jul 2026 15:36:41 +0100, Fuad Tabba wrote:
> Under pKVM, host-directed hardware debug of a non-protected guest
> (KVM_GUESTDBG_USE_HW) and userspace single-step never fire.
>
> When the host owns the debug registers, the world switch loads
> MDSCR_EL1 from external_mdscr_el1, where the host's MDE/KDE/SS bits
> live. flush_debug_state() copies the guest's debug_owner and the
> owner-selected debug register state to the hyp vCPU, but not
> external_mdscr_el1, so the field reaches hardware as zero and the debug
> exceptions stay disabled. Patch 1 propagates it.
>
> [...]
Applied to next, thanks!
[1/2] KVM: arm64: Flush external_mdscr_el1 to the pKVM hyp vCPU
https://git.kernel.org/kvmarm/kvmarm/c/119a9a23fbae
[2/2] KVM: arm64: selftests: Add a userspace watchpoint test
https://git.kernel.org/kvmarm/kvmarm/c/3be99f8751c9
--
Best,
Oliver