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

Re: [Xen-ia64-devel] [PATCH 1/2] FPSWA emulation support

To: Masaki Kanno <kanno.masaki@xxxxxxxxxxxxxx>, xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-ia64-devel] [PATCH 1/2] FPSWA emulation support
From: Tristan Gingold <Tristan.Gingold@xxxxxxxx>
Date: Thu, 18 May 2006 13:02:37 +0200
Delivery-date: Thu, 18 May 2006 03:58:29 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <5DC67A66F79C1Bkanno.masaki@xxxxxxxxxxxxxx>
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>
References: <5DC67A66F79C1Bkanno.masaki@xxxxxxxxxxxxxx>
Sender: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: KMail/1.5
Le Jeudi 18 Mai 2006 12:36, Masaki Kanno a écrit :
Very minor comments:

[...]
+static void
+xen_increment_iip(struct pt_regs *regs)
+{
+       struct ia64_psr *ipsr = (struct ia64_psr *)&regs->cr_ipsr;
+       if (ipsr->ri == 2) { ipsr->ri=0; regs->cr_iip += 16; }
+       else ipsr->ri++;
+       return;
+}
There is already a vcpu_increment_iip.  Maybe you should merge both: 
vcpu_increment_iip may call regs_increment_iip.
(rename btw).

[...]
+static unsigned long
+handle_fpu_swa_for_domain (int fp_fault, struct pt_regs *regs, unsigned long 
isr)
+{
+       struct vcpu *v = current;
+       IA64_BUNDLE bundle;
+       IA64_BUNDLE __get_domain_bundle(UINT64);
+       unsigned long fault_ip;
+       fpswa_ret_t ret;
+
+       fault_ip = regs->cr_iip;
+       if (!fp_fault && (ia64_psr(regs)->ri == 0))
+               fault_ip -= 16;
A comment is required here.

[...]
+       if (ret.status) {
+               PSCBX(v, fpswa_ret.status) = ret.status;
+               PSCBX(v, fpswa_ret.err0)   = ret.err0;
+               PSCBX(v, fpswa_ret.err1)   = ret.err1;
+               PSCBX(v, fpswa_ret.err2)   = ret.err2;
A single assignment should be ok: PSCBX(v, fpswa_ret) = ret;

Tristan.



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