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

[Xen-devel] Re: [RFC PATCH 07/35] Make LOAD_OFFSET defined by subarch

To: Chris Wright <chrisw@xxxxxxxxxxxx>
Subject: [Xen-devel] Re: [RFC PATCH 07/35] Make LOAD_OFFSET defined by subarch
From: Dan Hecht <dhecht@xxxxxxxxxx>
Date: Wed, 22 Mar 2006 14:57:19 -0800
Cc: virtualization@xxxxxxxxxxxxxx, Christian Limpach <Christian.Limpach@xxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, Ian Pratt <ian.pratt@xxxxxxxxxxxxx>
Delivery-date: Wed, 22 Mar 2006 22:59:12 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20060322063746.389133000@xxxxxxxxxxxxxxxxxx>
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: <20060322063040.960068000@xxxxxxxxxxxxxxxxxx> <20060322063746.389133000@xxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 1.5 (X11/20051201)
Chris Wright wrote:
Change LOAD_OFFSET so that the kernel has virtual addresses in the elf header 
fields.

Unlike bare metal kernels, Xen kernels start with virtual address
management turned on and thus the addresses to load to should be
virtual addresses.


Rather than changing LOAD_OFFSET in Linux, why not leave this alone and change the Xen domain builder to properly interpret the ELF program header fields?

i.e. with this change, we'd have

p_paddr = __PAGE_OFFSET + segment_offset
p_vaddr = __PAGE_OFFSET + segment_offset
VIRT_BASE = __PAGE_OFFSET

where, the VA mapping p_paddr -> (p_paddr-VIRT_BASE) is established by the domain builder.

Instead, why not drop this patch, and the VIRT_BASE portion of the __xen_guest section, and instead change Xen's domain builder to treat p_paddr and p_vaddr in a more standard way? Since Xen starts the domain with virtual address management enabled, it makes sense for it to use p_vaddr to determine the virtual address to load the kernel to. Then, p_paddr could be used to determine which pseudo-physical pages back that virtual address range.

i.e. use, just like vanilla linux:

p_paddr = segment_offset
p_vaddr = __PAGE_OFFSET + segment_offset

so these two fields directly indicate the same mapping as before, but now in terms of p_vaddr -> p_paddr, which makes sense, and no need for the extra VIRT_BASE attribute in the __xen_guest section.

Dan

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

<Prev in Thread] Current Thread [Next in Thread>