Update mce_record tracepoint
v3 cover Update mce_record tracepoint
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 <[email protected]>
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
Signature · 1 line
2.34.1
PATCH v3 1/2 tracing: Include PPIN in mce_record tracepoint
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.
--- include/trace/events/mce.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
include/trace/events/mce.h +4 -1
@@ -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,
Signature · 1 line
2.34.1
PATCH v3 2/2 tracing: Include Microcode Revision in mce_record tracepoint
In reply to Avadhut NaikCurrently, 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.
--- include/trace/events/mce.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
include/trace/events/mce.h +5 -2
@@ -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 */
Signature · 1 line
2.34.1
Quoted 8 lines · On Fri, 26 Jan 2024 01:57:58 -0600 Avadhut Naik <[email protected]> wrote:
This patchset updates the
mce_recordtracepoint 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:
-- Steve
v3 cover Update mce_record tracepoint
Hi Boris,
Can this patchset be merged in? Or would you prefer me sending out another revision with Steven's "Reviewed-by:" tag?
Quoted 17 lines · Steven Rostedt
Quoted 8 lines · On Fri, 26 Jan 2024 01:57:58 -0600 Avadhut Naik <[email protected]> wrote:
This patchset updates the
mce_recordtracepoint 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) <[email protected]>-- Steve
Signature · 2 lines
Thanks, Avadhut Naik
Borislav Petkov
maintainerQuoted 2 lines · Avadhut
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.
Signature · 4 lines
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquetteQuoted 6 lines · Borislav Petkov
Quoted 2 lines · Avadhut
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!
Quoted 7 lines
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.
Quoted 2 lines
Thx.
Signature · 2 lines
Thanks, Avadhut Naik