WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-ppc-devel

[XenPPC] [POWERPC][XEN][LINUX] Guest Perfmon implementation - enabling H

To: xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
Subject: [XenPPC] [POWERPC][XEN][LINUX] Guest Perfmon implementation - enabling H_PERFMON call on platform xen
From: Christian Ehrhardt <ehrhardt@xxxxxxxxxxxxxxxxxx>
Date: Mon, 07 May 2007 15:15:27 +0200
Delivery-date: Mon, 07 May 2007 06:14:03 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-ppc-devel-request@lists.xensource.com?subject=help>
List-id: Xen PPC development <xen-ppc-devel.lists.xensource.com>
List-post: <mailto:xen-ppc-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ppc-devel>, <mailto:xen-ppc-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ppc-devel>, <mailto:xen-ppc-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-ppc-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 1.5.0.10 (X11/20070301)
[POWERPC][XEN][LINUX] Guest Perfmon implementation - enabling H_PERFMON call on platform xen
->attachment

--

Grüsse / regards, Christian Ehrhardt

IBM Linux Technology Center, Open Virtualization
+49 7031/16-3385
Ehrhardt@xxxxxxxxxxxxxxxxxxx
Ehrhardt@xxxxxxxxxx

IBM Deutschland Entwicklung GmbH
Vorsitzender des Aufsichtsrats: Johann Weihen Geschäftsführung: Herbert Kircher Sitz der Gesellschaft: Böblingen
Registergericht: Amtsgericht Stuttgart, HRB 243294

# HG changeset patch
# User Christian Ehrhardt <ehrhardt@xxxxxxxxxxxxxxxxxx>
# Date 1178509901 -7200
# Node ID 1cb08aff4ebef1207989e5db3f97db39d166d5a1
# Parent  04f6ad5d9232878cbcf8810025bb3ab59cbb62b6
[POWERPC][XEN][LINUX] Guest Perfmon implementation - enabling H_PERFMON call on 
platform xen
This is the first step of enabling oprofile performance monitoring on the 
xenppc platform. It allows users to work with oprofile in Dom0 and DomU guests 
as known from non virtualized ppc-linux.
This patch:
- enables the pmu with the H_PERFMON papr call on platform xen

Signed-off-by: Christian Ehrhardt <ehrhardt@xxxxxxxxxxxxxxxxxx>

diff -r 04f6ad5d9232 -r 1cb08aff4ebe arch/powerpc/platforms/xen/setup.c
--- a/arch/powerpc/platforms/xen/setup.c        Mon Mar 05 13:23:38 2007 -0600
+++ b/arch/powerpc/platforms/xen/setup.c        Mon May 07 05:51:41 2007 +0200
@@ -18,6 +18,7 @@
 #include <asm/machdep.h>
 #include <asm/hypervisor.h>
 #include <asm/time.h>
+#include <asm/pmc.h>
 #include "setup.h"
 
 #ifdef DEBUG
@@ -193,6 +194,17 @@ static void xen_power_save(void)
        HYPERVISOR_sched_op(SCHEDOP_block, NULL);
 }
 
+static void pseries_xen_enable_pmcs(void)
+{
+       unsigned long set, reset;
+
+       power4_enable_pmcs();
+
+       set = 1UL << 63;
+       reset = 0;
+       plpar_hcall_norets(H_PERFMON, set, reset);
+}
+
 void __init xen_setup_arch(void)
 {
        /* init to some ~sane value until calibrate_delay() runs */
@@ -209,6 +221,8 @@ void __init xen_setup_arch(void)
        /* let them fly */
        xen_setup_smp();
 #endif
+
+       ppc_md.enable_pmcs = pseries_xen_enable_pmcs;
 
        printk(KERN_INFO "Using Xen idle loop\n");
 }
_______________________________________________
Xen-ppc-devel mailing list
Xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ppc-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [XenPPC] [POWERPC][XEN][LINUX] Guest Perfmon implementation - enabling H_PERFMON call on platform xen, Christian Ehrhardt <=