Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp460557ybd; Wed, 26 Jun 2019 00:56:41 -0700 (PDT) X-Google-Smtp-Source: APXvYqwWUaU9Zu0h4nmPiw6gAC2WQ0nQn49XZ268P0RLwAFMu5RmPAMp/B9MJdM/heQjIWVyn3jI X-Received: by 2002:a17:90a:30e4:: with SMTP id h91mr3013037pjb.37.1561535801769; Wed, 26 Jun 2019 00:56:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561535801; cv=none; d=google.com; s=arc-20160816; b=kU7hx7NiPOcVykYqw7P/spg8yFOEC3wy8JifPAZFkuB6YEswU2KZLS8rOGmDIIyMwq yAXPK6xXpI0+WPUNM4HRYKlwDyV5OLtMvNXYjsoVwFkVqLCL8OJntpFw2rld/EIbTjfu 6sQm0+ZGkc0kqpGi3OgNyVrBnTxcoBDee0Uox9ylNIT7m3XKcDGTdSSGYho6eJPUhH3r aiiwz9Gfo1g+orAC8IHi4PjDOigUIsEV0a6EfbOgfmxDN5vqugr3yUYiswyN9DHKucNt Ltm8dHWvWK6+AxaEzcmO2Xf9h9etxrdoy7mr1yvkKoi0gzpNACMXltDs1njKtONCfy2d WD2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=liZehjV6yq2WxrgDL5h4NwlwF63olriPQGBcf7kidZk=; b=TbVyYRWvZYSUnymOuGOdlxsnmQ5PkwU7eY4uvRQoeyoHIfhl/lHoBcSZ8gcPGiPMZu te/Al9d6xQqW1EOROZWwmsuLMyAj2vgJhDRd3zEjRaUF+MHIXPIzK285F/PDN3RcI3Ln vnIfnJnkjL4phGC/TDhy7nlTSUwnzo/dsBPiuuumXNAEmcMqqY/KFghB0c28GpIeruVT nzZcTBTi/s8qgTmpR4RChq7prAnU6l1iK9LLwTqTiZgzgSsSf0kg7vP1Z3rw3U+7r7jq OXhle2h+zMWFT0ZhzaXD0yanSyii3RaC6/lSWzHvOKyUi9Vbty3f9HfrMZudbh3L02Jj 6ngw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=QhxqLBcN; 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 j31si4122382pgi.151.2019.06.26.00.56.25; Wed, 26 Jun 2019 00:56:41 -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=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=QhxqLBcN; 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 S1726508AbfFZH4O (ORCPT + 99 others); Wed, 26 Jun 2019 03:56:14 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:37888 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725379AbfFZH4O (ORCPT ); Wed, 26 Jun 2019 03:56:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=liZehjV6yq2WxrgDL5h4NwlwF63olriPQGBcf7kidZk=; b=QhxqLBcNl1rG6mEsaPN11LcDl m33b5go99KfJxgwuiMSZXqc1ssEG023S3UUtSkCT0DILnT4j1Du6IPP7y5avepmcYmwcfAPXGRybe JFEXxjA+7/71H2VFnMcHoXA7M0N2zRu7r5L5VvKJAhVD+5YzRuYQbFcKB/bxFA14ZhSMeh1Cgc5sl nZKAqDbRGL97BAXFf5MtqvUrY4mRWMY4kSJKP/k2xf2UfxfO0mgNvJfWwtuJ0tfKOtIkAKl2G3Z4c 7hbhWz1FhtVJD78+1CkEGc3skwsmn3pNj0cRiNRjyS1v67iKvVCqnMDVak2PxeqD4iyhFtoIlTvpK 6guZ6U3tQ==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.92 #3 (Red Hat Linux)) id 1hg2mD-0006TL-KB; Wed, 26 Jun 2019 07:55:33 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 4BAA6209CEE60; Wed, 26 Jun 2019 09:55:31 +0200 (CEST) Date: Wed, 26 Jun 2019 09:55:31 +0200 From: Peter Zijlstra To: "Phillips, Kim" Cc: Ingo Molnar , "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" , Arnaldo Carvalho de Melo , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Thomas Gleixner , Borislav Petkov , "H. Peter Anvin" , Martin Liska , "Suthikulpanit, Suravee" , "Natarajan, Janakarajan" , "Hook, Gary" , Pu Wen , Stephane Eranian , Vince Weaver , "x86@kernel.org" Subject: Re: [PATCH 1/2 RESEND2] perf/x86/amd/uncore: Do not set ThreadMask and SliceMask for non-L3 PMCs Message-ID: <20190626075531.GG3419@hirez.programming.kicks-ass.net> References: <20190625145548.11600-1-kim.phillips@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190625145548.11600-1-kim.phillips@amd.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 25, 2019 at 02:56:23PM +0000, Phillips, Kim wrote: > From: Kim Phillips > > Commit d7cbbe49a930 ("perf/x86/amd/uncore: Set ThreadMask and SliceMask > for L3 Cache perf events") enables L3 PMC events for all threads and > slices by writing 1s in ChL3PmcCfg (L3 PMC PERF_CTL) register fields. > > Those bitfields overlap with high order event select bits in the Data > Fabric PMC control register, however. > > So when a user requests raw Data Fabric events (-e amd_df/event=0xYYY/), > the two highest order bits get inadvertently set, changing the counter > select to events that don't exist, and for which no counts are read. > > This patch changes the logic to write the L3 masks only when dealing > with L3 PMC counters. > > AMD Family 16h and below Northbridge (NB) counters were not affected. > > Signed-off-by: Kim Phillips Still base64 encoded garbage; the actual email reads like below. Please use a sane MUa and send it plain text. --- Content-Transfer-Encoding: base64 RnJvbTogS2ltIFBoaWxsaXBzIDxraW0ucGhpbGxpcHNAYW1kLmNvbT4NCg0KQ29tbWl0IGQ3Y2Ji ZTQ5YTkzMCAoInBlcmYveDg2L2FtZC91bmNvcmU6IFNldCBUaHJlYWRNYXNrIGFuZCBTbGljZU1h c2sNCmZvciBMMyBDYWNoZSBwZXJmIGV2ZW50cyIpIGVuYWJsZXMgTDMgUE1DIGV2ZW50cyBmb3Ig YWxsIHRocmVhZHMgYW5kDQpzbGljZXMgYnkgd3JpdGluZyAxcyBpbiBDaEwzUG1jQ2ZnIChMMyBQ TUMgUEVSRl9DVEwpIHJlZ2lzdGVyIGZpZWxkcy4NCg0KVGhvc2UgYml0ZmllbGRzIG92ZXJsYXAg d2l0aCBoaWdoIG9yZGVyIGV2ZW50IHNlbGVjdCBiaXRzIGluIHRoZSBEYXRhDQpGYWJyaWMgUE1D IGNvbnRyb2wgcmVnaXN0ZXIsIGhvd2V2ZXIuDQoNClNvIHdoZW4gYSB1c2VyIHJlcXVlc3RzIHJh