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: Questions about VIRT_BASE and ELF_PADDR_OFFSET in __xen_

To: "Keir Fraser" <Keir.Fraser@xxxxxxxxxxxx>
Subject: [Xen-devel] RE: Questions about VIRT_BASE and ELF_PADDR_OFFSET in __xen_guest
From: "Puthiyaparambil, Aravindh" <aravindh.puthiyaparambil@xxxxxxxxxx>
Date: Thu, 18 May 2006 20:57:15 -0400
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Thu, 18 May 2006 17:57:44 -0700
Envelope-to: www-data@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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcZ6u088wj+t3TMkR2+6T91SsrkYiwAIB4EA
Thread-topic: Questions about VIRT_BASE and ELF_PADDR_OFFSET in __xen_guest
> There is no reason really why VIRT_BASE=0 should not work. If it
> crashes there is presumably some underlying bug which disallowing
> VIRT_BASE=0 does not fix.

You are right. The experiment I was trying with Mini-OS was flawed. I
had forgotten to fix up the minios_x86_64.lds file to reflect 0x0 (bang
head on table). Once I did that things worked fine. 

Do we care about the situation where there is a mismatch in ELF header
and __xen_guest section? When this happens the var "pa" is calculated
incorrectly causing "parray" to go out of bounds.

pa = (phdr->p_paddr + done) - dsi->elf_paddr_offset; 
va = xc_map_foreign_range(xch, dom, PAGE_SIZE, PROT_WRITE, 
                          parray[pa>>PAGE_SHIFT]);

[line 227-228 xc_load_elf.c loadelfimage()]

(In my flawed test, p_addr was 0xffffffff80000000 and elf_paddr_offset
was 0 due to obvious reasons)

I know this is rarely possible unless someone does something stupid like
I did :-) which is why I am wondering if we should test for this case. 

[ASIDE]
Due to this I think I should fix x86_xx.S in Mini-OS so that it picks up
&_text from minios_x86_xx.lds.

Cheers,
Aravindh

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

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