]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/xen.git/commit
x86/VPMU: interface for setting PMU mode and flags
authorBoris Ostrovsky <boris.ostrovsky@oracle.com>
Thu, 9 Jul 2015 11:39:53 +0000 (13:39 +0200)
committerJan Beulich <jbeulich@suse.com>
Thu, 9 Jul 2015 11:39:53 +0000 (13:39 +0200)
commit11fe998e5661716eb348b38b5e5994ed1458427f
treeae8f1aa2fe28c1b5823c184fab17cd6ed843a5b7
parent0f44ee0451f567d68584fcff47d5135011a267bc
x86/VPMU: interface for setting PMU mode and flags

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.

Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Acked-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
Acked-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Dietmar Hahn <dietmar.hahn@ts.fujitsu.com>
Acked-by: Kevin Tian <kevin.tian@intel.com>
17 files changed:
tools/flask/policy/policy/modules/xen/xen.te
xen/arch/x86/domain.c
xen/arch/x86/hvm/svm/vpmu.c
xen/arch/x86/hvm/vmx/vpmu_core2.c
xen/arch/x86/hvm/vpmu.c
xen/arch/x86/x86_64/compat/entry.S
xen/arch/x86/x86_64/entry.S
xen/include/asm-x86/hvm/vpmu.h
xen/include/public/pmu.h
xen/include/public/xen.h
xen/include/xen/hypercall.h
xen/include/xlat.lst
xen/include/xsm/dummy.h
xen/include/xsm/xsm.h
xen/xsm/dummy.c
xen/xsm/flask/hooks.c
xen/xsm/flask/policy/access_vectors