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, updated] i386 linux: eliminate hard coded items

To: "Jan Beulich" <JBeulich@xxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH, updated] i386 linux: eliminate hard coded items from __xen_guest section
From: "Christian Limpach" <christian.limpach@xxxxxxxxx>
Date: Mon, 20 Feb 2006 16:04:35 +0000
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Mon, 20 Feb 2006 16:17:43 +0000
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=P6YJrdchgxCCiXFB+EY5hlUsX5bPcJK3dGEnjRVNj27qXOyV8vIXGA+4hV9lHv2x+OOZ4qsFtrLETxrUD6Fh67tEbjEZuww2BbEbMY1K/pgmJH+hxjFWqfB1F4KgAGLjXeP8cqkUU90AQ+n4JTsTctLBv7KRgDBoozSZJ/TTMu8=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <43F5B633.76F0.0078.0@xxxxxxxxxx>
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: <43F35CB6.76F0.0078.0@xxxxxxxxxx> <43F5B633.76F0.0078.0@xxxxxxxxxx>
Reply-to: Christian.Limpach@xxxxxxxxxxxx
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On 2/17/06, Jan Beulich <JBeulich@xxxxxxxxxx> wrote:
> To allow the new VMSPLIT_* Kconfig options to work, and to avoid problems 
> when the position of the hypercall page
> changes, this patch eliminates the hard-coded entries in the __xen_guest 
> section in head.S.
> Unfortunately the original version didn't work with gas newer than beginning 
> of August 2005, where in an attempt to fix
> another problem a regression was introduced.

The calculation doesn't seem to work on 32-bit for PAGE_OFFSET >=
2^31, at least not with:
cl349@firebug:~/ls/xen-unstable-clean.hg$ as --version
GNU assembler 2.15.92.0.2 20040927

I'll checkin the following:
.macro bigutoa value
    utoa (\value) >> 12
    .ascii "000"
.endm
.macro utoa value
 .if (\value) >= 16
        utoa (\value) >> 4
 .endif
 .if (\value) % 16 < 10
  .byte '0' + (\value) % 16
 .else
  .byte 'A' + (\value) % 16 - 10
 .endif
.endm

.section __xen_guest
        .ascii  "GUEST_OS=linux,GUEST_VER=2.6"
        .ascii  ",XEN_VER=xen-3.0"
        .ascii  ",VIRT_BASE=0x"; bigutoa __PAGE_OFFSET
        .ascii  ",HYPERCALL_PAGE=0x"; utoa
((__PHYSICAL_START+HYPERCALL_PAGE_OFFSET)>>PAGE_SHIFT)

It's a bit gross, maybe there's a neater solution.

     christian

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