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 Kleen <andi@firstfloor.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"kvm@vger.kernel.org" <kvm@vger.kernel.org>
Subject: Re: [PATCH V2 2/3] perf protect LBR when Intel PT is enabled.
Date: Mon, 7 Jul 2014 17:46:35 +0200	[thread overview]
Message-ID: <20140707154635.GG19379@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <37D7C6CF3E00A74B8858931C1DB2F077014C6431@SHSMSX103.ccr.corp.intel.com>

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

On Mon, Jul 07, 2014 at 01:57:16PM +0000, Liang, Kan wrote:
> > > This doesn't work, e.g. hardware debuggers can take over at any time.
> > 
> > Tough cookies. Hardware debuggers get to deal with whatever crap they
> > cause.
> 
> If so, I think I may discard this patch (2/3). I will resubmit the
> other two patches as a patch set to only handle the KVM issue we
> found.  It checks the access of LBR and extra MSRs at the
> initialization time and set the flags. So we just need to check the
> flags at runtime and avoid the protection by _safe(). 

Right.

> For Intel PT and LBR handling, since the PT codes haven't been
> integrated yet, I will try to implement another patch later.  The
> patch will add flags for LBR and PT.  When enabling PT, it checks LBR
> flag and update the PT flag. When enabling LBR, it checks PT flag and
> update the LBR flag. When disabling LBR/PT, we just update the related
> flags. we don't need to add _safe or extra rmsr in fast path. 

Yeah, should be part of the PT patches.

> How do you think?

With my brain, much like all primates :-)

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

  reply	other threads:[~2014-07-07 15:46 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-02 18:14 [PATCH V2 1/3] perf ignore LBR and offcore_rsp kan.liang
2014-07-02 18:14 ` [PATCH V2 2/3] perf protect LBR when Intel PT is enabled kan.liang
2014-07-03  2:44   ` Andi Kleen
2014-07-03  7:33   ` Peter Zijlstra
2014-07-03 15:52     ` Andi Kleen
2014-07-03 17:07       ` Peter Zijlstra
2014-07-07 13:57         ` Liang, Kan
2014-07-07 15:46           ` Peter Zijlstra [this message]
2014-07-07 15:47             ` Peter Zijlstra
2014-07-02 18:14 ` [PATCH V2 3/3] kvm: ignore LBR and offcore rsp kan.liang
2014-07-03  2:16 ` [PATCH V2 1/3] perf ignore LBR and offcore_rsp Andi Kleen
2014-07-03  4:26   ` Liang, Kan
2014-07-03  2:29 ` Jidong Xiao
2014-07-03  4:26   ` Liang, Kan

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=20140707154635.GG19379@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