Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754736AbcCULTK (ORCPT ); Mon, 21 Mar 2016 07:19:10 -0400 Received: from terminus.zytor.com ([198.137.202.10]:49714 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754400AbcCULS4 (ORCPT ); Mon, 21 Mar 2016 07:18:56 -0400 Date: Mon, 21 Mar 2016 04:18:07 -0700 From: tip-bot for Kan Liang Message-ID: Cc: alexander.shishkin@linux.intel.com, eranian@google.com, hpa@zytor.com, linux-kernel@vger.kernel.org, acme@redhat.com, jolsa@redhat.com, torvalds@linux-foundation.org, dsahern@gmail.com, namhyung@kernel.org, peterz@infradead.org, mingo@kernel.org, kan.liang@intel.com, vincent.weaver@maine.edu, tglx@linutronix.de Reply-To: linux-kernel@vger.kernel.org, alexander.shishkin@linux.intel.com, hpa@zytor.com, eranian@google.com, acme@redhat.com, jolsa@redhat.com, dsahern@gmail.com, torvalds@linux-foundation.org, peterz@infradead.org, namhyung@kernel.org, kan.liang@intel.com, mingo@kernel.org, vincent.weaver@maine.edu, tglx@linutronix.de In-Reply-To: <1458500301-3594-1-git-send-email-kan.liang@intel.com> References: <1458500301-3594-1-git-send-email-kan.liang@intel.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/urgent] perf/x86/intel/uncore: Remove ev_sel_ext bit support for PCU Git-Commit-ID: cb2252522aaff572f28dc6613307e1e0e62496cd X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3124 Lines: 82 Commit-ID: cb2252522aaff572f28dc6613307e1e0e62496cd Gitweb: http://git.kernel.org/tip/cb2252522aaff572f28dc6613307e1e0e62496cd Author: Kan Liang AuthorDate: Sun, 20 Mar 2016 11:58:21 -0700 Committer: Ingo Molnar CommitDate: Mon, 21 Mar 2016 11:16:19 +0100 perf/x86/intel/uncore: Remove ev_sel_ext bit support for PCU The ev_sel_ext in PCU_MSR_PMON_CTL is locked on some CPU models, so despite it being documented in the SDM, if we write 1 to that bit then we can get a #GP fault. Which #GP the perf fuzzer happily triggered in Peter Zijlstra's testing. Also, there are no public events which use that bit, so remove ev_sel_ext bit support for PCU. Reported-by: Peter Zijlstra Signed-off-by: Kan Liang Acked-by: Peter Zijlstra Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: David Ahern Cc: Jiri Olsa Cc: Linus Torvalds Cc: Namhyung Kim Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Link: http://lkml.kernel.org/r/1458500301-3594-1-git-send-email-kan.liang@intel.com Signed-off-by: Ingo Molnar --- arch/x86/events/intel/uncore_snbep.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/arch/x86/events/intel/uncore_snbep.c b/arch/x86/events/intel/uncore_snbep.c index 93f6bd9..ab2bcaa 100644 --- a/arch/x86/events/intel/uncore_snbep.c +++ b/arch/x86/events/intel/uncore_snbep.c @@ -46,7 +46,6 @@ (SNBEP_PMON_CTL_EV_SEL_MASK | \ SNBEP_PCU_MSR_PMON_CTL_OCC_SEL_MASK | \ SNBEP_PMON_CTL_EDGE_DET | \ - SNBEP_PMON_CTL_EV_SEL_EXT | \ SNBEP_PMON_CTL_INVERT | \ SNBEP_PCU_MSR_PMON_CTL_TRESH_MASK | \ SNBEP_PCU_MSR_PMON_CTL_OCC_INVERT | \ @@ -148,7 +147,6 @@ /* IVBEP PCU */ #define IVBEP_PCU_MSR_PMON_RAW_EVENT_MASK \ (SNBEP_PMON_CTL_EV_SEL_MASK | \ - SNBEP_PMON_CTL_EV_SEL_EXT | \ SNBEP_PCU_MSR_PMON_CTL_OCC_SEL_MASK | \ SNBEP_PMON_CTL_EDGE_DET | \ SNBEP_PCU_MSR_PMON_CTL_TRESH_MASK | \ @@ -258,7 +256,6 @@ SNBEP_PCU_MSR_PMON_CTL_OCC_SEL_MASK | \ SNBEP_PMON_CTL_EDGE_DET | \ SNBEP_CBO_PMON_CTL_TID_EN | \ - SNBEP_PMON_CTL_EV_SEL_EXT | \ SNBEP_PMON_CTL_INVERT | \ KNL_PCU_MSR_PMON_CTL_TRESH_MASK | \ SNBEP_PCU_MSR_PMON_CTL_OCC_INVERT | \ @@ -472,7 +469,7 @@ static struct attribute *snbep_uncore_cbox_formats_attr[] = { }; static struct attribute *snbep_uncore_pcu_formats_attr[] = { - &format_attr_event_ext.attr, + &format_attr_event.attr, &format_attr_occ_sel.attr, &format_attr_edge.attr, &format_attr_inv.attr, @@ -1313,7 +1310,7 @@ static struct attribute *ivbep_uncore_cbox_formats_attr[] = { }; static struct attribute *ivbep_uncore_pcu_formats_attr[] = { - &format_attr_event_ext.attr, + &format_attr_event.attr, &format_attr_occ_sel.attr, &format_attr_edge.attr, &format_attr_thresh5.attr,