From nobody Mon Jun 15 10:49:16 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 69E00C433EF for ; Fri, 29 Apr 2022 20:29:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1380799AbiD2Uce (ORCPT ); Fri, 29 Apr 2022 16:32:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54452 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1380732AbiD2UcO (ORCPT ); Fri, 29 Apr 2022 16:32:14 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 68DC7D64E7; Fri, 29 Apr 2022 13:28:55 -0700 (PDT) Date: Fri, 29 Apr 2022 20:28:53 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1651264134; 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=FYWhePjh+EWUmgxpgXDWmewZHsZcVNS+wYCeN8U/Zj4=; b=knoLJJyn8JlTbW1YngsMtMVLo2ZTRzpkNdZxLoQB8d20LnmX+Ti9a4AonjOwRU2/jLzZWg hqJGOX20QMZ9fiLYp2IArTfvBZ2XENBdaGdFxN13cNR9GUIRXrvc7/Vpicj9N+WDAh2Yc2 LE/leLrEkAdTz//z0yQ64UZ9OcVkQIxsankwwuykZ15QvJGrL5YiHu9QhJhH8H5T+t/Du2 oWm8tdeHmfWUBzLAXU8lfn+9KE5/WuvhHT7X89B6+iyyrCMFfVWYueerUT1bD0cQN/0raW lX755HIaXZuC4rbXsCCKgjZTk1qQWDg7/x+biafsmgH3sMT+0dkzNR8H5EbAXA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1651264134; 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=FYWhePjh+EWUmgxpgXDWmewZHsZcVNS+wYCeN8U/Zj4=; b=oWMLZLO69n1rCIG2VYvHySSzjVn67tHIKZD3lF0G79pbIujWw6LkKgfgFB38v16q/t38bA G0OVa6cPVLsEsYDQ== From: "tip-bot2 for Sandipan Das" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: perf/core] x86/msr: Add PerfCntrGlobal* registers Cc: Sandipan Das , "Peter Zijlstra (Intel)" , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: =?utf-8?q?=3Ccdc0d8f75bd519848731b5c64d924f5a0619a573=2E16505?= =?utf-8?q?15382=2Egit=2Esandipan=2Edas=40amd=2Ecom=3E?= References: =?utf-8?q?=3Ccdc0d8f75bd519848731b5c64d924f5a0619a573=2E165051?= =?utf-8?q?5382=2Egit=2Esandipan=2Edas=40amd=2Ecom=3E?= MIME-Version: 1.0 Message-ID: <165126413302.4207.5780334274914327470.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the perf/core branch of tip: Commit-ID: d9b0a81c777fcf9e412aef64a5f8f3e69bd150f5 Gitweb: https://git.kernel.org/tip/d9b0a81c777fcf9e412aef64a5f8f3e69= bd150f5 Author: Sandipan Das AuthorDate: Thu, 21 Apr 2022 11:16:54 +05:30 Committer: Peter Zijlstra CommitterDate: Fri, 29 Apr 2022 11:06:26 +02:00 x86/msr: Add PerfCntrGlobal* registers Add MSR definitions that will be used to enable the new AMD Performance Monitoring Version 2 (PerfMonV2) features. These include: * Performance Counter Global Control (PerfCntrGlobalCtl) * Performance Counter Global Status (PerfCntrGlobalStatus) * Performance Counter Global Status Clear (PerfCntrGlobalStatusClr) The new Performance Counter Global Control and Status MSRs provide an interface for enabling or disabling multiple counters at the same time and for testing overflow without probing the individual registers for each PMC. The availability of these registers is indicated through the PerfMonV2 feature bit of CPUID leaf 0x80000022 EAX. Signed-off-by: Sandipan Das Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/cdc0d8f75bd519848731b5c64d924f5a0619a573.16= 50515382.git.sandipan.das@amd.com --- arch/x86/include/asm/msr-index.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/x86/include/asm/msr-index.h b/arch/x86/include/asm/msr-in= dex.h index 8179ea3..58a44dc 100644 --- a/arch/x86/include/asm/msr-index.h +++ b/arch/x86/include/asm/msr-index.h @@ -524,6 +524,11 @@ #define AMD_CPPC_DES_PERF(x) (((x) & 0xff) << 16) #define AMD_CPPC_ENERGY_PERF_PREF(x) (((x) & 0xff) << 24) =20 +/* AMD Performance Counter Global Status and Control MSRs */ +#define MSR_AMD64_PERF_CNTR_GLOBAL_STATUS 0xc0000300 +#define MSR_AMD64_PERF_CNTR_GLOBAL_CTL 0xc0000301 +#define MSR_AMD64_PERF_CNTR_GLOBAL_STATUS_CLR 0xc0000302 + /* Fam 17h MSRs */ #define MSR_F17H_IRPERF 0xc00000e9