From: Alex Williamson <alex.williamson@hp.com>
To: xen-devel <xen-devel@lists.xensource.com>,
xen-ia64-devel <xen-ia64-devel@lists.xensource.com>
Subject: elf loader problems on xen/ia64
Date: Sat, 20 May 2006 14:37:53 -0600 [thread overview]
Message-ID: <1148157473.13851.48.camel@localhost> (raw)
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
next reply other threads:[~2006-05-20 20:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-20 20:37 Alex Williamson [this message]
2006-05-21 8:42 ` elf loader problems on xen/ia64 Keir Fraser
2006-05-21 17:38 ` Alex Williamson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1148157473.13851.48.camel@localhost \
--to=alex.williamson@hp.com \
--cc=xen-devel@lists.xensource.com \
--cc=xen-ia64-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.