Received: by 10.223.176.5 with SMTP id f5csp170452wra; Tue, 30 Jan 2018 09:39:51 -0800 (PST) X-Google-Smtp-Source: AH8x224qCflBJN99lDID2MReD8DfPGa6x1n2YslLhs+HY9Drs+wyQSFqNpeDAtVW7OaqeRfyuoxj X-Received: by 2002:a17:902:7841:: with SMTP id e1-v6mr6162922pln.130.1517333990963; Tue, 30 Jan 2018 09:39:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517333990; cv=none; d=google.com; s=arc-20160816; b=FzROOT0A1XtjNmHzofs/CLaYnIathlI9zCLUt0ktDmnC4IFa06iuvKYBmpiNFwDjUW Pkd8jOIXjB+THVDptzGgIlOxnta2YjJPYWw7FW1SNw/xm2eeZ083iyK18LU/Xl827ISI +QSFuCX7bFIuy1mqa2X+Fi44MwypuKn0IrxFDi3ayUiJ97Y8TanLYLbTVvoEVcNP+uc0 jr++HGibmbe8WFjPTKA9LXl3tjiIlP0jHThXcOU7wVd3hDbdmoi62WuQ0C0pWccZ3DM2 62s8tbWYf8OkIEisloTXRsXEHaHxE3WUGZXteAC3W4jcNnXjFTRVyBFZ78GJfhCRX74H w3sA== 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=pAeQcdK2ZFXaaJE7cH084Si9PU2JhpjKUgd/TZIDOnhkOYTKYONEvE0HQ7bbed+krY qRtHhF6nbW5E+PqChh0/VPwEozXYvyGpwRTPyWbW+IqUaSf0bq0Wx5RPqoN50/Nx1lPM xPapax0qcGaX5M/BvmBgdN1lsHFjC0grbGFMdsjapazXF4pRodHGli3LD26EDEsVx1Qv 3JGdyT2U64YKiKmk4SuDZc3ptzc18+nAllQSBq5DTnFkoyhQlcAM9BNGfeZS/ERDYmSk 2e13m5Dae9tktJ2zKo56VWdttwfe2N5faBTq4pQUKy2Emi8/Y0ZtGO3ez87Dm26I6xxf dtIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amdcloud.onmicrosoft.com header.s=selector1-amd-com header.b=ZDUIQz3Z; 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 z61-v6si109788plb.669.2018.01.30.09.39.36; Tue, 30 Jan 2018 09:39:50 -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=ZDUIQz3Z; 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 S1753620AbeA3RdE (ORCPT + 99 others); Tue, 30 Jan 2018 12:33:04 -0500 Received: from mail-sn1nam02on0072.outbound.protection.outlook.com ([104.47.36.72]:33552 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753348AbeA3Rc6 (ORCPT ); Tue, 30 Jan 2018 12:32:58 -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=ZDUIQz3ZDXDu/ZFAjg0a6bTb0rw6mzYK4jrcv66TXcWvvAqjYbzEVIUIKAjqDNogg/J7s6EadJCMiYzK+CQV7cgNV+merzHITrR2UjdzQ54/kRxvWUst/MUKQwS2gEEcUH5P+y9p+MrnowShtgRNKNuyrHBcRCt5KmB0qdGatgE= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Janakarajan.Natarajan@amd.com; Received: from gi-joe.amd.com (165.204.77.1) by BN6PR12MB1362.namprd12.prod.outlook.com (10.168.228.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.444.14; Tue, 30 Jan 2018 17:32:53 +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 , Kyle Huey , Tom Lendacky , Borislav Petkov , Grzegorz Andrejczuk , Kan Liang , Janakarajan Natarajan Subject: [PATCH v4 1/3] x86/msr: Add AMD Core Perf Extension MSRs Date: Tue, 30 Jan 2018 11:32:41 -0600 Message-Id: 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: DM5PR10CA0015.namprd10.prod.outlook.com (10.172.33.25) To BN6PR12MB1362.namprd12.prod.outlook.com (10.168.228.20) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 8a7d5a77-c120-476c-4f65-08d568077f2e X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(48565401081)(5600026)(4604075)(2017052603307)(7153060)(7193020);SRVR:BN6PR12MB1362; X-Microsoft-Exchange-Diagnostics: 1;BN6PR12MB1362;3:X48geoeU6pMHjZQRYfJ9A9RRWeTRG7EofXxkxkajC2G9uHmS23qhclPT/GX0XU0diV+ZbLjWZZtpKSUwb6fe5QYWpbgrIfCy4wNJ7sSVDVefDFKFdZzL8EVw5t0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MV8B6T6cvsoDO+FEE2Xfi4rQXB0QkhvPxfhAVlBIE4CQZhlixGO3US90Oqgj3AEtAm0RCMFaHSnTfihkZ+pC3KjUn+qdaj+1F9yRnTRdJmNgP2K7JIVb3lBkqV7GFZzIJc/SCASUBJkJXvG9W0LOvZiqq9QgxY/j+kKJStLyRJdEW9TRVRh3nN7ipuM02Qj/kqEsZzScQvYWKaX+TXMbhlqD4pnUbdhJaEO;4:Y+SkFDulX3DU90/Dm+pa/JQZRVFIn2lqopEpNwJSL0TUnK5GDo8DBHzxCACtYQIst4KQO3d+EP36kiue7DDcmIKwmftlAGVeWCTdVfvSj6L4Yr3x83A0FqTn1kRzn2bjxU0bFMxTXDOPJoSJibLV/HtxjFCZxUki6IZLibkoZen0QrkFiRqq4BJYgjTZ25xy11AJbZ4asKcPLlsVTGwoIMXVHJbMI0Hp3Z4rVVX0uULHDVFCmU2iVQB3C7w93mQVtfgw8ycDmruBDkAYAttbTmj7sgLHPipDHB82l0jRwEISTcCgVLr2LaYCiOMIT288 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)(944501161)(93006095)(93001095)(10201501046)(3002001)(6055026)(6041288)(20161123558120)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123562045)(6072148)(201708071742011);SRVR:BN6PR12MB1362;BCL:0;PCL:0;RULEID:;SRVR:BN6PR12MB1362; X-Forefront-PRVS: 0568F32D91 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(39380400002)(376002)(366004)(346002)(39860400002)(396003)(189003)(199004)(6116002)(47776003)(53936002)(66066001)(316002)(2906002)(118296001)(7416002)(54906003)(386003)(72206003)(52116002)(478600001)(16586007)(25786009)(305945005)(5660300001)(26005)(76176011)(3846002)(7696005)(6666003)(7736002)(97736004)(4326008)(51416003)(53416004)(36756003)(6486002)(68736007)(50226002)(2950100002)(106356001)(8676002)(8936002)(81156014)(186003)(81166006)(105586002)(48376002)(16526019)(86362001)(50466002);DIR:OUT;SFP:1101;SCL:1;SRVR:BN6PR12MB1362;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;BN6PR12MB1362;23:vvCiUsmuRdgQoVxVzE2fEwMvVNdICHUFnwMtnzFZk?= =?us-ascii?Q?ACBjy4r47BWc2TlbLOX1pAP1MfHoBWRsgPD4vGHotosJX8vhwZH2tYKKb0Jl?= =?us-ascii?Q?YnVabUn5l6AGA6iDwFVP59B0/e6jSTFXjaxA330lXS/82WUQ0lvpNCOyqxYq?= =?us-ascii?Q?5d8+JCnhN6bqt+uYvZMSko0XuZScQsj1T1pFaOxdMZz7QyrwASjQFQGnmBls?= =?us-ascii?Q?b7lINQTejhFiOYG3G+7DTDAS+UxGBlA3W0q+ffxeuYKV8PapO9FVWc1MOyEd?= =?us-ascii?Q?dgRKE/Zr7hR2U34bxMqIAIHnbEHZ1+hkq5COXXCGzdZU8f1v5iqAE/rhVKKE?= =?us-ascii?Q?zdMGyyiAZK5StpJZ96a/BdFidsjn6oUajgBkNGDl1Sd7XUwJMN6lKF0OrpxA?= =?us-ascii?Q?JIffTJh6lQBTl34ntbuMIBRl0L76zdcap5wilWt1v7+2bVR6sNKbRfMtCZk9?= =?us-ascii?Q?sZ3OdOlSsMi6F8w5AtoCw2jnmEOsoSARw9hHpgygc/EJanvbPUfK930D21qG?= =?us-ascii?Q?O4tvcxA4RsApgdHN8TbOCHwewzX1p2TjwMR1MgtcJt5Uv+yIAAPDxPmQ2BlA?= =?us-ascii?Q?89ofYfmclBhP4Gq7GGMaURaYLzRKoGajgonn3DHMoDGP099pjsOV4DsC0qE2?= =?us-ascii?Q?jp/8f1LRhGPtR3/Y9f71gK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ggK4ChjobvivZZBU282mKCLxhj+aHLs+TAjMhWm8WpKXc7Is8lKjGRcqjwiWhCBN4uaxzB5VFJBJYvfWUt9Ks9xQWTIeCo/8Exf/Ly7Q3T4R/oYV/SYlMMEfGye0g3/EE=;24:GKG6s+TrkumAyiZzeOIXl0ECGafZ0eXZcoQBVhXLMhQGHGp8G+Kvdb6+Fo5cs5H6IfpsEXboaVcGoA5K/eDGyCpswpUfjcx6oI/sUALtx98=;7:8vRNAl/WejtD7GLTSgRvFZZooV7JYJpenTsYbo2k83dNuSJuG2sbg5eg2PBWSuYjgcbWzaq5+K8XCyFYWdito2kHPUsat/XEPmN+/GTkiaG8RwGs77tyO6H1ie9amKLir4OyEWGlcQCzIkqjRVeF6MVjhocSTghSKd2zMsgifxsllynDceymAITRmFVF26V7dRL83EdXUNSA0YgErfC66D9fqZKn2nxKLjtj3BXzssftWuI5oPD5M+CJVDhQo4l+ SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;BN6PR12MB1362;20:myr5DR0TIMysR2yyMIFtU1Bg8nlV/rfGXY72ifSZGf07067RByuaNgXBft4t+oli+XNgz+QoHbEKt/AFavftCnoYIUrjj0XVZVcZXmKW6AMYuFwfMal8552mk+UGh+yqqS0TECUOKGtSiAojp12R1WszC6m0oOdJYJYGsyJ5ZGg5BpiiBuYJUx+GJM8RMtsAMG/j7tZi3b8Fixciw00SsdXS/W6QWKSkdVJiQMCPVC/xUvlCbSJHKqChzeyv1n5C X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Jan 2018 17:32:53.8562 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8a7d5a77-c120-476c-4f65-08d568077f2e X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR12MB1362 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