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-devel

Re: [Xen-devel] Re: [PATCH] Enable Core 2 Duo PerformanceCounters inHVM

To: "Shan, Haitao" <haitao.shan@xxxxxxxxx>
Subject: Re: [Xen-devel] Re: [PATCH] Enable Core 2 Duo PerformanceCounters inHVM guest
From: Otavio Salvador <otavio@xxxxxxxxxxxxxxxx>
Date: Fri, 14 Dec 2007 17:05:27 -0200
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx, "Jiang, Yunhong" <yunhong.jiang@xxxxxxxxx>
Delivery-date: Fri, 14 Dec 2007 11:31:41 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <823A93EED437D048963A3697DB0E35DEF7A949@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> (Haitao Shan's message of "Fri\, 14 Dec 2007 23\:43\:48 +0800")
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Organization: O.S. Systems Ltda.
References: <823A93EED437D048963A3697DB0E35DEF7A8E9@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <C3880369.19D1A%Keir.Fraser@xxxxxxxxxxxx> <823A93EED437D048963A3697DB0E35DEF7A949@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.95 (gnu/linux) (i486-pc-linux-gnu)
"Shan, Haitao" <haitao.shan@xxxxxxxxx> writes:

Hello Haitao,

I've done a look on the patch and found two places with wrong coding
style. Take a look bellow:

> diff -r 8f0cbfc478d6 xen/arch/x86/oprofile/op_model_ppro.c
> --- a/xen/arch/x86/oprofile/op_model_ppro.c   Thu Dec 13 09:31:03 2007 +0000
> +++ b/xen/arch/x86/oprofile/op_model_ppro.c   Fri Dec 14 07:21:43 2007 +0800
> @@ -126,6 +127,11 @@ static void ppro_start(struct op_msrs co
>       CTRL_READ(low, high, msrs, 0);
>       CTRL_SET_ACTIVE(low);
>       CTRL_WRITE(low, high, msrs, 0);
> +    /* Global Control MSR is enabled by default when system power on.
> +     * However, this may not hold true when xenoprof starts to run.
> +     */
> +    if ( ppro_has_global_ctrl )
> +        wrmsrl(MSR_CORE_PERF_GLOBAL_CTRL, 1);
>  }
>  
>  
> @@ -135,6 +141,8 @@ static void ppro_stop(struct op_msrs con
>       CTRL_READ(low, high, msrs, 0);
>       CTRL_SET_INACTIVE(low);
>       CTRL_WRITE(low, high, msrs, 0);
> +    if ( ppro_has_global_ctrl )
> +        wrmsrl(MSR_CORE_PERF_GLOBAL_CTRL, 0);
>  }

Cheers,

-- 
Otavio Salvador                  O.S. Systems
E-mail: otavio@xxxxxxxxxxxxxxxx  http://www.ossystems.com.br
Mobile: +55 53 9981-7854         http://projetos.ossystems.com.br

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel