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] [PATCH] VMX: extend last branch MSR info to cover newer

To: Jan Beulich <JBeulich@xxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] VMX: extend last branch MSR info to cover newer CPU models
From: Keir Fraser <keir@xxxxxxx>
Date: Tue, 04 Oct 2011 13:00:59 +0100
Cc: Donald D Dugger <donald.d.dugger@xxxxxxxxx>, "Nakajima, Jun" <jun.nakajima@xxxxxxxxx>
Delivery-date: Tue, 04 Oct 2011 05:07:44 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=sender:user-agent:date:subject:from:to:cc:message-id:thread-topic :thread-index:in-reply-to:mime-version:content-type :content-transfer-encoding; bh=fQM45SFFTJkwwOJc0YDQHkWdR2S1ljFVTEfH3hfmJrs=; b=MnyJ4iH/A1pcO0QU8BGmYlE4Zuv4iCbs0NQZJ20dqIieB1vFg2nNb734zuC2NAJXj+ jlrmuH5CrSGUc7ProZC6WAeFkSBaHHoThWHL+xy/mr6W/EKbV94iIucrLTq+mnMvSbM1 9jK4DpFTtyj9zId14o1foLoqd3w8vYWynb+WI=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4E8B0AE60200007800059289@xxxxxxxxxxxxxxxxxxxx>
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/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcyCjUeXqoDDmwHrfUOGucLmXct94A==
Thread-topic: [Xen-devel] [PATCH] VMX: extend last branch MSR info to cover newer CPU models
User-agent: Microsoft-Entourage/12.30.0.110427
On 04/10/2011 12:32, "Jan Beulich" <JBeulich@xxxxxxxx> wrote:

> There are still a couple of family 6 models missing here: 37, 44, 46,
> and 47 (according to SDM doc changes May 2011); presumably they would
> all go into the Nehalem/Sandy Bridge group. Intel?
> 
> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>

A nod or Ack from someone at Intel would be nice for this patch.

 -- Keir

> --- a/xen/arch/x86/hvm/vmx/vmx.c
> +++ b/xen/arch/x86/hvm/vmx/vmx.c
> @@ -1693,6 +1693,20 @@ static const struct lbr_info {
>      { MSR_C2_LASTBRANCH_0_FROM_IP,  NUM_MSR_C2_LASTBRANCH_FROM_TO },
>      { MSR_C2_LASTBRANCH_0_TO_IP,    NUM_MSR_C2_LASTBRANCH_FROM_TO },
>      { 0, 0 }
> +}, nh_lbr[] = {
> +    { MSR_IA32_LASTINTFROMIP,       1 },
> +    { MSR_IA32_LASTINTTOIP,         1 },
> +    { MSR_C2_LASTBRANCH_TOS,        1 },
> +    { MSR_P4_LASTBRANCH_0_FROM_LIP, NUM_MSR_P4_LASTBRANCH_FROM_TO },
> +    { MSR_P4_LASTBRANCH_0_TO_LIP,   NUM_MSR_P4_LASTBRANCH_FROM_TO },
> +    { 0, 0 }
> +}, at_lbr[] = {
> +    { MSR_IA32_LASTINTFROMIP,       1 },
> +    { MSR_IA32_LASTINTTOIP,         1 },
> +    { MSR_C2_LASTBRANCH_TOS,        1 },
> +    { MSR_C2_LASTBRANCH_0_FROM_IP,  NUM_MSR_ATOM_LASTBRANCH_FROM_TO },
> +    { MSR_C2_LASTBRANCH_0_TO_IP,    NUM_MSR_ATOM_LASTBRANCH_FROM_TO },
> +    { 0, 0 }
>  #ifdef __i386__
>  }, pm_lbr[] = {
>      { MSR_IA32_LASTINTFROMIP,       1 },
> @@ -1720,8 +1734,20 @@ static const struct lbr_info *last_branc
>  #endif
>          /* Core2 Duo */
>          case 15:
> +        /* Enhanced Core */
> +        case 23:
>              return c2_lbr;
>              break;
> +        /* Nehalem */
> +        case 26: case 30: case 31: case 46:
> +        /* Sandy Bridge */
> +        case 42: case 45:
> +            return nh_lbr;
> +            break;
> +        /* Atom */
> +        case 28:
> +            return at_lbr;
> +            break;
>          }
>          break;
>  
> --- a/xen/include/asm-x86/msr-index.h
> +++ b/xen/include/asm-x86/msr-index.h
> @@ -472,11 +472,12 @@
>  #define MSR_PM_LASTBRANCH_0  0x00000040
>  #define NUM_MSR_PM_LASTBRANCH  8
>  
> -/* Core 2 last-branch recording */
> +/* Core 2 and Atom last-branch recording */
>  #define MSR_C2_LASTBRANCH_TOS  0x000001c9
>  #define MSR_C2_LASTBRANCH_0_FROM_IP 0x00000040
>  #define MSR_C2_LASTBRANCH_0_TO_IP 0x00000060
>  #define NUM_MSR_C2_LASTBRANCH_FROM_TO 4
> +#define NUM_MSR_ATOM_LASTBRANCH_FROM_TO 8
>  
>  /* Intel Core-based CPU performance counters */
>  #define MSR_CORE_PERF_FIXED_CTR0 0x00000309
> 
> 
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel



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