Received: by 2002:a25:86ce:0:0:0:0:0 with SMTP id y14csp679028ybm; Tue, 21 May 2019 01:27:54 -0700 (PDT) X-Google-Smtp-Source: APXvYqxVjHS5oxbAU2LWHMxYFy0lypI5RJcItVjvW68l0Nix6/ajpsOgr6PjLQkR3DSQKD/oJ5wt X-Received: by 2002:aa7:87d7:: with SMTP id i23mr85201705pfo.211.1558427274451; Tue, 21 May 2019 01:27:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558427274; cv=none; d=google.com; s=arc-20160816; b=lnOc9yIAAZVJVKMYCb8LUcqYmIuTCOAn5BTHkqICPVKDF9xCoDmUr3OhHNFiwPro8R sjf9m6V36pfLadRu6/vmwKqvoeX0Nx2Eh1FHDWfIHvIxyNuKdJpFgHOjeqKEjVF/5WJR uFKW03UJxMAQHb2+TUr4B822wO2OfSb9Y368b8os2JTlqEdgkyxrZUZXcSVZm1vWEPVv /aNW+UZp7p8d1Nl2f8OgbC5TJrJOydPEM9CEN8qXBKnFCjjb6ZVB4tDFVAyCv4z3Proy ZBoM+eLJW7SLV/gPI3Q5NmDXMyZ+gVH9tcRyW3aoeU6ymG7Dzku5YS1NSj1IWUveSuXn DinA== 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=viWdTQ9tUhJopSAfRBIkklI9VecRmEX6du25WNkr2qI=; b=CuZiYcgcBovTvaqbFCepgvoTFnlSG2tDVCBpwxobEK3Lh/Cb1n8P4YK+4z4XVEgNyT OV5jqBNrjgS4i3+PB5S0SUEDw06rq5MoRjz0vJCHPFxiEkSlL16EESiNUdAl3428+CaI 1SXp5LqL7B1qx9GC9PNq85ziGCbxn0R8Ppnx9xkw8KG86M3gvdX0oAT9IESomUQsq5k5 e8ILAGTptOTUM9pVX00ga3OnCYxJB8QpJAfBrYP44kW9LvaETsZXjIBnNeIdnc9qfSAD CDVmPy0TKlP0X//fUuniQLKxta2a6kFvtOd+7i9rSrPBT3bL1PIJbLu3ea1nxqs9hFjN 04SQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=WMH8l2uI; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e11si21270061plb.123.2019.05.21.01.27.38; Tue, 21 May 2019 01:27:54 -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=@gmail.com header.s=20161025 header.b=WMH8l2uI; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726996AbfEUI0Q (ORCPT + 99 others); Tue, 21 May 2019 04:26:16 -0400 Received: from mail-wr1-f66.google.com ([209.85.221.66]:33246 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726389AbfEUI0Q (ORCPT ); Tue, 21 May 2019 04:26:16 -0400 Received: by mail-wr1-f66.google.com with SMTP id d9so4530563wrx.0 for ; Tue, 21 May 2019 01:26:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=viWdTQ9tUhJopSAfRBIkklI9VecRmEX6du25WNkr2qI=; b=WMH8l2uIrdCX0ML2d36ILtIsa+Y739OvpGMoOcqFiyKZI+NbNLqKHV//aVGCi/Wab0 whMV8dhZt72pE91lU4vvu4jOwTc4TEoaMXpKi+a6nXNV4CwuWBMov9x2R7kRAj2+JC0d i+yre5+BaUJgZh5wjsCokJprjWWTE7Hf7k/fAvqZkv82rC+8XKmMuY6sm96JUSqNoJk9 JJ0QFSXA6SfOUvPIr6bgcPBN5P5teXuwxc77ABGCPkDuCPuAACfrq402gCYKBHFmNawC KQaJwpcIxmlEN59ddnM4zZQqg/S8ahZvoMeeqOEeq29H/ZoufEj2hkl7/LwLZovf+qhE 0fGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=viWdTQ9tUhJopSAfRBIkklI9VecRmEX6du25WNkr2qI=; b=Sq+0XHjv0SC1+AQJEm2K2t2yyGahDDQ5uy/6xB6hmFqOOkVmnIitqF3zpirgYU8rcB NmnP/s3yCeR+TpWm6wqyLJndMBegfVFWv0+0PsBGqGQm64jCt8rFvqEcfYbWS90ZVVKG yeX7JPTnU017DHt3UpxIvMAfk0sr0G+vK1KiY6OOus9H3Qg3J9EKL3cQrHRjPfKHvA5z A4GwAAYwasMXJHHNXWalRGkCr/9AO0M+T6kycqG8NQvZ/FCKsVcw0F1hsbcZspv1gMnD q7LVLAFVEr7efwEyzAyewEzBdTfvKBrLXoya7kd2KadYEkuFgJL/ZB1rwBW8s5Y16Zmj USHg== X-Gm-Message-State: APjAAAVi+3FtD+thQHgFP6enBq3+Kr2vBaOUj7n09ZFnr+DZCmw4b27n j/UVCdFhXA/YRj1cNicYnkA= X-Received: by 2002:adf:cf03:: with SMTP id o3mr4743916wrj.5.1558427174435; Tue, 21 May 2019 01:26:14 -0700 (PDT) Received: from gmail.com (2E8B0CD5.catv.pool.telekom.hu. [46.139.12.213]) by smtp.gmail.com with ESMTPSA id l14sm18337076wrt.57.2019.05.21.01.26.13 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 21 May 2019 01:26:13 -0700 (PDT) Date: Tue, 21 May 2019 10:26:11 +0200 From: Ingo Molnar To: Stephane Eranian Cc: linux-kernel@vger.kernel.org, peterz@infradead.org, ak@linux.intel.com, kan.liang@intel.com, jolsa@redhat.com, vincent.weaver@maine.edu Subject: Re: [PATCH v2] perf/x86/intel/ds: fix EVENT vs. UEVENT PEBS constraints Message-ID: <20190521082611.GA34626@gmail.com> References: <20190521005246.423-1-eranian@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190521005246.423-1-eranian@google.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 * Stephane Eranian wrote: > This patch fixes an issue revealed by the following commit: > Commit 6b89d4c1ae85 ("perf/x86/intel: Fix INTEL_FLAGS_EVENT_CONSTRAINT* masking") > > That patch modified INTEL_FLAGS_EVENT_CONSTRAINT() to only look at the event code > when matching a constraint. If code+umask were needed, then the > INTEL_FLAGS_UEVENT_CONSTRAINT() macro was needed instead. > This broke with some of the constraints for PEBS events. > Several of them, including the one used for cycles:p, cycles:pp, cycles:ppp > fell in that category and caused the event to be rejected in PEBS mode. > In other words, on some platforms a cmdline such as: > > $ perf top -e cycles:pp > > would fail with EINVAL. > > This patch fixes this issue by properly using INTEL_FLAGS_UEVENT_CONSTRAINT() > when needed in the PEBS constraint tables. > > In v2: > - add fixes for Core2, Nehalem, Silvermont, and Atom > > Reported-by: Ingo Molnar > Signed-off-by: Stephane Eranian > --- > arch/x86/events/intel/ds.c | 28 ++++++++++++++-------------- > 1 file changed, 14 insertions(+), 14 deletions(-) Thanks Stephane for the quick fixes! Ingo