Re: [PATCH 0/2] KVM: arm64: Fix host-directed debug for non-protected pKVM guests

Oliver Upton <[email protected]> Fri, 31 Jul 2026 11:51:45 -0700
Newsgroups dev.linux.lists.kvmarm,org.infradead.lists.linux-arm-kernel,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
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