Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp2174727lqb; Mon, 27 May 2024 10:07:13 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUQWLuuekCJyra/2kvT2sHs6+jQZIQRqb1HuB3HZdUll080WQ7lh1mEoXnJhT8DnOQE9Q87kBoBOxAGfyvz0rfm2Q/BkuPvYuW2gg3E5Q== X-Google-Smtp-Source: AGHT+IEtaJprPm5OvLIbq+JcrU5lfeW1q+qQaQgXpC71MHNHdMwfwACzj/dItL/ikei65EosmfCN X-Received: by 2002:a17:90b:1198:b0:2bd:6f2e:8c1a with SMTP id 98e67ed59e1d1-2bf5e170f83mr8555011a91.2.1716829633529; Mon, 27 May 2024 10:07:13 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716829633; cv=pass; d=google.com; s=arc-20160816; b=SxSX8f9h6swjlOHdpPfrlsF0xgYMw9M8/w7tj2CwP7+8Lg0qHmtnEUks2eKDzEpnAj fQquPANGp7c3rk44tpfLky6YqubSeH5J9hSPvIihQYdmGLgc4MK7vL8suvIDEq4+mak0 qeSPjx1aD6k845kmtTw5u6f7ymZ1WqAqThTRYHB+s1TqQPuVgpAIlbvSfhjT7TkScGh7 xGSz7mvdNk6JRYk+nGGkkODMIZ5k1c36qdMvQTABqiAShVNk8DL7p66yIY7Ubc2AW+/3 2yMHFRVDSzcvrmkukW8Dq47Xi1P+uoPAxsWqjczz0mbS1GhugtavqdDVAkE8Wq7VSxQi EiJQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-disposition:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:message-id:subject:cc:to:from:date :dkim-signature; bh=RzyMVVq1cY2y+5UdBRiBZllfD92vi4w1M04HH9uqTac=; fh=OXUK09bmAgD+9kfohF4oIjuRICPlrp1aGQuUcs+nNnE=; b=yiEPojcMrgnTIxzl6JSsNCW34KJkeUHYRf0fjDLiFxLRLKUel+tJ/C1uhBFuu7jHXk Bz+2JqJzELGUO1XjkQJQvyoDtv4OU+dxcc/IjdsArLskTvAOAIMO4HeOZRj5HNCm1a8F Muc8XaGYv4zwFUzpBsghfBCYqXt1ebSfwy01ZwQGYpzPa0WFQsxnIiKQtqcs4ut66Ci/ +7ZY8bN1sFMTX+RTwjvHGz1Y2VY6Y0sCP/7Y40yrVKGXWrvcYkMZXFjQsjGIl54DIG14 TW633rbDl3mXAp71fRKTpOmmxUsBCD/GeW2iKhMyp+Pvrml5Dzog7d9glfNP651pdWOC qpQg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=vJp3rtJp; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-191263-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-191263-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id 98e67ed59e1d1-2bfbcded58bsi2790139a91.118.2024.05.27.10.07.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 May 2024 10:07:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-191263-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=vJp3rtJp; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-191263-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-191263-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 81E38B2614F for ; Mon, 27 May 2024 16:42:20 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6FCBD155C8D; Mon, 27 May 2024 16:42:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="vJp3rtJp" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 9D52F2629C for ; Mon, 27 May 2024 16:42:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716828132; cv=none; b=fzcFenbLBWbJl3T0bJA3GCSGmfz2E7ZWb8s7YydyxXPn1XfBeZKcFec9pY7E9lc81QC9pmpIsDuF4roPKSQO3zM/g4sQ+L9FYtVwj2QYcinq5F6644++3qODesOXrsJoX0AjKIlfqqy6OkkTx7xj6ikDMpkrt08ylZGkGxsfUy8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716828132; c=relaxed/simple; bh=ZWuGoTD2JPYaPTkmGgmk9SxvtTBGRBdsRXzhPCF9O+4=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition; b=Hl3j0rs9S42I15pfxrtvsyzAfnXFb5IhdSPTse9UkEV/+tznlVnM4IZtU7mj8gESbvaFi1seYFvfa/6w6yhl5Xs+e5vI3uY9MxvJE7A1VbPZ+5srBRavKVJhO9jluR4k/n+6StgW/YRKRCV3+2hSdw4U+QvaIshjOlDy5LvXjOY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=vJp3rtJp; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id AC8B6C2BBFC; Mon, 27 May 2024 16:42:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1716828132; bh=ZWuGoTD2JPYaPTkmGgmk9SxvtTBGRBdsRXzhPCF9O+4=; h=Date:From:To:Cc:Subject:From; b=vJp3rtJp6vkJogCer/ztnT/qJVrxXTE/58xYj4sNoMug/XRbACAOpeKgIZjDmAmKR lZnMrfgDXE8wCUU0OIQNwWcQuHS8Vg+Ue41pH+LomGfm0wbkt2kD/B8aqB8IyiDAS1 RHGBoXnNXhtltm2OWYCSmdhgJQJnwfffjJak3A0vTpJX354C/8sadSztMx9vf/Edj5 53h9R/JOENnvGEPNVXXKT5HH3tA6GZ+wOmFv52ikXdKMLu8VEGcC7XLvnwRWhCbMdk ohSuySqG+WLkrilUtYu7Ff3nUjuRClfP0HW/pXWKIYhSkB++5S/emMQKtyECk5+UqU 72OviDvtTGWkQ== Date: Mon, 27 May 2024 13:42:08 -0300 From: Arnaldo Carvalho de Melo To: linux-kernel@vger.kernel.org Cc: Adrian Hunter , Ian Rogers , Jacob Pan , Jiri Olsa , Kan Liang , Namhyung Kim , Thomas Gleixner Subject: [PATCH 1/1 fyi] perf trace beauty: Update the arch/x86/include/asm/irq_vectors.h copy with the kernel sources to pick POSTED_MSI_NOTIFICATION Message-ID: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline tldr; Just FYI, I'm carrying this on the perf tools tree. Full explanation: There used to be no copies, with tools/ code using kernel headers directly. From time to time tools/perf/ broke due to legitimate kernel hacking. At some point Linus complained about such direct usage. Then we adopted the current model. The way these headers are used in perf are not restricted to just including them to compile something. There are sometimes used in scripts that convert defines into string tables, etc, so some change may break one of these scripts, or new MSRs may use some different #define pattern, etc. E.g.: $ ls -1 tools/perf/trace/beauty/*.sh | head -5 tools/perf/trace/beauty/arch_errno_names.sh tools/perf/trace/beauty/drm_ioctl.sh tools/perf/trace/beauty/fadvise.sh tools/perf/trace/beauty/fsconfig.sh tools/perf/trace/beauty/fsmount.sh $ $ tools/perf/trace/beauty/fadvise.sh static const char *fadvise_advices[] = { [0] = "NORMAL", [1] = "RANDOM", [2] = "SEQUENTIAL", [3] = "WILLNEED", [4] = "DONTNEED", [5] = "NOREUSE", }; $ The tools/perf/check-headers.sh script, part of the tools/ build process, points out changes in the original files. So its important not to touch the copies in tools/ when doing changes in the original kernel headers, that will be done later, when check-headers.sh inform about the change to the perf tools hackers. To pick up the change in: f5a3562ec9dd29e6 ("x86/irq: Reserve a per CPU IDT vector for posted MSIs") That picks up this new vector: $ cp arch/x86/include/asm/irq_vectors.h tools/perf/trace/beauty/arch/x86/include/asm/irq_vectors.h $ tools/perf/trace/beauty/tracepoints/x86_irq_vectors.sh > after $ diff -u before after --- before 2024-05-27 12:50:47.708863932 -0300 +++ after 2024-05-27 12:51:15.335113123 -0300 @@ -1,6 +1,7 @@ static const char *x86_irq_vectors[] = { [0x02] = "NMI", [0x80] = "IA32_SYSCALL", + [0xeb] = "POSTED_MSI_NOTIFICATION", [0xec] = "LOCAL_TIMER", [0xed] = "HYPERV_STIMER0", [0xee] = "HYPERV_REENLIGHTENMENT", $ Now those will be known when pretty printing the irq_vectors:* tracepoints. Cc: Adrian Hunter Cc: Ian Rogers Cc: Jacob Pan Cc: Jiri Olsa Cc: Kan Liang Cc: Namhyung Kim Cc: Thomas Gleixner Link: https://lore.kernel.org/lkml/ Signed-off-by: Arnaldo Carvalho de Melo --- .../perf/trace/beauty/arch/x86/include/asm/irq_vectors.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tools/perf/trace/beauty/arch/x86/include/asm/irq_vectors.h b/tools/perf/trace/beauty/arch/x86/include/asm/irq_vectors.h index d18bfb238f660fcc..13aea8fc3d45fcf4 100644 --- a/tools/perf/trace/beauty/arch/x86/include/asm/irq_vectors.h +++ b/tools/perf/trace/beauty/arch/x86/include/asm/irq_vectors.h @@ -97,10 +97,16 @@ #define LOCAL_TIMER_VECTOR 0xec +/* + * Posted interrupt notification vector for all device MSIs delivered to + * the host kernel. + */ +#define POSTED_MSI_NOTIFICATION_VECTOR 0xeb + #define NR_VECTORS 256 #ifdef CONFIG_X86_LOCAL_APIC -#define FIRST_SYSTEM_VECTOR LOCAL_TIMER_VECTOR +#define FIRST_SYSTEM_VECTOR POSTED_MSI_NOTIFICATION_VECTOR #else #define FIRST_SYSTEM_VECTOR NR_VECTORS #endif -- 2.45.1