All of lore.kernel.org
 help / color / mirror / Atom feed
From: Boris Ostrovsky <boris.ostrovsky@oracle.com>
To: Brendan Gregg <bgregg@netflix.com>
Cc: Dietmar Hahn <dietmar.hahn@ts.fujitsu.com>, xen-devel@lists.xen.org
Subject: Re: patch for restricted vPMU modes
Date: Mon, 23 Nov 2015 17:54:40 -0500	[thread overview]
Message-ID: <56539930.8050600@oracle.com> (raw)
In-Reply-To: <CAJN39ogMGBGT5VVrV+dNyyi8LD3-c=sVpRDr17gNoD-tGKsNNQ@mail.gmail.com>

On 11/23/2015 05:01 PM, Brendan Gregg wrote:
>
>
> On Mon, Nov 23, 2015 at 6:35 AM, Boris Ostrovsky 
> <boris.ostrovsky@oracle.com <mailto:boris.ostrovsky@oracle.com>> wrote:
>
>
>     On 11/20/2015 07:21 PM, Brendan Gregg wrote:
>
>     These new features would need a corresponding change in Linux for
>     PV guests (or for dom0 to change feature set globally). But before
>     that do_xenpmu_op()'s XENPMU_feature_set clause will have to be
>     updated to deal with new modes.
>
>
> Ok, thanks. For now this is HVM, and I can EINVAL in do_xenpmu_op() 
> for the new modes, like with BTS. (Do you know if the later Linux 
> changes would be more than a feature version of 
> pmu_mode_store/pmu_mode_show?)


You are right --- Linux doesn't need anything, it just passes the 
features directly to the hypervisor. pmu_mode_store/show convert strings 
to numbers but we don't use strings for features.

So the only thing that's needed is to allow hypervisor set/clear those 
two bits in vpmu_features in do_xenpmu_op().


>
>     Also, if either of those two flags is set we probably want to
>     block MSR_IA32_DS_AREA and MSR_IA32_PEBS_ENABLE accesses as well.
>
>
> Ok, yes, good idea.


But: DS area is needed by BTS so if that feature is set we want to allow 
guests to write it (and as for PEBS (which also uses DS area) --- that's 
really a nop so whether or not you block it won't make any difference. 
But we should probably still do it).

I don't know whether anyone else uses debug store. The way SDM's section 
18.11.4 describes it there doesn't seem to be any other users.

-boris

  reply	other threads:[~2015-11-23 22:54 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAJN39ohu5fvs9rKowg5iaZPJeni+Xn2i+cPkbUgX++0GksgtDQ@mail.gmail.com>
2015-11-23 14:35 ` patch for restricted vPMU modes Boris Ostrovsky
2015-11-23 22:01   ` Brendan Gregg
2015-11-23 22:54     ` Boris Ostrovsky [this message]
2015-11-21  5:32 Brendan Gregg
2015-11-23 11:08 ` Jan Beulich
2015-11-23 11:12   ` Andrew Cooper

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=56539930.8050600@oracle.com \
    --to=boris.ostrovsky@oracle.com \
    --cc=bgregg@netflix.com \
    --cc=dietmar.hahn@ts.fujitsu.com \
    --cc=xen-devel@lists.xen.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 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.