[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v11 for-xen-4.5 11/20] x86/VPMU: Interface for setting PMU mode and flags



On 09/23/2014 03:24 PM, Boris Ostrovsky wrote:
On 09/23/2014 02:58 PM, Konrad Rzeszutek Wilk wrote:
On Mon, Sep 22, 2014 at 07:57:52PM -0400, Boris Ostrovsky wrote:
Add runtime interface for setting PMU mode and flags. Three main modes are
provided:
* XENPMU_MODE_OFF:  PMU is not virtualized
* XENPMU_MODE_SELF: Guests can access PMU MSRs and receive PMU interrupts.
* XENPMU_MODE_HV: Same as XENPMU_MODE_SELF for non-proviledged guests, dom0
   can profile itself and the hypervisor.

Note that PMU modes are different from what can be provided at Xen's boot line
with 'vpmu' argument. An 'off' (or '0') value is equivalent to XENPMU_MODE_OFF.
Any other value, on the other hand, will cause VPMU mode to be set to
XENPMU_MODE_SELF during boot.

For feature flags only Intel's BTS is currently supported.

Mode and flags are set via HYPERVISOR_xenpmu_op hypercall.
I forgot to mention that we should probably also include the XSM calls.
(And CC the maintainer of it).

For examples, see the claim (919f59b3b99e1d845c6a1f30125e79e828805d87) or
vnmua (40c7af684fc0bf89c7b643a5492b4abd920fba86) patches.

(+ Daniel)

I haven't looked at XSM in a few months but I remember when I tried to use XSM 
for this I found that we ran out of bits for a new hypercall in the permission 
vector. (I actually mention this in the cover letter, but it's way way down)

The two commits that you refer to are using existing hypercalls.

-boris

The solution to running out of bits is to create another class in order to
hold the new permissions, as has already been done for domain/domain2.  The
CQM patches (v15 03/11) already define a class xen2, so you may want to base
on top of it so that patches don't conflict (or whatever is preferred based
on the patchesets' relative readiness).

--
Daniel De Graaf
National Security Agency

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.