Re: [PATCH v17 02/13] perf/x86, KVM: Prevent host debug register leak into guest OS on NMI

From: Peter Zijlstra

Date: Wed Sep 23 2026 - 05:07:07 EST


On Tue, Sep 22, 2026 at 01:25:07PM +0900, Masami Hiramatsu (Google) wrote:
> From: Masami Hiramatsu (Google) <mhiramat@xxxxxxxxxx>
>
> When KVM enters a guest OS, host hardware breakpoints are disabled
> before running the guest. However, an NMI can occur while executing
> in guest mode or during guest transition, where
> arch_install_hw_breakpoint() can be invoked from NMI context.

How? AFAICT perf doesn't do that. arch_install_hw_breakpoint() is called
through pmu::add() which is strictly IPI context.