aboutsummaryrefslogtreecommitdiffstats
path: root/xen/arch/x86/hvm/vpmu.c
diff options
context:
space:
mode:
authorDietmar Hahn <dietmar.hahn@ts.fujitsu.com>2013-04-08 17:58:16 +0200
committerJan Beulich <jbeulich@suse.com>2013-04-08 17:58:16 +0200
commit2b0fca9d8354e330e47f7d7bd7a34eda431fb370 (patch)
treef48c36ceb4c89df91fbd69b6c7e0953b269eedba /xen/arch/x86/hvm/vpmu.c
parent0d2c79a9fae13993760b0c21473d7c7700759714 (diff)
downloadxen-2b0fca9d8354e330e47f7d7bd7a34eda431fb370.tar.gz
xen-2b0fca9d8354e330e47f7d7bd7a34eda431fb370.tar.bz2
xen-2b0fca9d8354e330e47f7d7bd7a34eda431fb370.zip
vpmu intel: Dump vpmu infos in 'q' keyhandler
This patch extends the printout of the VPCU infos of the keyhandler 'q'. If vPMU is enabled is on the VCPU and active lines are printed like (when running HVM openSuSE-12.3 with 'perf top'); (XEN) vPMU running (XEN) general_0: 0x000000ffffff3ae1 ctrl: 0x000000000053003c (XEN) fixed_1: 0x000000ff90799188 ctrl: 0xb This means general counter 0 and fixed counter 1 are running with showing their contents and the contents of their configuration msr. Signed-off-by: Dietmar Hahn <dietmar.hahn@ts.fujitsu.com> Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Acked-by: Jun Nakajima <jun.nakajima@intel.com>
Diffstat (limited to 'xen/arch/x86/hvm/vpmu.c')
-rw-r--r--xen/arch/x86/hvm/vpmu.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/xen/arch/x86/hvm/vpmu.c b/xen/arch/x86/hvm/vpmu.c
index 0b843c15e5..3b6958081e 100644
--- a/xen/arch/x86/hvm/vpmu.c
+++ b/xen/arch/x86/hvm/vpmu.c
@@ -154,3 +154,12 @@ void vpmu_destroy(struct vcpu *v)
vpmu->arch_vpmu_ops->arch_vpmu_destroy(v);
}
+/* Dump some vpmu informations on console. Used in keyhandler dump_domains(). */
+void vpmu_dump(struct vcpu *v)
+{
+ struct vpmu_struct *vpmu = vcpu_vpmu(v);
+
+ if ( vpmu->arch_vpmu_ops && vpmu->arch_vpmu_ops->arch_vpmu_dump )
+ vpmu->arch_vpmu_ops->arch_vpmu_dump(v);
+}
+