* elf loader problems on xen/ia64
@ 2006-05-20 20:37 Alex Williamson
2006-05-21 8:42 ` Keir Fraser
0 siblings, 1 reply; 3+ messages in thread
From: Alex Williamson @ 2006-05-20 20:37 UTC (permalink / raw)
To: xen-devel, xen-ia64-devel
Hi,
I've spent the past day chasing down why xen/ia64 stopped booting
paravirtualized kernels on xen-unstable.hg. The problem started in
xen-unstable.hg cset 9980. This made the following change in
loadelfimage():
@@ -204,7 +216,7 @@ loadelfimage(
for ( done = 0; done < phdr->p_filesz; done += chunksz )
{
- pa = (phdr->p_paddr + done) - dsi->v_start;
+ pa = (phdr->p_paddr + done) - dsi->elf_paddr_offset;
va = xc_map_foreign_range(
xch, dom, PAGE_SIZE, PROT_WRITE, parray[pa>>PAGE_SHIFT]);
chunksz = phdr->p_filesz - done;
@@ -217,7 +229,7 @@ loadelfimage(
for ( ; done < phdr->p_memsz; done += chunksz )
{
- pa = (phdr->p_paddr + done) - dsi->v_start;
+ pa = (phdr->p_paddr + done) - dsi->elf_paddr_offset;
va = xc_map_foreign_range(
xch, dom, PAGE_SIZE, PROT_WRITE, parray[pa>>PAGE_SHIFT]);
chunksz = phdr->p_memsz - done;
On ia64, the kernel image has these as follows:
phdr->p_paddr = 0x4000000
dsi->v_start = 0x4000000
dsi->elf_paddr_offset = 0x0
Therefore this change introduces a significant difference in the
resulting pa value, and causes and MCA when the guest kernel is loaded.
Changesets 10006 and 10009 mask this problem by declaring the image
invalid because xen/ia64 does not have a guestinfo section in the kernel
binary.
I'm not and elf expert, what's the best way to solve this? It seems
we've overlooked that Xen/ia64 doesn't have a VIRT_BASE tag in
guestinfo, so elf_paddr_offset never gets set to anything useful. Is it
best to set dsi->elf_paddr_offset to phdr->p_paddr somewhere in
parseelfimage()? Thanks,
Alex
--
Alex Williamson HP Linux & Open Source Lab
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: elf loader problems on xen/ia64
2006-05-20 20:37 elf loader problems on xen/ia64 Alex Williamson
@ 2006-05-21 8:42 ` Keir Fraser
2006-05-21 17:38 ` Alex Williamson
0 siblings, 1 reply; 3+ messages in thread
From: Keir Fraser @ 2006-05-21 8:42 UTC (permalink / raw)
To: Alex Williamson; +Cc: xen-devel, xen-ia64-devel
On 20 May 2006, at 21:37, Alex Williamson wrote:
> Therefore this change introduces a significant difference in the
> resulting pa value, and causes and MCA when the guest kernel is loaded.
> Changesets 10006 and 10009 mask this problem by declaring the image
> invalid because xen/ia64 does not have a guestinfo section in the
> kernel
> binary.
The new check for existence of VIRT_BASE can be got rid of: Aravindh
has now supplied us a patch for the actual underlying problem. I'll
also add a proper fallback value for elf_paddr_offset, as that
obviously got missed (we forgot about ia64, sorry!). I'll check
something in shortly....
-- Keir
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: elf loader problems on xen/ia64
2006-05-21 8:42 ` Keir Fraser
@ 2006-05-21 17:38 ` Alex Williamson
0 siblings, 0 replies; 3+ messages in thread
From: Alex Williamson @ 2006-05-21 17:38 UTC (permalink / raw)
To: Keir Fraser; +Cc: xen-devel, xen-ia64-devel
On Sun, 2006-05-21 at 09:42 +0100, Keir Fraser wrote:
>
> The new check for existence of VIRT_BASE can be got rid of: Aravindh
> has now supplied us a patch for the actual underlying problem. I'll
> also add a proper fallback value for elf_paddr_offset, as that
> obviously got missed (we forgot about ia64, sorry!). I'll check
> something in shortly....
Thanks Keir, cset 10054 does the trick! We're currently failing to
build on ia64 because of cset 10035. If you could commit Chris' fix for
this (please ignore my ia64 only fix) then we should be back in pretty
good shape with xen/ia64 on xen-unstable.hg. Thanks,
Alex
--
Alex Williamson HP Linux & Open Source Lab
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-05-21 17:38 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-05-20 20:37 elf loader problems on xen/ia64 Alex Williamson
2006-05-21 8:42 ` Keir Fraser
2006-05-21 17:38 ` Alex Williamson
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.