From: Peter Zijlstra <peterz@infradead.org>
To: kan.liang@intel.com
Cc: andi@firstfloor.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org
Subject: Re: [PATCH V3 1/2] perf ignore LBR and offcore_rsp.
Date: Tue, 8 Jul 2014 11:25:13 +0200 [thread overview]
Message-ID: <20140708092513.GB6758@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <1404740066-4374-1-git-send-email-kan.liang@intel.com>
[-- Attachment #1: Type: text/plain, Size: 992 bytes --]
On Mon, Jul 07, 2014 at 06:34:25AM -0700, kan.liang@intel.com wrote:
> + /*
> + * Access LBR MSR may cause #GP under certain circumstances.
> + * E.g. KVM doesn't support LBR MSR
> + * Check all LBT MSR here.
> + * Disable LBR access if any LBR MSRs can not be accessed.
> + */
> + if (x86_pmu.lbr_nr) {
> + x86_pmu.lbr_msr_access = check_msr(x86_pmu.lbr_tos);
> + for (i = 0; i < x86_pmu.lbr_nr; i++) {
> + x86_pmu.lbr_msr_access &=
> + check_msr(x86_pmu.lbr_from + i);
> + x86_pmu.lbr_msr_access &=
> + check_msr(x86_pmu.lbr_to + i);
> + }
> + }
So I was going to refer you to an email I send earlier telling you that
this was wrong, but then found it got stuck in a mailqueue on my laptop
:-(
In any case its wrong; just clear lbr_nr and kill lbr_msr_access. We
already check lbr_nr in all the right places and you added
lbr_msr_access to far too few of them (also the fact that every place
you check lbr_msr_access already had an lbr_nr test should've been a
clue).
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2014-07-08 9:25 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-07 13:34 [PATCH V3 1/2] perf ignore LBR and offcore_rsp kan.liang
2014-07-07 13:34 ` [PATCH V3 2/2] kvm: ignore LBR and offcore rsp kan.liang
2014-07-08 9:25 ` Peter Zijlstra [this message]
2014-07-08 14:20 ` [PATCH V3 1/2] perf ignore LBR and offcore_rsp Liang, Kan
2014-07-08 9:29 ` Peter Zijlstra
2014-07-08 14:22 ` Liang, Kan
2014-07-08 14:31 ` Peter Zijlstra
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140708092513.GB6758@twins.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=andi@firstfloor.org \
--cc=kan.liang@intel.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox