All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andi Kleen <ak@linux.intel.com>
To: speck@linutronix.de
Subject: [MODERATED] Re: [PATCH v1 9/9] PERFv1 3
Date: Tue, 5 Feb 2019 08:48:29 -0800	[thread overview]
Message-ID: <20190205164829.GI31598@tassilo.jf.intel.com> (raw)
In-Reply-To: <20190205152804.GY17528@hirez.programming.kicks-ass.net>

On Tue, Feb 05, 2019 at 04:28:04PM +0100, speck for Peter Zijlstra wrote:
> On Mon, Feb 04, 2019 at 05:14:10PM -0800, speck for Andi Kleen wrote:
> > From: Andi Kleen <ak@linux.intel.com>
> > Subject:  kvm: vmx: Support TSX_FORCE_ABORT in KVM guests
> > 
> > Recent microcode for Skylake added a new CPUID bit and MSR to control
> > TSX aborting and enabling PMU counter 3. This patch adds support
> > for controlling counter 3 from KVM guests.
> > 
> > The implementation is similar to how SPEC_CTRL is implemented. Initially
> > the MSR is just intercepted, to avoid any impact on the entry/exit.
> > When the guest uses the MSR the first time add the MSR to the
> > entry/exit list to context switch it against the host.
> > 
> 
> What this does not explain is how the guest can ever possibly use this
> correctly, since it doesn't have access to PMC3.

Yes you're right. In the current form it is only useful for
people who really want to disable TSX and don't care about the PMU.

But we should really care about the PMU.
I guess we can force the flag on the KVM PMU events instead.

Then the host perf will do the right thing.

It won't allow a guest to disable TSX for some other reason, 
but i guess that's ok.

-Andi

  reply	other threads:[~2019-02-05 16:48 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-05  1:14 [MODERATED] [PATCH v1 0/9] PERFv1 0 Andi Kleen
2019-02-05  1:14 ` [MODERATED] [PATCH v1 1/9] PERFv1 7 Andi Kleen
2019-02-05  1:14 ` [MODERATED] [PATCH v1 2/9] PERFv1 6 Andi Kleen
2019-02-05 14:46   ` [MODERATED] " Peter Zijlstra
2019-02-05 16:37     ` Andi Kleen
2019-02-05  1:14 ` [MODERATED] [PATCH v1 3/9] PERFv1 9 Andi Kleen
2019-02-05 13:58   ` [MODERATED] " Peter Zijlstra
2019-02-05  1:14 ` [MODERATED] [PATCH v1 4/9] PERFv1 2 Andi Kleen
2019-02-05 14:51   ` [MODERATED] " Peter Zijlstra
2019-02-05 16:35     ` Andi Kleen
2019-02-05 16:53       ` Peter Zijlstra
2019-02-05 15:16   ` Peter Zijlstra
2019-02-05 16:52     ` Andi Kleen
2019-02-05  1:14 ` [MODERATED] [PATCH v1 5/9] PERFv1 8 Andi Kleen
2019-02-05  1:14 ` [MODERATED] [PATCH v1 6/9] PERFv1 5 Andi Kleen
2019-02-05 15:26   ` [MODERATED] " Peter Zijlstra
2019-02-05 16:45     ` Andi Kleen
2019-02-05  1:14 ` [MODERATED] [PATCH v1 7/9] PERFv1 1 Andi Kleen
2019-02-05  1:14 ` [MODERATED] [PATCH v1 8/9] PERFv1 4 Andi Kleen
2019-02-05  1:14 ` [MODERATED] [PATCH v1 9/9] PERFv1 3 Andi Kleen
2019-02-05 15:28   ` [MODERATED] " Peter Zijlstra
2019-02-05 16:48     ` Andi Kleen [this message]
2019-02-05 17:13       ` Peter Zijlstra
2019-02-05 17:26         ` Andi Kleen
2019-02-05 18:30           ` Peter Zijlstra
2019-02-05 14:03 ` [MODERATED] Re: [PATCH v1 0/9] PERFv1 0 Greg KH
2019-02-05 16:36   ` Andi Kleen
2019-02-05 18:20     ` Greg KH
2019-02-06  1:16       ` Andi Kleen
2019-02-05 15:32 ` 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=20190205164829.GI31598@tassilo.jf.intel.com \
    --to=ak@linux.intel.com \
    --cc=speck@linutronix.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.