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

[Xen-ia64-devel] Re: PATCH: use virtual psr in vcpu context

To: tgingold@xxxxxxx
Subject: [Xen-ia64-devel] Re: PATCH: use virtual psr in vcpu context
From: Alex Williamson <alex.williamson@xxxxxx>
Date: Mon, 11 Jun 2007 11:18:34 -0600
Cc: Xen-ia64-devel <xen-ia64-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Mon, 11 Jun 2007 10:16:32 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <20070609031915.GA2500@xxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-ia64-devel-request@lists.xensource.com?subject=help>
List-id: Discussion of the ia64 port of Xen <xen-ia64-devel.lists.xensource.com>
List-post: <mailto:xen-ia64-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=unsubscribe>
Organization: HP OSLO R&D
References: <20070609031915.GA2500@xxxxxxxxxxxxxxxxxxxxx>
Sender: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Sat, 2007-06-09 at 05:19 +0200, tgingold@xxxxxxx wrote:
> diff -r 8d5d102017c7 -r c69dd5d18ce7
> tools/libxc/ia64/xc_ia64_hvm_build.c
> --- a/tools/libxc/ia64/xc_ia64_hvm_build.c      Sat Jun 09 04:43:26
> 2007 +0200
> +++ b/tools/libxc/ia64/xc_ia64_hvm_build.c      Sat Jun 09 05:17:02
> 2007 +0200
> @@ -886,6 +886,11 @@ xc_hvm_build(int xc_handle, uint32_t dom
>      free(image);
>  
>      ctxt->regs.ip = 0x80000000ffffffb0UL;
> +    ctxt->regs.ar.fpsr = 0x0009804c0270033fUL;

  Please create some macros that describe what's being set here.
Undefined magic numbers are bad.

> +    ctxt->regs.cr.isr = 1UL << 63;
> +    ctxt->regs.psr = (1UL << 3) | (1UL << 44); /* AC and BN */

  Can we make use of kregs.h here?  IA64_PSR_AC | IA64_PSR_BN

> diff -r 8d5d102017c7 -r c69dd5d18ce7 tools/libxc/xc_dom_ia64.c
> --- a/tools/libxc/xc_dom_ia64.c Sat Jun 09 04:43:26 2007 +0200
> +++ b/tools/libxc/xc_dom_ia64.c Sat Jun 09 05:17:02 2007 +0200
> @@ -105,7 +105,8 @@ static int vcpu_ia64(struct xc_dom_image
>      memset(ctxt, 0, sizeof(*ctxt));
>  
>      ctxt->flags = 0;
> -    ctxt->regs.psr = 0;        /* all necessary bits filled by
> hypervisor */
> +    /* PSR is set according to SAL 3.2.4: AC, IC and BN are set. */
> +    ctxt->regs.psr = (1UL << 3) | (1UL << 13) | (1UL << 44);

IA64_PSR_...

Thanks,

        Alex

-- 
Alex Williamson                             HP Open Source & Linux Org.


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

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