Received: by 10.223.176.5 with SMTP id f5csp2877936wra; Mon, 5 Feb 2018 11:26:38 -0800 (PST) X-Google-Smtp-Source: AH8x226nDz3GQHzLbh7VeY2iLdtLdQf2BwjMTcJOxdvjcsiYTVtSPUr/n3ONCx4XO2kHG4MD92Ux X-Received: by 2002:a17:902:15a8:: with SMTP id m37-v6mr20814821pla.186.1517858798742; Mon, 05 Feb 2018 11:26:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517858798; cv=none; d=google.com; s=arc-20160816; b=TkNhdDhv5x1Q51LRmwA7vj6OvxTcfm0fH5wEthdBA61l0tAj5oykPKHkZnRK0AXV87 oe6znLJvY61fsU6rSEg35h6uEZ86a4EhcYyxdOviVGnpNuonQKAlXw++0FgCTacwpXDS QP0odEWZpd8H/oXv6UW+hWCNT6H63RBvGsokJ3nmA+SqK75OJGJUCDaFGaOmdVQv7JkY LmXBXPC4s2BgRLtDoNPf7EwpDeDHqibtyMVux+vfFf/gf5VlpVOYJRS5v+8hr0XhJ9WD or1N3hJf3XeuCZ1Hm5mtgg4MJwihnf047cooSLcM0e134GdSbI9UKd6rFvXvb6sCKxqU np8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature:arc-authentication-results; bh=xojvXcehkbjdJw9gYEzP3nydxAohRNOSOgBob7G+rLw=; b=FXQlfKRYgqgHW5fanuXR+2TujFJBJ83sVklqMrunQVioXJuor7usq4bmnChF2pWUeE Q0dBHx2KjqUx5lIzqoeNz8zX3E9028II//unqZyVc8ep27PEu8stUjR863H7yPTK2n72 +DClskEx6ihsOkRYqUH4zz9RvDJsEmIqXCDMMeNQ++5uq3+13z9h/ozNY+Jjs+Tdygww OOFNWiwz7hK5QmbEkKex0Q+CenUpQ3Sf2rmluLM/wLUMTOqhSLg6sS1Zn+IROvYCHbKj qKaPGdr44DKfOEo9UuG6ZCZG4D50vKXPCiH90+g0ifLUh0IUFbhb6AmwZY1Ql2LQWzXv vOxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amdcloud.onmicrosoft.com header.s=selector1-amd-com header.b=jqPQHm8C; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c81si1282160pfe.306.2018.02.05.11.26.24; Mon, 05 Feb 2018 11:26:38 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@amdcloud.onmicrosoft.com header.s=selector1-amd-com header.b=jqPQHm8C; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751924AbeBETZj (ORCPT + 99 others); Mon, 5 Feb 2018 14:25:39 -0500 Received: from mail-bl2nam02on0080.outbound.protection.outlook.com ([104.47.38.80]:34896 "EHLO NAM02-BL2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750818AbeBETZT (ORCPT ); Mon, 5 Feb 2018 14:25:19 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector1-amd-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=xojvXcehkbjdJw9gYEzP3nydxAohRNOSOgBob7G+rLw=; b=jqPQHm8CbI+j6Lm5VQKjrFx3Iqs5NBlK8lWiKl5slJUkd2PgHdwQrDTeYpH+2HSL72etvJ8Cwd0SJbsFNChsyohH6MRaG3QrqtnMKFvOtSD/Ds0kgQU2od5xQm53D9ISPkaolh6KxBI1Oob9FCyxO7WHbtRKNzid8dv8vB86cqc= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Janakarajan.Natarajan@amd.com; Received: from gi-joe.amd.com (165.204.77.1) by DM5PR12MB1370.namprd12.prod.outlook.com (10.168.238.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.464.11; Mon, 5 Feb 2018 19:25:15 +0000 From: Janakarajan Natarajan To: kvm@vger.kernel.org, x86@kernel.org, linux-kernel@vger.kernel.org Cc: Thomas Gleixner , Ingo Molnar , "H . Peter Anvin" , Paolo Bonzini , Radim Krcmar , Len Brown , Borislav Petkov , Kyle Huey , Tom Lendacky , Janakarajan Natarajan Subject: [PATCH v5 1/3] x86/msr: Add AMD Core Perf Extension MSRs Date: Mon, 5 Feb 2018 13:24:51 -0600 Message-Id: <7cf7bd5fa6d24cd46a9ea50024b0010bf3d01088.1517850303.git.Janakarajan.Natarajan@amd.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [165.204.77.1] X-ClientProxiedBy: CO1PR15CA0095.namprd15.prod.outlook.com (10.175.177.15) To DM5PR12MB1370.namprd12.prod.outlook.com (10.168.238.21) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 195bdeee-fe93-4e37-f292-08d56cce3012 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(48565401081)(4534165)(4627221)(201703031133081)(201702281549075)(5600026)(4604075)(2017052603307)(7153060)(7193020);SRVR:DM5PR12MB1370; X-Microsoft-Exchange-Diagnostics: 1;DM5PR12MB1370;3:JubU7YC+9/0p61q6uVhXdo7etFaEFCY4M5xYAno3YHkYRwmq3hZmcdQIs5F8zUhxIYq37ML0qOK82Rj+aweqF+qpv8+TV9iJ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ml6hRsVHoAZmTrH00EAjw6WRFKSvQRBZzxqAmEfmjRGstOfk7TEj0vaZqGVV1+tRs3k3WWTnWp8RaLqStD6lV0Z3RK4RmnGTKUX3bLuQp1SbiLw0zpGz2BWn7PQaIEu5HwEvl96foyrf5l6ASGRqq8hu1XrRqUlS4F+tcCFkK0Ro0ksST5Vp7Lda3CfJc5JUoHNXjF5mF92DHFb4EA3s2NhRPwkZGOZGFcJtoIvX+XqedVoAvMKA1N;4:g2Zv5InmCpZWpUMZy0P7xTw2m0zeRLCkGqMNo9o2S9oP08IGWsDvoh5BQxFxxOdRA6WZChmEZY6PuLP2xCy0SWLjNwA/WraYRltq4x/7xEEwlbQz7RKPEWXnho/XwFw8obTr1wqJSEjB9nHHBLhV8AALueVv+i4rO2zBI1vBZmW2JJg27RKxUca5DEXMd/mCnPd8RvG6p5KlJeg0YNtUpm+6IYsBMBAbHTUxqjIopx8baRIMh7cb/JO6Lj+a9xVMhr2Co9Q+PNmVhIEid/DmXtAA9BArVtFPiTGPI7ROJSY1sNyXF8dG2bnSWO+ZQ5IB X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(767451399110); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040501)(2401047)(8121501046)(5005006)(3231101)(2400082)(944501161)(10201501046)(3002001)(93006095)(93001095)(6055026)(6041288)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123560045)(20161123558120)(6072148)(201708071742011);SRVR:DM5PR12MB1370;BCL:0;PCL:0;RULEID:;SRVR:DM5PR12MB1370; X-Forefront-PRVS: 0574D4712B X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(366004)(396003)(346002)(39380400002)(376002)(39860400002)(189003)(199004)(48376002)(68736007)(7416002)(7696005)(50226002)(5660300001)(52116002)(2950100002)(6486002)(6666003)(186003)(305945005)(47776003)(76176011)(66066001)(4326008)(81156014)(50466002)(8676002)(97736004)(53936002)(51416003)(105586002)(53416004)(81166006)(386003)(7736002)(8936002)(25786009)(72206003)(26005)(478600001)(118296001)(86362001)(106356001)(16586007)(54906003)(6116002)(3846002)(316002)(36756003)(16526019)(2906002);DIR:OUT;SFP:1101;SCL:1;SRVR:DM5PR12MB1370;H:gi-joe.amd.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;DM5PR12MB1370;23:QgZ2AlX1t3Jmh3DcQnT7WYVl+jKHKYJ3hPyDogVjE?= =?us-ascii?Q?3uxAF7MGhsEpCV1N5jhlNkVH9RY2SZcpdKYRwOl4MSi9sToP7O4UIZh0SP3z?= =?us-ascii?Q?cSsXCRFEFLIxybA1e4DnNXP1491wwPrlaIEQvR5ZPi9BgZb2ST22L1ROOTrR?= =?us-ascii?Q?+u8IdPQwuEOJWeqRxrMZKVgMtOBMwGb6ClF2LEOwK+8YQk43RA53RBesIWHF?= =?us-ascii?Q?xwLuMHLrAwsp9NFmuMwX5DvSG4yrXsVZxlrGe9H5RYm/QM7Kyr45mElzlqPn?= =?us-ascii?Q?wesGqUbTFdST6osZsRCQKocTPO1BX9tSKlF1Rh+9Utj8n9gMntDJQ7rojAX3?= =?us-ascii?Q?98jSh9w4KppuCTBU6QIsBVqcHFfkjFZEimSEvEPySEd5eU1liC14BgNcaeNL?= =?us-ascii?Q?4A/e3p0iAN0HXCxT/Io/166P+dFIIulybmIKe/EuMMHLOPbRduxbodJbfDVD?= =?us-ascii?Q?LN3pMxyA/E8s260SfNKjcZFiK3Oj0HeS84Y9MnpXE1Dt8t1HM/tVR1JXHnkT?= =?us-ascii?Q?dbcR1Akllk+/derrQsutVso9Z+dr8FblO/OEq44nexaGQLM/0VwfZA/L06Vz?= =?us-ascii?Q?2WUW24QpylkySj4IOoJmVCHNOOEYHBbL6YkixgSI1tefiVea/Vd+pGel2OG3?= =?us-ascii?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G4HQjeehDwhDYUH3jqyHHNiKgZIxvHiM4VSvvLBpKorMi1KBxdjtHAQO7rev+BIKG0iLvwsz6YO1d06sQ1KqsDw+mQgF300QJTTbyodK6ebwY8aRgMzssp5ald6gRv4n21OhZh1Q8DGo=;24:K9PhXRcKuyZONhZdwAB3DQBOlnYW5iwJ4kzBHHZb1LUa1QrT3y2AglUlUxUOaC0WOzRnK+wI1qTZ8HJJEzN9DNtiYXN8kL81zVma8zSmJAI=;7:LKSqlUlVD8xjRbY4GZXyMmLM1yXJeuVgqJBfjZ+2QiwXfa/1Qvm2P2y5lsFAatsrFD8lFUftpGB3rqcS/G+fil61Rp31XYR7eSv/QR8EN61838I2YF8alqK5ZC3bfHsN0t/6jESTPY+ebmroAAjm5FqtUFjp7mVISEV1VPbJq5Vmi/y0RSrwZVmAGkHIMK8gaQUIimIbxqtrTNuhVjOfVWM+8cPezQz7YCSzN11r4vsR4dQ1cPZsnsKZYiR26anm SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;DM5PR12MB1370;20:+aePN2/8ya58Xmbm0pBRUInzX6H151SIiNtneDeas4CVSj8pHZwhaIP4jcAPKAYZw8i2FR4DPFcXH06zyr80eoSdwIUq7+/jc3YOiT7letUj74WTphE2eRx3KqdfsKJhwzNvDBsTOwLi4FnyFU/cyhQvAVtRv9qEpziJ+xIK3+bujIVqhXdN6Cr/LqBQRI3Exd0x8vPifI5R8jE0fdOU0Fm0P2leW+0w/98pxfa0+2fLBu5kBCbgYjQvdzK2yC+9 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Feb 2018 19:25:15.4185 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 195bdeee-fe93-4e37-f292-08d56cce3012 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR12MB1370 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add the EventSelect and Counter MSRs for AMD Core Perf Extension. Signed-off-by: Janakarajan Natarajan --- arch/x86/include/asm/msr-index.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/arch/x86/include/asm/msr-index.h b/arch/x86/include/asm/msr-index.h index e7b983a..2885363 100644 --- a/arch/x86/include/asm/msr-index.h +++ b/arch/x86/include/asm/msr-index.h @@ -341,7 +341,21 @@ /* Fam 15h MSRs */ #define MSR_F15H_PERF_CTL 0xc0010200 +#define MSR_F15H_PERF_CTL0 MSR_F15H_PERF_CTL +#define MSR_F15H_PERF_CTL1 (MSR_F15H_PERF_CTL + 2) +#define MSR_F15H_PERF_CTL2 (MSR_F15H_PERF_CTL + 4) +#define MSR_F15H_PERF_CTL3 (MSR_F15H_PERF_CTL + 6) +#define MSR_F15H_PERF_CTL4 (MSR_F15H_PERF_CTL + 8) +#define MSR_F15H_PERF_CTL5 (MSR_F15H_PERF_CTL + 10) + #define MSR_F15H_PERF_CTR 0xc0010201 +#define MSR_F15H_PERF_CTR0 MSR_F15H_PERF_CTR +#define MSR_F15H_PERF_CTR1 (MSR_F15H_PERF_CTR + 2) +#define MSR_F15H_PERF_CTR2 (MSR_F15H_PERF_CTR + 4) +#define MSR_F15H_PERF_CTR3 (MSR_F15H_PERF_CTR + 6) +#define MSR_F15H_PERF_CTR4 (MSR_F15H_PERF_CTR + 8) +#define MSR_F15H_PERF_CTR5 (MSR_F15H_PERF_CTR + 10) + #define MSR_F15H_NB_PERF_CTL 0xc0010240 #define MSR_F15H_NB_PERF_CTR 0xc0010241 #define MSR_F15H_PTSC 0xc0010280 -- 2.7.4