On Wed, 23 Sep 2026 07:33:15 -0700
Sean Christopherson <[email protected]> wrote:

> On Wed, Sep 23, 2026, Peter Zijlstra wrote:
> > On Tue, Sep 22, 2026 at 01:25:07PM +0900, Masami Hiramatsu (Google) wrote:
> > > From: Masami Hiramatsu (Google) <[email protected]>
> > > 
> > > 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.
> 
> I assume it's:
> 
>   kgdb_nmi_handler()
>   |
>   -> kgdb_nmicallin()
>      |
>      -> kgdb_cpu_enter()
>         |
>         -> arch_kgdb_ops.correct_hw_break()
>            |
>            -> kgdb_correct_hw_break()
>               |
>               -> arch_install_hw_breakpoint()

Yes, it is done by KGDB. perf has no problem with it.

Thank you,

-- 
Masami Hiramatsu (Google) <[email protected]>

Reply via email to