Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp2550609lqz; Wed, 3 Apr 2024 00:59:51 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUNsSEUdSppz/hd3lFC/1XnxhqexU1CqVdt+FEY+undhHndLvylOB5QGCQPXhiMFAPoW6wylqFqs7NnCywaA8/D7xn/YTjP5w5ghhQUig== X-Google-Smtp-Source: AGHT+IFKEULVb3Be0zo/BDAWP2OTlmY3teuNlpIOeMrIzcb3uPwcVYhIsOtKEzDLTrrCFlGTvH+j X-Received: by 2002:a0c:f0c9:0:b0:699:26f8:9c3a with SMTP id d9-20020a0cf0c9000000b0069926f89c3amr1010725qvl.27.1712131191596; Wed, 03 Apr 2024 00:59:51 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712131191; cv=pass; d=google.com; s=arc-20160816; b=ikv+74Jkrka0eOItB8Fdz+hD/E5te95QvjYfIH/6d5qPlSkhknubj/E5FSu5BA9gWk jRGFfGqFkcTzlBXJOs/idp2oDWSRyG7FuomLpangYxMvJVP9aN1QSaffLTKhPqj2w6wX DJyN0Q3RQ4RpxcOCVlKlaEVAv4/kHOTxcS//ewsyg4H6uPo/BTXojKjNHkN+T/+1FL4X GS2koVp6bVCz65Xm6gu0pu6lsLoyfrQJuzaSWCFaDywdqy2jXYIhbrttvrqFDfvIWMl1 nGxSf159vYQOrefm3Y5NnXjljCKJbTWVZmOb0dAY8+hKeEJqL7I04A9UCS3cRXviMMxS LiwQ== 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=Vm9H3+0Jyig2T88aTcLLYtqatVXQ5vt87fy5nGntv0A=; fh=SBf33pEVFGuJuMunyqWX/QNbS4E1e4LZkjpYaSOCKXA=; b=gjgCMOGYlWyKsV/bSJyDMF2jf1Qc1pQ5b5CZvbUwfH13MA4Cn2SWZqYSuA5dTl1aOp KXkQZImrHzCMukveCByBYTZpwTvCN7eqowvdadic23zKQE+p//EwNPocJ/0o45o+D2mp Ii2sOn0pI5am9Ff8tab2d+ecnvx+2d0SKouq+6FemJZs/0NijOtZuV9LbrrOr8g6vI9p OfE9hQd/djH1UNAMLneqznTrb+ac6sTvpUx/NseUylYUNtnT/ITAhuwS/Etomw8W6BN8 MVbfHlsQB4kkRdHhtO1P58O5ZRzBskv/ZqOONBABagmJEVBnyloUK8BL5OsRHi1oleZ7 Jt2w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=GCBPPE1C; 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-129227-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-129227-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id v14-20020a0cc60e000000b0069871d4463dsi12951354qvi.250.2024.04.03.00.59.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Apr 2024 00:59:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-129227-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=GCBPPE1C; 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-129227-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-129227-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 518361C25AB6 for ; Wed, 3 Apr 2024 07:58:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 010B15FB85; 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="GCBPPE1C"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="zAc1MifQ" 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 8C3675D47F; Wed, 3 Apr 2024 07:57:46 +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=D1ccvwMQzGRqWdshsSir+3wZqrmujszsAJ9gSnnJiUHsOGSdF7aQoO7DuYWUZIzprnc7sTT5LfNfpc/NYDIJ0n1KSsuCp21N9/KrpiAqO13lp3N35fhbpbMRuljDGYes8CkctD/tnKtS20H328tVVQ/NX4g2c7Q05n9v1sHXFCU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712131068; c=relaxed/simple; bh=ed/H2zi/pnzmr6Ecy0pQka10eOUwgcEDrQFkqat4VyU=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=mhNWXzuQ/dshP+uaUr1004FQ7dLpzfD42Y/pWvi8AXb+IiWPCjgxR54kE5F9WPhAY9hj9CXPV74G9u7RuGMlY2Y5T338zH35Yv8gi+QLXIih8Gk7mTE4BmKLSO+FBepeTUaNB9+v358sikmM1EPvA/joKrtiLNYZxZ0zq6Vis+w= 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=GCBPPE1C; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=zAc1MifQ; 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=Vm9H3+0Jyig2T88aTcLLYtqatVXQ5vt87fy5nGntv0A=; b=GCBPPE1CTv4vTkfIdEGx5e3OxQ/uvQhpcvgFrR/Q8+ZA52r3q26uaFsowWOpQ6r5QOzuBU H9uIyZjE24ROSiaA3Vi+N/ApX0q1A3gXo0gM7LRBeNZEy3GaDJnw5aNQj1YniyT/1d36VD yOlYF1JmqwY1W2JuTl066X3Se+xrwskTcoK4CUdX+hfLQAay72Z0jlS3CIa8mxiTL/zKr2 nNIQOJyz1GF7TYBQsWG9DwvJrfGSFmJoednLheOn5HSJad7xui8fISVIp2pK8ZuulSblCY gkxcXgyyozhm0eH5vcGiNQcMhA65KU34/D4OkOin2DVfF95TGsoJwXRRM7ACPw== 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=Vm9H3+0Jyig2T88aTcLLYtqatVXQ5vt87fy5nGntv0A=; b=zAc1MifQ0xDHqDZJyTtrT/WAW/5A3xBjZdulViFMtQQdK8SDEEhroMbs3HO9TuIwFKLunk 5PaaSW3Hm6cJPbDA== 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 ::microcode 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-3-avadhut.naik@amd.com> References: <20240401171455.1737976-3-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: <171213106402.10875.15600503957786604053.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: 186d7ef52c1f0c41450dedbdf6d6325d0a84e4c5 Gitweb: https://git.kernel.org/tip/186d7ef52c1f0c41450dedbdf6d6325d0a84e4c5 Author: Avadhut Naik AuthorDate: Mon, 01 Apr 2024 12:14:55 -05:00 Committer: Ingo Molnar CommitterDate: Wed, 03 Apr 2024 09:39:29 +02:00 tracing: Add the ::microcode field to the mce_record tracepoint Currently, the microcode field (Microcode Revision) of 'struct mce' is not exposed to userspace through the mce_record tracepoint. Knowing the microcode version on which the MCE was received is critical information for debugging. If the version is not recorded, later attempts to acquire the version might result in discrepancies since it can be changed at runtime. Add microcode version to the tracepoint to prevent ambiguity over the active version on the system when the MCE was received. 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-3-avadhut.naik@amd.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 294fccc..f0f7b3c 100644 --- a/include/trace/events/mce.h +++ b/include/trace/events/mce.h @@ -42,6 +42,7 @@ TRACE_EVENT(mce_record, __field( u8, cs ) __field( u8, bank ) __field( u8, cpuvendor ) + __field( u32, microcode ) ), TP_fast_assign( @@ -63,9 +64,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: %016Lx, MISC: %016Lx, SYND: %016Lx, RIP: %02x:<%016Lx>, TSC: %llx, PPIN: %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, microcode: %x", __entry->cpu, __entry->mcgcap, __entry->mcgstatus, __entry->bank, __entry->status, @@ -80,7 +82,8 @@ TRACE_EVENT(mce_record, __entry->cpuid, __entry->walltime, __entry->socketid, - __entry->apicid) + __entry->apicid, + __entry->microcode) ); #endif /* _TRACE_MCE_H */