All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/6] xen/PMU: PMU support for Xen PV guests
@ 2014-06-06 17:44 Boris Ostrovsky
  2014-06-06 17:44 ` [PATCH v2 1/6] xen: xensyms support Boris Ostrovsky
                   ` (6 more replies)
  0 siblings, 7 replies; 30+ messages in thread
From: Boris Ostrovsky @ 2014-06-06 17:44 UTC (permalink / raw)
  To: david.vrabel, konrad.wilk
  Cc: boris.ostrovsky, kevin.tian, dietmar.hahn, JBeulich, xen-devel

(This is the second version of the series. The first one was posted long
time ago and there are too many changes to list.)

This is the Linux side of Xen PMU support for PV(H) guests, including
dom0. Only kernel changes are here, toolstack patch will be provided
separately.

Here is description from the hypervisor patch submission that applies
to this series as well:

This version has following limitations:
* For accurate profiling of dom0/Xen dom0 VCPUs should be pinned.
* Hypervisor code is only profiled on processors that have running dom0 VCPUs
on them.
* No backtrace support.
* Will fail to load under XSM: we ran out of bits in permissions vector and
this needs to be fixed separately

A few notes that may help reviewing:

* A shared data structure (xenpmu_data_t) between each PV VPCU and hypervisor
CPU is used for passing registers' values as well as PMU state at the time of
PMU interrupt.
* PMU interrupts are taken by hypervisor either as NMIs or regular vector
interrupts for both HVM and PV(H). The interrupts are sent as NMIs to HVM guests
and as virtual interrupts to PV(H) guests
* PV guest's interrupt handler does not read/write PMU MSRs directly. Instead, it
accesses xenpmu_data_t and flushes it to HW it before returning.
* PMU mode is controlled at runtime via /sys/hypervisor/pmu/pmu/{pmu_mode,pmu_flags}
in addition to 'vpmu' boot option (which is preserved for back compatibility).
The following modes are provided:
  * disable: VPMU is off
  * enable: VPMU is on. Guests can profile themselves, dom0 profiles itself and Xen
  * priv_enable: dom0 only profiling. dom0 collects samples for everyone. Sampling
    in guests is suspended.
* /proc/xen/xensyms file exports hypervisor's symbols to dom0 (similar to
/proc/kallsyms)
* VPMU infrastructure is now used for HVM, PV and PVH and therefore has been moved
up from hvm subtree


Boris Ostrovsky (6):
  xen: xensyms support
  xen/PMU: Sysfs interface for setting Xen PMU mode
  xen/PMU: Initialization code for Xen PMU
  xen/PMU: Describe vendor-specific PMU registers
  xen/PMU: Intercept PMU-related MSR and APIC accesses
  xen/PMU: PMU emulation code

 arch/x86/include/asm/xen/hypercall.h |   6 +
 arch/x86/include/asm/xen/interface.h |  41 +++
 arch/x86/xen/Makefile                |   2 +-
 arch/x86/xen/enlighten.c             |  24 +-
 arch/x86/xen/pmu.c                   | 537 +++++++++++++++++++++++++++++++++++
 arch/x86/xen/pmu.h                   |  15 +
 arch/x86/xen/smp.c                   |  31 +-
 arch/x86/xen/xen-head.S              |   5 +-
 drivers/xen/Kconfig                  |   5 +
 drivers/xen/sys-hypervisor.c         | 119 ++++++++
 drivers/xen/xenfs/Makefile           |   1 +
 drivers/xen/xenfs/super.c            |   3 +
 drivers/xen/xenfs/xenfs.h            |   1 +
 drivers/xen/xenfs/xensyms.c          | 124 ++++++++
 include/xen/interface/platform.h     |  19 ++
 include/xen/interface/xen.h          |   2 +
 include/xen/interface/xenpmu.h       |  70 +++++
 17 files changed, 999 insertions(+), 6 deletions(-)
 create mode 100644 arch/x86/xen/pmu.c
 create mode 100644 arch/x86/xen/pmu.h
 create mode 100644 drivers/xen/xenfs/xensyms.c
 create mode 100644 include/xen/interface/xenpmu.h

-- 
1.8.1.4

^ permalink raw reply	[flat|nested] 30+ messages in thread

end of thread, other threads:[~2014-06-12 14:50 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-06 17:44 [PATCH v2 0/6] xen/PMU: PMU support for Xen PV guests Boris Ostrovsky
2014-06-06 17:44 ` [PATCH v2 1/6] xen: xensyms support Boris Ostrovsky
2014-06-10 13:31   ` David Vrabel
2014-06-10 14:49     ` Boris Ostrovsky
2014-06-10 14:51       ` Jan Beulich
2014-06-10 15:03         ` Boris Ostrovsky
2014-06-10 15:21           ` Jan Beulich
2014-06-10 15:45             ` Boris Ostrovsky
2014-06-10 16:13               ` Jan Beulich
2014-06-11  9:37   ` Dietmar Hahn
2014-06-06 17:44 ` [PATCH v2 2/6] xen/PMU: Sysfs interface for setting Xen PMU mode Boris Ostrovsky
2014-06-06 20:19   ` Konrad Rzeszutek Wilk
2014-06-10 13:33     ` David Vrabel
2014-06-10 13:48   ` David Vrabel
2014-06-10 14:52     ` Boris Ostrovsky
2014-06-11 10:13   ` Dietmar Hahn
2014-06-11 12:53     ` Boris Ostrovsky
2014-06-11 13:12       ` Dietmar Hahn
2014-06-06 17:44 ` [PATCH v2 3/6] xen/PMU: Initialization code for Xen PMU Boris Ostrovsky
2014-06-06 18:57   ` Andrew Cooper
2014-06-06 19:51     ` Boris Ostrovsky
2014-06-06 17:44 ` [PATCH v2 4/6] xen/PMU: Describe vendor-specific PMU registers Boris Ostrovsky
2014-06-10 14:11   ` David Vrabel
2014-06-10 15:29     ` Boris Ostrovsky
2014-06-06 17:44 ` [PATCH v2 5/6] xen/PMU: Intercept PMU-related MSR and APIC accesses Boris Ostrovsky
2014-06-12  6:56   ` Dietmar Hahn
2014-06-12 14:50     ` Boris Ostrovsky
2014-06-06 17:44 ` [PATCH v2 6/6] xen/PMU: PMU emulation code Boris Ostrovsky
2014-06-10 13:57 ` [PATCH v2 0/6] xen/PMU: PMU support for Xen PV guests David Vrabel
2014-06-10 15:27   ` Boris Ostrovsky

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.