git: 4fae50ea82e2 - main - amd64/pt.c: Clear ToPa PMI status for stray interrupts

From: Bojan Novković <bnovkov_at_FreeBSD.org>
Date: Tue, 17 Nov 2026 17:44:44 UTC
The branch main has been updated by bnovkov:

URL: https://cgit.FreeBSD.org/src/commit/?id=4fae50ea82e268f463cf2b83fa30e71cb0017f9f

commit 4fae50ea82e268f463cf2b83fa30e71cb0017f9f
Author:     Bojan Novković <bnovkov@FreeBSD.org>
AuthorDate: 2026-11-07 13:19:24 +0000
Commit:     Bojan Novković <bnovkov@FreeBSD.org>
CommitDate: 2026-11-17 17:41:21 +0000

    amd64/pt.c: Clear ToPa PMI status for stray interrupts
    
    An inactive tracing session might encounter stray ToPA PMI
    interrupts, in which case the interrupt handler skips processing
    the interrupt but fails to reset the ToPA status bit.
---
 sys/amd64/pt/pt.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sys/amd64/pt/pt.c b/sys/amd64/pt/pt.c
index 62e5f7ad7d83..f1284f99f67d 100644
--- a/sys/amd64/pt/pt.c
+++ b/sys/amd64/pt/pt.c
@@ -802,6 +802,7 @@ pt_topa_intr(struct trapframe *tf)
 	}
 
 	if (pt_cpu_get_state(curcpu) != PT_ACTIVE) {
+		pt_topa_status_clear();
 		return (1);
 	}
 	atomic_set_int(&cpu->in_pcint_handler, 1);