public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: "Liang, Kan" <kan.liang@intel.com>
Cc: "andi@firstfloor.org" <andi@firstfloor.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"kvm@vger.kernel.org" <kvm@vger.kernel.org>
Subject: Re: [PATCH V3 1/2] perf ignore LBR and offcore_rsp.
Date: Tue, 8 Jul 2014 16:31:13 +0200	[thread overview]
Message-ID: <20140708143113.GQ19379@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <37D7C6CF3E00A74B8858931C1DB2F077014CDF76@SHSMSX103.ccr.corp.intel.com>

[-- Attachment #1: Type: text/plain, Size: 1142 bytes --]

On Tue, Jul 08, 2014 at 02:22:25PM +0000, Liang, Kan wrote:
> > This too is wrong in many ways; there's more than 2 extra_msrs on many
> > systems.
> > 
> Right, there are four extra  reg types on Intel systems. Since my
> previous test only triggers the crash with RSP_0 and RSP_1, so I only
> handle these two msrs.  I will handle all the extra msrs then.

Yeah, so to other two are PEBS related, and I think we disable PEBS
early on so you'll never hit them or something; didn't look too closely.

> > And the place you check is abysmal, if we know at init time that we don't
> > have those MSRs, WTF do you allow event creation that would use them,
> > only to then misbehave?
> 
> Right, we can check it at all the possible creation places.  I think
> the most common place to check should be x86_pmu_extra_regs.  For
> RSP_0 and RSP_1, I also plan to do the check in intel_fixup_er, so
> extra_reg will not be updated.  For LBR select, lbr_sel_map will be
> cleared at runtime once check_msr failed.  Besides the three places,
> is there any place I missed?

I think that's sufficient; but didn't stare too hard.

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

      reply	other threads:[~2014-07-08 14:31 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 ` [PATCH V3 1/2] perf ignore LBR and offcore_rsp Peter Zijlstra
2014-07-08 14:20   ` Liang, Kan
2014-07-08  9:29 ` Peter Zijlstra
2014-07-08 14:22   ` Liang, Kan
2014-07-08 14:31     ` Peter Zijlstra [this message]

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=20140708143113.GQ19379@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