Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp2552750lqz; Wed, 3 Apr 2024 01:03:59 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWUnRyIQDBgTTyPquNKQrJrN6D+nLN59g8RPO+yFTaw7lqE4kDuC3LQ/3vDjcD2abZgIMYlz+AnlyOf8sz9pbxOS78nZJZaXfoisuqiRA== X-Google-Smtp-Source: AGHT+IG+JEG4xM4aG+D929eMEi1rEwUxwkviMVfgpApsHe9bgyCUUctgHKZ9EfhUzEiJa8TDP7a0 X-Received: by 2002:a05:6358:560c:b0:183:e337:8e9b with SMTP id b12-20020a056358560c00b00183e3378e9bmr1966010rwf.8.1712131438858; Wed, 03 Apr 2024 01:03:58 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712131438; cv=pass; d=google.com; s=arc-20160816; b=wDo5P0jvAhWViemOuWCfxb9aA5JT63koatiNq75840aSgxXlOxWFppiOZaAwdfnyiq 10u6w+9FVH87Y7PeIAHiF+RyVJw7x8EHTswy2vXBJHXhr54I9n/aAjHvZ9gk0VAOySG6 fUf0VVa7Xb/5oPWdoPvLWLPiK2NNiICz7H/rsAbR50AmFHwMV+Y/hn306yaLgZlAQpTn fViruZV60DV4msdrVmbMv0y9a21mu6fyAIV+7t3mE6xngTQTPqIdlsM+J9nwVcFK1lo7 BbVcPnzQzy9x3ALoaO+vkpjAtHL2YVZlIyQphtwKZTEBDKmbCzSWqmeb8Rg3KEsAf1gm 1SlQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:precedence:robot-unsubscribe:robot-id :message-id:mime-version:list-unsubscribe:list-subscribe:list-id :precedence:references:in-reply-to:cc:subject:to:reply-to:sender :from:dkim-signature:dkim-signature:date; bh=g8hnsAJF50xd6gSWbPnRJLLUi1CEbJd9wSyZtF23iRQ=; fh=SBf33pEVFGuJuMunyqWX/QNbS4E1e4LZkjpYaSOCKXA=; b=bwJtMWVzgdjEtTsdPx+590+oMoZ8zqEtJbHYLToGTS0kvaDnEfBpLrj2lYpA1npAlY R3fuX0McCHwu+6hnFNjHfZQ6qtuYIAWnbmyFKNdzXnAOBuW77g430aClQAZajxS2nGC1 RJsKz4U/iUflYeJ0ynbSJLmKvWc+D/usa6SCDkRCCvLpSn7oKXsim1tZ1oMi/pVWODVt wIDdRZLsQs8e4D6qjT/yTY0th3pFSgBwSTYS7cau6VZ6nCZrOss6GQnXLmjR4BuBrGp3 vD1Ztt0gOdMpjsWMVEIhCy+v1GV9Czha+5w9KAqzLE5bjAeWG9TzavES27GpJEsX6XdG 17cg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=WyH6tedh; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-129228-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-129228-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id p30-20020a635b1e000000b005d7a78810acsi12263785pgb.278.2024.04.03.01.03.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Apr 2024 01:03:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-129228-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=WyH6tedh; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-129228-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-129228-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 30AEA28543C for ; Wed, 3 Apr 2024 07:58:06 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AF5E16CDD2; Wed, 3 Apr 2024 07:57:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="WyH6tedh"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="rHtsWKSy" Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5A887286A6; Wed, 3 Apr 2024 07:57:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712131068; cv=none; b=TObUu6Di80Ynbu/YcqQ8GUrap8+rfJ5dREJ8OL2jdb0lp/I/5r5PpaJCu0NOBqVMW9g7TOnuReLjusa/9aPtt4MwA3XSRISLPEpE60nGexuQ3EoBrs9sfDYsBYXdhc2JpY9TxepARJEovwaOrSEYbHPdom4ktwR6MBXqw1wW3z0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712131068; c=relaxed/simple; bh=1BKrRh4jCLaZG7GlkJVWPSFj8qS+m+uzp2aHQHIajHw=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=ilLk9dDMoElCXcle2JAarAABZW4Qy5ROebe/y0PKeqe6ExyDDBc99xIpITSzbYqeBh1nr95urwK/vV5Bqh5uosFMeNaEHo+KRbeJhyrsqrTjLyFKeKu2eWjkuRC3k1zIX55cxPKjN31ufmf7+jIaISRxoXgDiJKcaxBhw6+zG/E= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=WyH6tedh; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=rHtsWKSy; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Date: Wed, 03 Apr 2024 07:57:44 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1712131065; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=g8hnsAJF50xd6gSWbPnRJLLUi1CEbJd9wSyZtF23iRQ=; b=WyH6tedh8nek4rybejf/xkWMpC+LkfnmSThGHklOZVSQgTJq2v0WPKTjWEQpLRA0+mnWYD oGvE2bYzL/OMq96SCjU6nxN7oVDoYhiZ/d0vZLANuRp6bkDkRR6nIHrBvhPAtzBD0gGPNj ZSsd/nvqhCQ+SqbVt7SJkos4Ehwc2Q1rw3pnEfR4KpXd/sGM4JmSGi9oZH5w+NsfrfNdkN OfycmT96PbBO9at0hButrwDWsggs7Qp+W1gaPAgFyQlqBsz9tjk/E5XTE3QRSiITYWxQaF S34YvS6fHzl0Whm/cPd/z8dJJGTL6S2Y6wqKLVjHRT1lRa3d3l6QoZUlVyYc7g== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1712131065; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=g8hnsAJF50xd6gSWbPnRJLLUi1CEbJd9wSyZtF23iRQ=; b=rHtsWKSyUu+raHf+LTzw7A7JnNh/Xyh8gHd1Lay9BSmQijzlm6kYb+RC/+i941TibL6cpm 3GRgNZ58YQaim0DA== From: "tip-bot2 for Avadhut Naik" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/cpu] tracing: Add the ::ppin field to the mce_record tracepoint Cc: Avadhut Naik , Ingo Molnar , Sohil Mehta , "Steven Rostedt (Google)" , Tony Luck , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20240401171455.1737976-2-avadhut.naik@amd.com> References: <20240401171455.1737976-2-avadhut.naik@amd.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <171213106485.10875.12804346187076671037.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit The following commit has been merged into the x86/cpu branch of tip: Commit-ID: 98430645e383404e5f6f784cabbb08ebb4ac5499 Gitweb: https://git.kernel.org/tip/98430645e383404e5f6f784cabbb08ebb4ac5499 Author: Avadhut Naik AuthorDate: Mon, 01 Apr 2024 12:14:54 -05:00 Committer: Ingo Molnar CommitterDate: Wed, 03 Apr 2024 09:39:29 +02:00 tracing: Add the ::ppin field to the mce_record tracepoint Machine Check Error information from 'struct mce' is exposed to userspace through the mce_record tracepoint. Currently, however, the PPIN (Protected Processor Inventory Number) field of 'struct mce' is not exposed. Add a PPIN field to the tracepoint as it provides a unique identifier for the system (or socket in case of multi-socket systems) on which the MCE has been received. Also, add a comment explaining the kind of information that can be and should be added to the tracepoint. Signed-off-by: Avadhut Naik Signed-off-by: Ingo Molnar Reviewed-by: Sohil Mehta Reviewed-by: Steven Rostedt (Google) Reviewed-by: Tony Luck Link: https://lore.kernel.org/r/20240401171455.1737976-2-avadhut.naik@amd.com --- include/trace/events/mce.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/include/trace/events/mce.h b/include/trace/events/mce.h index 9c4e121..294fccc 100644 --- a/include/trace/events/mce.h +++ b/include/trace/events/mce.h @@ -9,6 +9,14 @@ #include #include +/* + * MCE Event Record. + * + * Only very relevant and transient information which cannot be + * gathered from a system by any other means or which can only be + * acquired arduously should be added to this record. + */ + TRACE_EVENT(mce_record, TP_PROTO(struct mce *m), @@ -25,6 +33,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 +54,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 +65,7 @@ TRACE_EVENT(mce_record, __entry->cpuvendor = m->cpuvendor; ), - TP_printk("CPU: %d, MCGc/s: %llx/%llx, MC%d: %016Lx, IPID: %016Lx, ADDR: %016Lx, MISC: %016Lx, SYND: %016Lx, RIP: %02x:<%016Lx>, TSC: %llx, vendor: %u, CPUID: %x, time: %llu, socket: %u, APIC: %x", + TP_printk("CPU: %d, MCGc/s: %llx/%llx, MC%d: %016Lx, IPID: %016Lx, ADDR: %016Lx, MISC: %016Lx, SYND: %016Lx, RIP: %02x:<%016Lx>, TSC: %llx, PPIN: %llx, vendor: %u, CPUID: %x, time: %llu, socket: %u, APIC: %x", __entry->cpu, __entry->mcgcap, __entry->mcgstatus, __entry->bank, __entry->status, @@ -65,6 +75,7 @@ TRACE_EVENT(mce_record, __entry->synd, __entry->cs, __entry->ip, __entry->tsc, + __entry->ppin, __entry->cpuvendor, __entry->cpuid, __entry->walltime,