* [PATCH v3 0/2] Update mce_record tracepoint @ 2024-01-26 7:57 Avadhut Naik 2024-01-26 7:57 ` [PATCH v3 1/2] tracing: Include PPIN in " Avadhut Naik ` (2 more replies) 0 siblings, 3 replies; 7+ messages in thread From: Avadhut Naik @ 2024-01-26 7:57 UTC (permalink / raw) To: linux-trace-kernel, linux-edac Cc: rostedt, tony.luck, bp, x86, linux-kernel, yazen.ghannam, avadnaik This patchset updates the mce_record tracepoint so that the recently added fields of struct mce are exported through it to userspace. The first patch adds PPIN (Protected Processor Inventory Number) field to the tracepoint. The second patch adds the microcode field (Microcode Revision) to the tracepoint. Changes in v2: - Export microcode field (Microcode Revision) through the tracepoiont in addition to PPIN. Changes in v3: - Change format specifier for microcode revision from %u to %x - Fix tab alignments - Add Reviewed-by: Sohil Mehta <sohil.mehta@intel.com> Avadhut Naik (2): tracing: Include PPIN in mce_record tracepoint tracing: Include Microcode Revision in mce_record tracepoint include/trace/events/mce.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) base-commit: 0d4f19418f067465b0a84a287d9a51e443a0bc3a -- 2.34.1 ^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v3 1/2] tracing: Include PPIN in mce_record tracepoint 2024-01-26 7:57 [PATCH v3 0/2] Update mce_record tracepoint Avadhut Naik @ 2024-01-26 7:57 ` Avadhut Naik 2024-01-26 7:58 ` [PATCH v3 2/2] tracing: Include Microcode Revision " Avadhut Naik 2024-02-08 17:10 ` [PATCH v3 0/2] Update " Steven Rostedt 2 siblings, 0 replies; 7+ messages in thread From: Avadhut Naik @ 2024-01-26 7:57 UTC (permalink / raw) To: linux-trace-kernel, linux-edac Cc: rostedt, tony.luck, bp, x86, linux-kernel, yazen.ghannam, avadnaik Machine Check Error information from struct mce is exported to userspace through the mce_record tracepoint. Currently, however, the PPIN (Protected Processor Inventory Number) field of struct mce is not exported through the tracepoint. Export PPIN through the tracepoint as it may provide useful information for debug and analysis. Signed-off-by: Avadhut Naik <avadhut.naik@amd.com> Reviewed-by: Sohil Mehta <sohil.mehta@intel.com> --- include/trace/events/mce.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/trace/events/mce.h b/include/trace/events/mce.h index 1391ada0da3b..41a5431545e2 100644 --- a/include/trace/events/mce.h +++ b/include/trace/events/mce.h @@ -25,6 +25,7 @@ TRACE_EVENT(mce_record, __field( u64, ipid ) __field( u64, ip ) __field( u64, tsc ) + __field( u64, ppin ) __field( u64, walltime ) __field( u32, cpu ) __field( u32, cpuid ) @@ -45,6 +46,7 @@ TRACE_EVENT(mce_record, __entry->ipid = m->ipid; __entry->ip = m->ip; __entry->tsc = m->tsc; + __entry->ppin = m->ppin; __entry->walltime = m->time; __entry->cpu = m->extcpu; __entry->cpuid = m->cpuid; @@ -55,7 +57,7 @@ TRACE_EVENT(mce_record, __entry->cpuvendor = m->cpuvendor; ), - TP_printk("CPU: %d, MCGc/s: %llx/%llx, MC%d: %016Lx, IPID: %016Lx, ADDR/MISC/SYND: %016Lx/%016Lx/%016Lx, RIP: %02x:<%016Lx>, TSC: %llx, PROCESSOR: %u:%x, TIME: %llu, SOCKET: %u, APIC: %x", + TP_printk("CPU: %d, MCGc/s: %llx/%llx, MC%d: %016Lx, IPID: %016Lx, ADDR/MISC/SYND: %016Lx/%016Lx/%016Lx, RIP: %02x:<%016Lx>, TSC: %llx, PPIN: %llx, PROCESSOR: %u:%x, TIME: %llu, SOCKET: %u, APIC: %x", __entry->cpu, __entry->mcgcap, __entry->mcgstatus, __entry->bank, __entry->status, @@ -63,6 +65,7 @@ TRACE_EVENT(mce_record, __entry->addr, __entry->misc, __entry->synd, __entry->cs, __entry->ip, __entry->tsc, + __entry->ppin, __entry->cpuvendor, __entry->cpuid, __entry->walltime, __entry->socketid, -- 2.34.1 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v3 2/2] tracing: Include Microcode Revision in mce_record tracepoint 2024-01-26 7:57 [PATCH v3 0/2] Update mce_record tracepoint Avadhut Naik 2024-01-26 7:57 ` [PATCH v3 1/2] tracing: Include PPIN in " Avadhut Naik @ 2024-01-26 7:58 ` Avadhut Naik 2024-02-08 17:10 ` [PATCH v3 0/2] Update " Steven Rostedt 2 siblings, 0 replies; 7+ messages in thread From: Avadhut Naik @ 2024-01-26 7:58 UTC (permalink / raw) To: linux-trace-kernel, linux-edac Cc: rostedt, tony.luck, bp, x86, linux-kernel, yazen.ghannam, avadnaik Currently, the microcode field (Microcode Revision) of struct mce is not exported to userspace through the mce_record tracepoint. Export it through the tracepoint as it may provide useful information for debug and analysis. Signed-off-by: Avadhut Naik <avadhut.naik@amd.com> Reviewed-by: Sohil Mehta <sohil.mehta@intel.com> --- include/trace/events/mce.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/include/trace/events/mce.h b/include/trace/events/mce.h index 41a5431545e2..2857f6801e73 100644 --- a/include/trace/events/mce.h +++ b/include/trace/events/mce.h @@ -34,6 +34,7 @@ TRACE_EVENT(mce_record, __field( u8, cs ) __field( u8, bank ) __field( u8, cpuvendor ) + __field( u32, microcode ) ), TP_fast_assign( @@ -55,9 +56,10 @@ TRACE_EVENT(mce_record, __entry->cs = m->cs; __entry->bank = m->bank; __entry->cpuvendor = m->cpuvendor; + __entry->microcode = m->microcode; ), - TP_printk("CPU: %d, MCGc/s: %llx/%llx, MC%d: %016Lx, IPID: %016Lx, ADDR/MISC/SYND: %016Lx/%016Lx/%016Lx, RIP: %02x:<%016Lx>, TSC: %llx, PPIN: %llx, PROCESSOR: %u:%x, TIME: %llu, SOCKET: %u, APIC: %x", + TP_printk("CPU: %d, MCGc/s: %llx/%llx, MC%d: %016Lx, IPID: %016Lx, ADDR/MISC/SYND: %016Lx/%016Lx/%016Lx, RIP: %02x:<%016Lx>, TSC: %llx, PPIN: %llx, PROCESSOR: %u:%x, TIME: %llu, SOCKET: %u, APIC: %x, MICROCODE REVISION: %x", __entry->cpu, __entry->mcgcap, __entry->mcgstatus, __entry->bank, __entry->status, @@ -69,7 +71,8 @@ TRACE_EVENT(mce_record, __entry->cpuvendor, __entry->cpuid, __entry->walltime, __entry->socketid, - __entry->apicid) + __entry->apicid, + __entry->microcode) ); #endif /* _TRACE_MCE_H */ -- 2.34.1 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH v3 0/2] Update mce_record tracepoint 2024-01-26 7:57 [PATCH v3 0/2] Update mce_record tracepoint Avadhut Naik 2024-01-26 7:57 ` [PATCH v3 1/2] tracing: Include PPIN in " Avadhut Naik 2024-01-26 7:58 ` [PATCH v3 2/2] tracing: Include Microcode Revision " Avadhut Naik @ 2024-02-08 17:10 ` Steven Rostedt 2024-03-25 20:12 ` Naik, Avadhut 2 siblings, 1 reply; 7+ messages in thread From: Steven Rostedt @ 2024-02-08 17:10 UTC (permalink / raw) To: Avadhut Naik Cc: linux-trace-kernel, linux-edac, tony.luck, bp, x86, linux-kernel, yazen.ghannam, avadnaik On Fri, 26 Jan 2024 01:57:58 -0600 Avadhut Naik <avadhut.naik@amd.com> wrote: > This patchset updates the mce_record tracepoint so that the recently added > fields of struct mce are exported through it to userspace. > > The first patch adds PPIN (Protected Processor Inventory Number) field to > the tracepoint. > > The second patch adds the microcode field (Microcode Revision) to the > tracepoint. From a tracing POV only: Reviewed-by: Steven Rostedt (Google) <rostedt@goodmis.org> -- Steve ^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v3 0/2] Update mce_record tracepoint 2024-02-08 17:10 ` [PATCH v3 0/2] Update " Steven Rostedt @ 2024-03-25 20:12 ` Naik, Avadhut 2024-03-25 20:31 ` Borislav Petkov 0 siblings, 1 reply; 7+ messages in thread From: Naik, Avadhut @ 2024-03-25 20:12 UTC (permalink / raw) To: bp Cc: linux-trace-kernel, linux-edac, tony.luck, x86, linux-kernel, yazen.ghannam, Steven Rostedt, Avadhut Naik Hi Boris, Can this patchset be merged in? Or would you prefer me sending out another revision with Steven's "Reviewed-by:" tag? On 2/8/2024 11:10, Steven Rostedt wrote: > On Fri, 26 Jan 2024 01:57:58 -0600 > Avadhut Naik <avadhut.naik@amd.com> wrote: > >> This patchset updates the mce_record tracepoint so that the recently added >> fields of struct mce are exported through it to userspace. >> >> The first patch adds PPIN (Protected Processor Inventory Number) field to >> the tracepoint. >> >> The second patch adds the microcode field (Microcode Revision) to the >> tracepoint. > > From a tracing POV only: > > Reviewed-by: Steven Rostedt (Google) <rostedt@goodmis.org> > > -- Steve -- Thanks, Avadhut Naik ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v3 0/2] Update mce_record tracepoint 2024-03-25 20:12 ` Naik, Avadhut @ 2024-03-25 20:31 ` Borislav Petkov 2024-03-25 21:39 ` Naik, Avadhut 0 siblings, 1 reply; 7+ messages in thread From: Borislav Petkov @ 2024-03-25 20:31 UTC (permalink / raw) To: Naik, Avadhut Cc: linux-trace-kernel, linux-edac, tony.luck, x86, linux-kernel, yazen.ghannam, Steven Rostedt, Avadhut Naik On Mon, Mar 25, 2024 at 03:12:14PM -0500, Naik, Avadhut wrote: > Can this patchset be merged in? Or would you prefer me sending out > another revision with Steven's "Reviewed-by:" tag? First of all, please do not top-post. Then, you were on Cc on the previous thread. Please summarize from it and put in the commit message *why* it is good to have each field added. And then, above the tracepoint, I'd like you to add a rule which states what information can and should be added to the tracepoint. And no, "just because" is not good enough. The previous thread has hints. Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v3 0/2] Update mce_record tracepoint 2024-03-25 20:31 ` Borislav Petkov @ 2024-03-25 21:39 ` Naik, Avadhut 0 siblings, 0 replies; 7+ messages in thread From: Naik, Avadhut @ 2024-03-25 21:39 UTC (permalink / raw) To: Borislav Petkov Cc: linux-trace-kernel, linux-edac, tony.luck, x86, linux-kernel, yazen.ghannam, Steven Rostedt, Avadhut Naik On 3/25/2024 15:31, Borislav Petkov wrote: > On Mon, Mar 25, 2024 at 03:12:14PM -0500, Naik, Avadhut wrote: >> Can this patchset be merged in? Or would you prefer me sending out >> another revision with Steven's "Reviewed-by:" tag? > > First of all, please do not top-post. > Apologies for that! > Then, you were on Cc on the previous thread. Please summarize from it > and put in the commit message *why* it is good to have each field added. > > And then, above the tracepoint, I'd like you to add a rule which > states what information can and should be added to the tracepoint. And > no, "just because" is not good enough. The previous thread has hints. > Thanks for the clarification! Will update accordingly. > Thx. > -- Thanks, Avadhut Naik ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2024-03-25 21:39 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2024-01-26 7:57 [PATCH v3 0/2] Update mce_record tracepoint Avadhut Naik 2024-01-26 7:57 ` [PATCH v3 1/2] tracing: Include PPIN in " Avadhut Naik 2024-01-26 7:58 ` [PATCH v3 2/2] tracing: Include Microcode Revision " Avadhut Naik 2024-02-08 17:10 ` [PATCH v3 0/2] Update " Steven Rostedt 2024-03-25 20:12 ` Naik, Avadhut 2024-03-25 20:31 ` Borislav Petkov 2024-03-25 21:39 ` Naik, Avadhut
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).