Re: [PATCH 0/6] perf/x86/intel/pt: Fix tracing across kexec, kdump and suspend

From: Adrian Hunter

Date: Mon Nov 02 2026 - 07:43:24 EST


On 02/11/2026 12:10, Peter Zijlstra wrote:
> On Mon, Nov 02, 2026 at 09:40:33AM +0200, Adrian Hunter wrote:
>> Hi
>>
>> Intel PT writes trace data directly to physical memory, so tracing must
>> be stopped whenever the trace buffers or the hardware state describing
>> them can no longer be relied on. This series fixes several cases where
>> that does not currently happen:
>
> Same is true for PEBS, no? I also saw that AMD/IBS is already

Yes, PEBS and BTS

> registering a syscore handler.
>
> Perhaps it should be a perf wide thing, than than having individual bits
> and pieces do their own thing?

As mentioned in the cover letter, perf core could schedule out/in for
syscore suspend/resume, and that would negate the need for "[PATCH 6/6]
perf/x86/intel/pt: Stop tracing across system suspend"

perf core could handle shutdown too, but it also needs to consider how
to stop events from starting again.

If that were done, that would mean the syscore ->shutdown() in
"[PATCH 3/6] perf/x86/intel/pt: Stop tracing at syscore shutdown"
would not be needed, but the other code would move to "[PATCH 4/6]
perf/x86/intel/pt: Clear TraceEn in hardware in cpu_emergency_stop_pt()".