|
|
|
|
|
|
|
|
|
|
xen-ia64-devel
[Xen-ia64-devel] Re: PATCH: use virtual psr in vcpu context
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
|
|
|
|
|