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] alloc_page_dir() should return a virtual ad

To: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
Subject: Re: [Xen-ia64-devel] [patch] alloc_page_dir() should return a virtual address
From: Jes Sorensen <jes@xxxxxxx>
Date: 22 Sep 2006 04:23:40 -0400
Cc: xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Fri, 22 Sep 2006 01:23:50 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <20060922032027.GB29012%yamahata@xxxxxxxxxxxxx>
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: <451255A3.1060603@xxxxxxx> <200609211032.k8LAWP7L029764@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> <45127701.5050600@xxxxxxx> <20060922032027.GB29012%yamahata@xxxxxxxxxxxxx>
Sender: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4
>>>>> "Isaku" == Isaku Yamahata <yamahata@xxxxxxxxxxxxx> writes:

Isaku> Hi.  As Jes explained, p?d_populate() requires virtual address
Isaku> for third argument.  So alloc_dir_page() should return virtual
Isaku> address.  On the otherhand __pa(__pa(va)) == __pa(va) because
Isaku> __pa() masks high 3bits instead of __pa(va) = va -
Isaku> PAGE_OFFSET. Thus the current alloc_dir_page() creates correct
Isaku> frame tables fortunately.  However alloc_dir_page() should be
Isaku> fixed, I think.

You are right, but somehow this made a difference for me on SN2, I
wonder if the Linux version could have gotten pulled in somehow. I
might look at the CPP output to be sure.

Isaku> About ivt.S part. You might have missed that shr is signed
Isaku> extended shift.  Probably the following is more readable.

Isaku> #ifdef CONFIG_VIRTUAL_FRAME_TABLE - shr r22=r16,56 // Test for
Isaku> the address of virtual frame_table + shr.u r22=r16,56 // Test
Isaku> for the address of virtual frame_table ;; - cmp.eq
Isaku> p8,p0=((VIRT_FRAME_TABLE_ADDR>>56)&0xff)-0x100,r22 + cmp.eq
Isaku> p8,p0=(VIRT_FRAME_TABLE_ADDR>>56),r22 (p8) br.cond.sptk
Isaku> frametable_miss ;; #endif

I tried this but hit the obvious assembly error that Kouya also
reported in the follow-up posting. I change it to the code I posted to
make sure it was explicit and there was no doubt it couldn't fail.

Best regards,
Jes

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