Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp688646yba; Mon, 1 Apr 2019 14:49:59 -0700 (PDT) X-Google-Smtp-Source: APXvYqxhShQKVyS/6wVI1oRRA3ixgXIhTyMBlv7qHcmoaJ+eqxSwCy3MnZgBCzV3J5TeK5mMEbBh X-Received: by 2002:a63:b03:: with SMTP id 3mr24509867pgl.267.1554155399596; Mon, 01 Apr 2019 14:49:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554155399; cv=none; d=google.com; s=arc-20160816; b=OLtyqESCVhCsE2mXjxpYViGl6XscbTevyJFnykhuJJpT6mu+rzwTdg+GnWSJ27IKrf iI8TVsKxVbDWURaGXOMEWlEB2iqxTd6fUfnd2FfD8crFm/PEc3vVpvu9DGbU1s+COGM2 CfjTyy13EuX5RhxKJE0JW6CpcRiorIsFLoRYN8hB6O+Y3IM+zWu6cGuozNz7xdaokZty /jgmYOhzipFiroxNxaHioc0q1GMx2DRjWdyRYlYP76uQUQN7hAI0QJwtpu+pxmrcn6h6 FK3ZdB7HpwwP+qsflZK0vK2Y8nvi2zeRAeq0EsNsBlmE3fSn5yCAkfWxCDIFSGnNwx2n PoSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-id:content-language:accept-language:in-reply-to:references :message-id:date:thread-index:thread-topic:subject:cc:to:from :dkim-signature; bh=rPBRXZu24BJtAVte9vb10wQ/hIMyZ7+eDTVThXsAjBk=; b=09D+/FJUxbq3ETvAwwYu9HwunkZWh24V73pyBsjRCXADXLUgw27H1qePS7h7+TxyU9 T29X3AqN3xCV7JbQiTZQ8QXWOeA3Y3I8HpAaQg4bOxmsr9JXGuvsbGEIrOJty6byl1pU KNIOCay+DkJeo6tjP6A1AzOmk8utmx8WBn9K6xRTXoZadadMhkVV2M/NxdN/udzwzO7L HsptmhFZNYBS7KdZQ4H6oA1Tuyt/7OCAONwSVQRzaNeL2P9QROGZMG6qDzNhoL91gCJf CY8V3u5qk45UApYG5cm0sw3uaP9xAYx85JqyoiYF23QsbwvS717VqK700CmuHw6hiF5a Sk7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amdcloud.onmicrosoft.com header.s=selector1-amd-com header.b=27EjAoJl; 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 e6si9927374pfe.141.2019.04.01.14.49.43; Mon, 01 Apr 2019 14:49:59 -0700 (PDT) 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=27EjAoJl; 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 S1728587AbfDAVrA (ORCPT + 99 others); Mon, 1 Apr 2019 17:47:00 -0400 Received: from mail-eopbgr720071.outbound.protection.outlook.com ([40.107.72.71]:31677 "EHLO NAM05-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725891AbfDAVq7 (ORCPT ); Mon, 1 Apr 2019 17:46:59 -0400 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:X-MS-Exchange-SenderADCheck; bh=rPBRXZu24BJtAVte9vb10wQ/hIMyZ7+eDTVThXsAjBk=; b=27EjAoJlm1qyR9KHkfhtcYUsp6Syq1rj2+5TGK/FZriRWO5P06dT25H8JNxXQV5UhveNwI93lJgBw8kD6nix4+gUgnshmdkbM9qQdRXxCovCorwlg11+IZaK+wCVH0xJ5DklKYd2gZlKo73f7eACfaLs3Nda+pbh4oe/NpEo0go= Received: from DM6PR12MB3163.namprd12.prod.outlook.com (20.179.104.150) by DM6PR12MB2970.namprd12.prod.outlook.com (20.178.29.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1750.16; Mon, 1 Apr 2019 21:46:55 +0000 Received: from DM6PR12MB3163.namprd12.prod.outlook.com ([fe80::b1af:416d:c2c3:8e3b]) by DM6PR12MB3163.namprd12.prod.outlook.com ([fe80::b1af:416d:c2c3:8e3b%5]) with mapi id 15.20.1750.014; Mon, 1 Apr 2019 21:46:55 +0000 From: "Lendacky, Thomas" To: "x86@kernel.org" , "linux-kernel@vger.kernel.org" CC: Peter Zijlstra , Arnaldo Carvalho de Melo , Alexander Shishkin , Ingo Molnar , Borislav Petkov , Namhyung Kim , Thomas Gleixner , Jiri Olsa Subject: [RFC PATCH v3 3/3] x86/perf/amd: Remove need to check "running" bit in NMI handler Thread-Topic: [RFC PATCH v3 3/3] x86/perf/amd: Remove need to check "running" bit in NMI handler Thread-Index: AQHU6NRsGGzwCXGrrEa55lzD9WvHCA== Date: Mon, 1 Apr 2019 21:46:55 +0000 Message-ID: <155415521330.24457.17682624895095754774.stgit@tlendack-t1.amdoffice.net> References: <155415519143.24457.2706922532995302758.stgit@tlendack-t1.amdoffice.net> In-Reply-To: <155415519143.24457.2706922532995302758.stgit@tlendack-t1.amdoffice.net> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: SN6PR04CA0100.namprd04.prod.outlook.com (2603:10b6:805:f2::41) To DM6PR12MB3163.namprd12.prod.outlook.com (2603:10b6:5:182::22) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Thomas.Lendacky@amd.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [165.204.78.1] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 325979a9-cfe8-45b4-e35c-08d6b6eb8ebf x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(5600139)(711020)(4605104)(4618075)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7193020);SRVR:DM6PR12MB2970; x-ms-traffictypediagnostic: DM6PR12MB2970: x-microsoft-antispam-prvs: x-forefront-prvs: 0994F5E0C5 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(376002)(396003)(366004)(346002)(39860400002)(136003)(199004)(189003)(43544003)(4326008)(8676002)(71190400001)(66066001)(102836004)(53936002)(6116002)(26005)(54906003)(103116003)(81166006)(86362001)(110136005)(25786009)(97736004)(81156014)(316002)(186003)(106356001)(105586002)(76176011)(7736002)(99286004)(14444005)(486006)(7416002)(305945005)(8936002)(71200400001)(2906002)(256004)(6436002)(2501003)(14454004)(446003)(478600001)(52116002)(6506007)(386003)(72206003)(6512007)(5660300002)(3846002)(11346002)(9686003)(68736007)(476003)(6486002);DIR:OUT;SFP:1101;SCL:1;SRVR:DM6PR12MB2970;H:DM6PR12MB3163.namprd12.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: amd.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: x8Hbb7GZrqLvKtgkzOnQeXMVXdWPCOwAF4sTp2Qtwlr9iycR3priFM/HkWvln0zPha12RcMF++7JSMxM1cR4DKzKdtVDwE5ZkZnHqtM2+6jLeQ2dsw2fk3tJWR5GilkBhtETLw813ID6uFtIpzpi0km9IGtsWapc4orFJtoSpLeaWCMAlvd3UHI5XrZUW3fB6qCCMPNAhUnW1PgyEWJabm9v9oqEYb6Lehp1YFuBhhhMoLbet0Fq5MPtjbtgVK5nMIkSdz6xRIrdp0jdcb+SWHEbcamtgQAWnQEC4JAnTPwFhLElBOuKkxgnXtEKYsYmVtf7VMfyjKys4SG4ZHhInjUis3JMqoNoGJOFDkBhHrannTIO5tp/hSHCqMeKvqlUjicvWsAbMRsHKpFv91W3OScb4D/dTw2HcRtBRu/sppM= Content-Type: text/plain; charset="utf-8" Content-ID: <7A5D6227EC7F5643A70C79971B409B8E@namprd12.prod.outlook.com> Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 325979a9-cfe8-45b4-e35c-08d6b6eb8ebf X-MS-Exchange-CrossTenant-originalarrivaltime: 01 Apr 2019 21:46:55.0725 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB2970 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org U3B1cmlvdXMgaW50ZXJydXB0IHN1cHBvcnQgd2FzIGFkZGluZyB0byBwZXJmIGluIGNvbW1pdDoN CjYzZTZiZTZkOThlMSAoInBlcmYsIHg4NjogQ2F0Y2ggc3B1cmlvdXMgaW50ZXJydXB0cyBhZnRl ciBkaXNhYmxpbmcgY291bnRlcnMiKQ0KDQpUaGUgdHdvIHByZXZpb3VzIHBhdGNoZXMgKHJlc29s dmluZyB0aGUgcmFjZSBjb25kaXRpb24gd2hlbiBkaXNhYmxpbmcgYQ0KUE1DIGFuZCBOTUkgbGF0 ZW5jeSBtaXRpZ2F0aW9uKSBhbGxvdyBmb3IgdGhlIHJlbW92YWwgb2YgdGhpcyBvbGRlcg0Kc3B1 cmlvdXMgaW50ZXJydXB0IHN1cHBvcnQuDQoNCkN1cnJlbnRseSBpbiB4ODZfcG11X3N0b3AoKSwg dGhlIGJpdCBmb3IgdGhlIFBNQyBpbiB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