From: "Jan Beulich" Subject: [PATCH, updated] i386 linux: eliminate hard coded items from __xen_guest section Date: Fri, 17 Feb 2006 11:40:35 +0100 Message-ID: <43F5B633.76F0.0078.0@novell.com> References: <43F35CB6.76F0.0078.0@novell.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=__Part4567FE33.0__=" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org This is a MIME message. If you are reading this text, you may want to consider changing to a mail reader or gateway that understands how to properly handle MIME multipart messages. --=__Part4567FE33.0__= Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline 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. Jan --=__Part4567FE33.0__= Content-Type: text/plain; name="xenlinux-i386-head-adjust.patch" Content-Transfer-Encoding: 8bit Content-Disposition: attachment; filename="xenlinux-i386-head-adjust.patch" Index: head-2006-02-16/arch/i386/kernel/head-xen.S =================================================================== --- head-2006-02-16.orig/arch/i386/kernel/head-xen.S 2006-02-17 11:01:43.000000000 +0100 +++ head-2006-02-16/arch/i386/kernel/head-xen.S 2006-02-17 11:02:25.000000000 +0100 @@ -1,11 +1,29 @@ #include +#include + +.macro utoa value, radix=16, upper=1 + .if (\radix) < 2 || (\radix) > 36 + .err + .elseif (\value) >= (\radix) + utoa ((\value)/(\radix)), (\radix), (\upper) + .endif + .if (\value) % (\radix) < 10 + .byte '0' + (\value) % (\radix) + .elseif (\upper) + .byte 'A' + (\value) % (\radix) - 10 + .else + .byte 'a' + (\value) % (\radix) - 10 + .endif +.endm + +#define HYPERCALL_PAGE_OFFSET 0x4000 .section __xen_guest .ascii "GUEST_OS=linux,GUEST_VER=2.6" .ascii ",XEN_VER=xen-3.0" - .ascii ",VIRT_BASE=0xC0000000" - .ascii ",HYPERCALL_PAGE=0x104" /* __pa(hypercall_page) >> 12 */ + .ascii ",VIRT_BASE=0x"; utoa __PAGE_OFFSET + .ascii ",HYPERCALL_PAGE=0x"; utoa ((__PHYSICAL_START+HYPERCALL_PAGE_OFFSET)>>PAGE_SHIFT) #ifdef CONFIG_X86_PAE .ascii ",PAE=yes" #else @@ -190,10 +208,10 @@ ENTRY(cpu_gdt_table) .org 0x3000 ENTRY(default_ldt) -.org 0x4000 +.org HYPERCALL_PAGE_OFFSET ENTRY(hypercall_page) +.skip 0x1000 -.org 0x5000 /* * Real beginning of normal "text" segment */ --=__Part4567FE33.0__= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --=__Part4567FE33.0__=--