Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp58056yba; Wed, 3 Apr 2019 04:32:01 -0700 (PDT) X-Google-Smtp-Source: APXvYqwT4MY5x7JH5T1jZUXMQOd0kFG2/cWcPEgJELqU//lA5AY/Rhaw5E13c0WnOl6Cpg5AdbCX X-Received: by 2002:a17:902:a704:: with SMTP id w4mr18153521plq.51.1554291121592; Wed, 03 Apr 2019 04:32:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554291121; cv=none; d=google.com; s=arc-20160816; b=0A5O0MY//wTOiUXRwv+M6yJuvREvJig260nNPSCRaOpyx7B7htiTMujv07YNM5MRk9 MZENd9GPVc2Ax8Qm665vDt2Z3X1NyhKcaNpuc0vAaDTuV3nNL4nlIgoLmuMU9GCNJeVe 8yyySQFWRPLWJEVEgEmcntLd1VQdw3GQwYyRXW2SGB1qz924byRfx9HMJXwhAzlQS1kT BBGIbBsVFZbthjA3gXWnvNo2b+drQfeFx2fN1BIAzcwlZJQ5ZJbWhGHCqLM8B2ZrtshP 4AGiz/VfpY/uNc/rvmM0vBE64U3L4+N6fnIMabrhzj4JQAWV0V2Px9MuXBZbnNrGw9mU CmZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=eOQ4h3hOLWlF/xPIBZ/GG3dge7wF/oApo+Tk0sgtlso=; b=O8GRZZaBqppb3p76JlINtuf2fBS4URfIixi7FunQ77+imhAELzhNQSkW+yYQ+nPyqR Jx/Nfasa3kR9sJn1lGsxBvH6EuPAd4+06BvOv7r8B7+zI3mPwwoPiKj/cIjiKjV2R2Og 58/4GNIsv43ldVcOkxVVDPUnbZ1AJgcQV+Z7PN2STgP3srZbszbbNdQhO1LOnM6K7x9Q Qw4/mK2bX6k6fnXgrpFs+Q92MPMdEniKlHCfQ0YSVay4opjHeEnehB2dexiceyjv5eT0 826F9GPyBInNnqOwmVP28vIWkXaez5QTYmor+lDYHfUPoDy1z4rN0Od0rlUmgVN0Klh6 7pvQ== ARC-Authentication-Results: i=1; mx.google.com; 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 r82si13632171pfa.252.2019.04.03.04.31.46; Wed, 03 Apr 2019 04:32:01 -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; 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 S1726580AbfDCLbD (ORCPT + 99 others); Wed, 3 Apr 2019 07:31:03 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:39887 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726183AbfDCLbC (ORCPT ); Wed, 3 Apr 2019 07:31:02 -0400 Received: from [5.158.153.52] (helo=nanos.tec.linutronix.de) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1hBe6R-0004at-NC; Wed, 03 Apr 2019 13:30:47 +0200 Date: Wed, 3 Apr 2019 13:30:47 +0200 (CEST) From: Thomas Gleixner To: nelson.dsouza@intel.com, jolsa@redhat.com, linux-kernel@vger.kernel.org, alexander.shishkin@linux.intel.com, peterz@infradead.org, vincent.weaver@maine.edu, eranian@google.com, hpa@zytor.com, mingo@kernel.org, torvalds@linux-foundation.org, acme@redhat.com cc: linux-tip-commits@vger.kernel.org Subject: Re: [tip:perf/urgent] perf/x86/intel: Initialize TFA MSR In-Reply-To: Message-ID: References: <20190321123849.GN6521@hirez.programming.kicks-ass.net> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 3 Apr 2019, tip-bot for Peter Zijlstra wrote: > Commit-ID: d7262457e35dbe239659e62654e56f8ddb814bed > Gitweb: https://git.kernel.org/tip/d7262457e35dbe239659e62654e56f8ddb814bed > Author: Peter Zijlstra > AuthorDate: Thu, 21 Mar 2019 13:38:49 +0100 > Committer: Ingo Molnar > CommitDate: Wed, 3 Apr 2019 11:40:32 +0200 > > perf/x86/intel: Initialize TFA MSR > > Stephane reported that the TFA MSR is not initialized by the kernel, > but the TFA bit could set by firmware or as a leftover from a kexec, > which makes the state inconsistent. > > Reported-by: Stephane Eranian > Tested-by: Nelson DSouza > Signed-off-by: Peter Zijlstra (Intel) > Cc: Alexander Shishkin > Cc: Arnaldo Carvalho de Melo > Cc: Jiri Olsa > Cc: Linus Torvalds > Cc: Peter Zijlstra > Cc: Thomas Gleixner > Cc: Vince Weaver > Cc: tonyj@suse.com > Link: https://lkml.kernel.org/r/20190321123849.GN6521@hirez.programming.kicks-ass.net > Signed-off-by: Ingo Molnar This lacks: 1) Fixes tag 2) Cc: stable .... Sigh. > --- > arch/x86/events/intel/core.c | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/arch/x86/events/intel/core.c b/arch/x86/events/intel/core.c > index 1539647ea39d..f61dcbef20ff 100644 > --- a/arch/x86/events/intel/core.c > +++ b/arch/x86/events/intel/core.c > @@ -3575,6 +3575,12 @@ static void intel_pmu_cpu_starting(int cpu) > > cpuc->lbr_sel = NULL; > > + if (x86_pmu.flags & PMU_FL_TFA) { > + WARN_ON_ONCE(cpuc->tfa_shadow); > + cpuc->tfa_shadow = ~0ULL; > + intel_set_tfa(cpuc, false); > + } > + > if (x86_pmu.version > 1) > flip_smm_bit(&x86_pmu.attr_freeze_on_smi); > >