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] Add hardware CR8 acceleration for TPR accessing

To: "Cui, Dexuan" <dexuan.cui@xxxxxxxxx>
Subject: Re: [Xen-devel] [Patch] Add hardware CR8 acceleration for TPR accessing
From: "Travis Betak" <travis.betak@xxxxxxx>
Date: Mon, 23 Oct 2006 08:23:04 -0500
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Mon, 23 Oct 2006 06:24:28 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <666CC8FCE3247C4DA876BA979059781A5C2707@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
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>
References: <666CC8FCE3247C4DA876BA979059781A5C2707@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Mon, 23 Oct 2006, Cui, Dexuan wrote:

> diff -r 8113c55a6efd xen/arch/x86/hvm/vlapic.c
> --- a/xen/arch/x86/hvm/vlapic.c       Sun Oct 22 17:38:59 2006 +0100
> +++ b/xen/arch/x86/hvm/vlapic.c       Mon Oct 23 14:03:11 2006 +0800
> @@ -29,6 +29,7 @@
>  #include <asm/hvm/hvm.h>
>  #include <asm/hvm/io.h>
>  #include <asm/hvm/support.h>
> +#include <asm/hvm/vmx/vmx.h>
>
>  #include <xen/lib.h>
>  #include <xen/sched.h>
> @@ -119,6 +120,20 @@ uint32_t vlapic_update_ppr(struct vlapic
>                  vlapic, ppr, isr, isrv);
>
>      return ppr;
> +}
> +
> +void vlapic_update_tpr_threshold(struct vlapic *vlapic)
> +{
> +#ifdef __x86_64__
> +    int highest_irr = vlapic_find_highest_irr(vlapic);
> +    int tpr = vlapic_get_reg(vlapic, APIC_TASKPRI) & 0xF0;
> +
> +    if ( highest_irr == -1 )
> +        __vmwrite( TPR_THRESHOLD, 0);
> +    else
> +        __vmwrite(TPR_THRESHOLD,
> +            highest_irr > tpr ? (tpr >> 4) : (highest_irr >> 4) );
> +#endif
>  }
>
>  /* This only for fixed delivery mode */

Hi, Dexuan,

Do we want architectual-specific code creeping into the generic HVM
layer?  This routine is only called in VMX code but I don't think this
the the right place for this code.

  --travis



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

<Prev in Thread] Current Thread [Next in Thread>