From: Jeremy Fitzhardinge <jeremy@goop.org>
To: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: vgoyal@in.ibm.com, "H. Peter Anvin" <hpa@zytor.com>,
Gerd Hoffmann <kraxel@redhat.com>, Jeff Garzik <jeff@garzik.org>,
patches@x86-64.org, linux-kernel@vger.kernel.org,
virtualization <virtualization@lists.linux-foundation.org>
Subject: Re: [patches] [PATCH] [21/22] x86_64: Extend bzImage protocol for relocatable bzImage
Date: Thu, 03 May 2007 09:23:58 -0700 [thread overview]
Message-ID: <463A0C9E.4010402@goop.org> (raw)
In-Reply-To: <m1ps5iujl8.fsf@ebiederm.dsl.xmission.com>
Eric W. Biederman wrote:
> Yes. I guess in this context, I am generally for building the ELF
> headers by hand instead of with a linker script, because then we
> know exactly what is happening and can ensure everything is just so.
>
Yes, it seems easiest - particularly given how flaky binutils can get
when you really try to control its ELF generation.
> Sorry, for not being clear I have been expecting to do this for years,
> it is one of the reasons I keep coming back to putting an ELF header
> on the bzImage.
>
OK. It seems obvious, but I just wanted to make sure ;)
>> In the Xen case, its obviously the domain builder who creates the
>> mappings, and we can easily implement p != v mappings. But when booting
>> native, presumably paging is off at this stage, and only identity maps
>> can be implemented. I guess the rough rule is that if paging is enabled
>> on entry, the kernel should expect all the bzImage mappings to be in
>> place, but if paging is off, well, the question is moot.
>>
>
> Right. Except that there is a bit of a catch 22 in the
> para-virtualized environments of setting up the page tables, I'm not
> at all certain what the gain of setting up p != v mappings are.
>
Well, that's more or less it. If the decompressor ends up jumping to
startup_32, and that immediately goes into xen_start_kernel(), then
we're still running on the initial bzImage p=v pagetables. At the
moment, when the domain builder maps the kernel's vmlinux to the vaddrs
in its Phdrs, so there's no need to do any more boot-time pagetable
manipulation. If we come out of bzImage with only identity mappings,
then obviously the Xen case will need to do the same pagetable setup as
the native case - which is good so long as we can work out how to share
the code to do so.
For i386, it looks like this will be tricky because at this point:
* we're not running at the linked address, so C code will be tricky
and non-standard
* we need to deal with multiple hypervisors and their constraints on
what can be in a pagetable
* we could be running with no paging, or paging in either non-PAE or
PAE modes
Writing some code which can deal with all of those at once will be an
interesting exercise.
> Part of what I find compelling about this is our initial page tables
> for linux have always had more going on than the virtual addresses
> just being at a constant offset from of the physical addresses, so
> the actions of the current domain builders have me concerned that they
> may be violating some early linux booting assumptions and are
> currently just getting lucky. Moving the page table setup code into
> the kernel removes that dependency from the domain builders.
The nice thing about having the domain builder create the pagetables is
that it turns it from a tricky bootstrap problem into a relatively easy
job. The main thing is that the domain builder can create a scaffolding
pagetable which is enough to get everything started. Once you have that
in place, its pretty easy to update it to set precisely the right bits
in the ptes, etc.
It also means that the path for Xen vs native will be more similar,
because the bzImage code won't need to deal with pagetable setup at all:
for native it won't matter, and for Xen it has already been done. It
only matters once we hit the 32-bit kernel-proper code, and we diverge
at that point anyway.
J
next prev parent reply other threads:[~2007-05-03 16:23 UTC|newest]
Thread overview: 217+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-28 17:58 [PATCH] [0/22] x86 candidate patches for review II: 64bit relocatable kernel Andi Kleen
2007-04-28 17:58 ` [PATCH] [1/22] x86_64: dma_ops as const Andi Kleen
2007-04-28 17:58 ` [PATCH] [2/22] x86_64: Assembly safe page.h and pgtable.h Andi Kleen
2007-04-28 17:58 ` [PATCH] [3/22] x86_64: Kill temp boot pmds Andi Kleen
2007-04-28 17:58 ` [PATCH] [4/22] x86_64: Clean up the early boot page table Andi Kleen
2007-04-28 17:58 ` [PATCH] [5/22] x86_64: Fix early printk to use standard ISA mapping Andi Kleen
2007-04-28 17:58 ` [PATCH] [6/22] x86_64: modify copy_bootdata to use virtual addresses Andi Kleen
2007-04-28 17:58 ` [PATCH] [7/22] x86_64: cleanup segments Andi Kleen
2007-04-28 17:58 ` [PATCH] [8/22] x86_64: Add EFER to the register set saved by save_processor_state Andi Kleen
2007-04-28 17:58 ` [PATCH] [9/22] x86_64: 64bit PIC SMP trampoline Andi Kleen
2007-04-28 17:58 ` [PATCH] [10/22] x86_64: Get rid of dead code in suspend resume Andi Kleen
2007-04-28 17:58 ` [PATCH] [11/22] x86_64: wakeup.S rename registers to reflect right names Andi Kleen
2007-04-28 17:58 ` [PATCH] [12/22] x86_64: wakeup.S misc cleanups Andi Kleen
2007-04-28 17:59 ` [PATCH] [13/22] x86_64: 64bit ACPI wakeup trampoline Andi Kleen
2007-04-28 17:59 ` [PATCH] [14/22] x86_64: Modify discover_ebda to use virtual addresses Andi Kleen
2007-04-28 17:59 ` [PATCH] [15/22] x86_64: Remove the identity mapping as early as possible Andi Kleen
2007-04-28 17:59 ` [PATCH] [16/22] x86: Move swsusp __pa() dependent code to arch portion Andi Kleen
2007-04-28 17:59 ` [PATCH] [17/22] x86_64: do not use virt_to_page on kernel data address Andi Kleen
2007-04-28 17:59 ` [PATCH] [18/22] x86: __pa and __pa_symbol address space separation Andi Kleen
2007-04-28 17:59 ` [PATCH] [19/22] x86_64: Relocatable Kernel Support Andi Kleen
2007-04-28 17:59 ` [PATCH] [20/22] x86_64: build-time checking Andi Kleen
2007-04-28 17:59 ` [PATCH] [21/22] x86_64: Extend bzImage protocol for relocatable bzImage Andi Kleen
2007-04-28 18:07 ` Jeff Garzik
2007-04-28 18:24 ` Andi Kleen
2007-04-28 20:18 ` [patches] " Eric W. Biederman
2007-04-28 20:38 ` H. Peter Anvin
2007-04-28 20:46 ` Eric W. Biederman
2007-04-29 4:50 ` Vivek Goyal
2007-04-28 20:39 ` Jeff Garzik
2007-04-29 7:24 ` Jeremy Fitzhardinge
2007-04-29 15:11 ` Eric W. Biederman
2007-04-29 15:11 ` Eric W. Biederman
2007-04-30 3:03 ` Rusty Russell
2007-04-30 3:03 ` Rusty Russell
2007-04-30 4:38 ` H. Peter Anvin
2007-04-30 4:38 ` H. Peter Anvin
2007-04-30 5:03 ` Rusty Russell
2007-04-30 5:25 ` Eric W. Biederman
2007-04-30 5:25 ` Eric W. Biederman
2007-04-30 16:03 ` H. Peter Anvin
2007-04-30 16:47 ` Eric W. Biederman
2007-04-30 16:47 ` Eric W. Biederman
2007-04-30 16:03 ` H. Peter Anvin
2007-04-30 15:34 ` Eric W. Biederman
2007-04-30 15:34 ` Eric W. Biederman
2007-05-01 3:38 ` Rusty Russell
2007-05-01 3:38 ` Rusty Russell
2007-05-01 3:45 ` H. Peter Anvin
2007-05-01 3:45 ` H. Peter Anvin
2007-05-01 3:59 ` Rusty Russell
2007-05-01 3:59 ` Rusty Russell
2007-05-01 4:00 ` H. Peter Anvin
2007-05-01 4:00 ` H. Peter Anvin
2007-05-01 4:50 ` Rusty Russell
2007-05-01 5:28 ` H. Peter Anvin
2007-05-01 5:28 ` H. Peter Anvin
2007-05-01 6:05 ` Eric W. Biederman
2007-05-01 6:05 ` Eric W. Biederman
2007-05-01 4:50 ` Rusty Russell
2007-05-01 3:57 ` Eric W. Biederman
2007-05-01 3:57 ` Eric W. Biederman
2007-05-01 5:37 ` Jeremy Fitzhardinge
2007-05-01 5:37 ` Jeremy Fitzhardinge
2007-05-01 6:11 ` Eric W. Biederman
2007-05-01 6:11 ` Eric W. Biederman
2007-05-01 7:34 ` Rusty Russell
2007-05-01 7:34 ` Rusty Russell
2007-05-01 8:03 ` Jeremy Fitzhardinge
2007-05-01 8:03 ` Jeremy Fitzhardinge
2007-04-30 5:03 ` Rusty Russell
2007-04-30 18:50 ` Jeremy Fitzhardinge
2007-04-30 18:50 ` Jeremy Fitzhardinge
2007-04-30 22:10 ` Eric W. Biederman
2007-04-30 22:10 ` Eric W. Biederman
2007-04-30 22:42 ` Jeremy Fitzhardinge
2007-04-30 22:42 ` Jeremy Fitzhardinge
2007-04-30 22:51 ` Jeremy Fitzhardinge
2007-04-30 22:51 ` Jeremy Fitzhardinge
2007-04-30 23:10 ` Eric W. Biederman
2007-04-30 23:10 ` Eric W. Biederman
2007-04-30 23:16 ` H. Peter Anvin
2007-04-30 23:16 ` H. Peter Anvin
2007-04-30 23:35 ` Eric W. Biederman
2007-04-30 23:35 ` Eric W. Biederman
2007-05-01 3:39 ` Andi Kleen
2007-05-01 3:39 ` Andi Kleen
2007-05-01 2:48 ` H. Peter Anvin
2007-05-01 2:48 ` H. Peter Anvin
2007-05-02 9:31 ` Gerd Hoffmann
2007-05-02 9:31 ` Gerd Hoffmann
2007-05-02 15:16 ` Jeremy Fitzhardinge
2007-05-02 20:51 ` H. Peter Anvin
2007-05-02 21:01 ` Jeremy Fitzhardinge
2007-05-02 21:09 ` H. Peter Anvin
2007-05-02 21:09 ` H. Peter Anvin
2007-05-02 21:39 ` Jeremy Fitzhardinge
2007-05-02 21:39 ` Jeremy Fitzhardinge
2007-05-02 21:59 ` H. Peter Anvin
2007-05-02 21:59 ` H. Peter Anvin
2007-05-02 23:03 ` Jeremy Fitzhardinge
2007-05-02 23:03 ` Jeremy Fitzhardinge
2007-05-03 4:50 ` Vivek Goyal
2007-05-03 6:42 ` Eric W. Biederman
2007-05-03 7:05 ` Jeremy Fitzhardinge
2007-05-03 13:23 ` Eric W. Biederman
2007-05-03 16:23 ` Jeremy Fitzhardinge [this message]
2007-05-03 16:23 ` Jeremy Fitzhardinge
2007-05-03 13:23 ` Eric W. Biederman
2007-05-03 7:05 ` Jeremy Fitzhardinge
2007-05-08 16:41 ` yhlu
2007-05-08 17:18 ` Eric W. Biederman
2007-05-08 17:33 ` yhlu
2007-05-08 17:33 ` yhlu
2007-05-08 18:51 ` yhlu
2007-05-08 19:01 ` yhlu
2007-05-08 19:01 ` yhlu
2007-05-08 19:11 ` Eric W. Biederman
2007-05-08 19:11 ` Eric W. Biederman
2007-05-08 22:00 ` yhlu
2007-05-08 22:07 ` Jeremy Fitzhardinge
2007-05-08 22:07 ` Jeremy Fitzhardinge
2007-05-08 22:35 ` H. Peter Anvin
2007-05-08 22:41 ` yhlu
2007-05-08 23:13 ` H. Peter Anvin
2007-05-08 23:13 ` H. Peter Anvin
2007-05-09 1:44 ` Eric W. Biederman
2007-05-09 2:23 ` H. Peter Anvin
2007-05-09 3:30 ` Eric W. Biederman
2007-05-09 3:30 ` Eric W. Biederman
2007-05-09 4:52 ` yhlu
2007-05-09 4:52 ` yhlu
2007-05-09 4:52 ` yhlu
2007-05-09 5:04 ` H. Peter Anvin
2007-05-09 5:04 ` H. Peter Anvin
2007-05-09 5:04 ` H. Peter Anvin
2007-05-09 5:04 ` H. Peter Anvin
2007-05-09 5:04 ` H. Peter Anvin
2007-05-09 5:04 ` H. Peter Anvin
2007-05-09 5:08 ` H. Peter Anvin
2007-05-09 5:08 ` H. Peter Anvin
2007-05-09 5:48 ` yhlu
2007-05-09 5:48 ` yhlu
2007-05-09 5:48 ` yhlu
2007-05-09 5:54 ` H. Peter Anvin
2007-05-09 5:54 ` H. Peter Anvin
2007-05-09 5:54 ` H. Peter Anvin
2007-05-09 5:54 ` H. Peter Anvin
2007-05-09 5:54 ` H. Peter Anvin
2007-05-09 5:54 ` H. Peter Anvin
2007-05-09 5:55 ` H. Peter Anvin
2007-05-09 5:55 ` H. Peter Anvin
2007-05-09 5:55 ` H. Peter Anvin
2007-05-09 10:52 ` Eric W. Biederman
2007-05-09 10:52 ` Eric W. Biederman
2007-05-09 16:31 ` yhlu
2007-05-09 16:31 ` yhlu
2007-05-09 19:21 ` H. Peter Anvin
2007-05-10 0:52 ` Eric W. Biederman
2007-05-10 0:52 ` Eric W. Biederman
2007-05-09 19:21 ` H. Peter Anvin
2007-05-09 5:55 ` H. Peter Anvin
2007-05-09 5:55 ` H. Peter Anvin
2007-05-09 5:55 ` H. Peter Anvin
2007-05-09 5:48 ` yhlu
2007-05-09 5:08 ` H. Peter Anvin
2007-05-09 5:08 ` H. Peter Anvin
2007-05-09 5:08 ` H. Peter Anvin
2007-05-09 5:08 ` H. Peter Anvin
2007-05-09 7:58 ` Gerd Hoffmann
2007-05-09 7:58 ` Gerd Hoffmann
2007-05-09 11:21 ` Eric W. Biederman
2007-05-09 11:21 ` Eric W. Biederman
2007-05-10 0:55 ` yhlu
2007-05-10 0:55 ` yhlu
2007-05-09 2:23 ` H. Peter Anvin
2007-05-09 2:44 ` yhlu
2007-05-09 2:44 ` yhlu
2007-05-09 1:44 ` Eric W. Biederman
2007-05-08 22:41 ` yhlu
2007-05-08 22:35 ` H. Peter Anvin
2007-05-08 22:00 ` yhlu
2007-05-09 3:33 ` Vivek Goyal
2007-05-09 4:42 ` yhlu
2007-05-09 4:42 ` yhlu
2007-05-09 4:42 ` yhlu
2007-05-09 4:58 ` Eric W. Biederman
2007-05-09 4:58 ` ebiederm
2007-05-09 4:58 ` ebiederm
2007-05-09 4:58 ` ebiederm
2007-05-09 4:58 ` Eric W. Biederman
2007-05-09 4:58 ` ebiederm
2007-05-09 4:42 ` yhlu
2007-05-09 3:33 ` Vivek Goyal
2007-05-08 18:51 ` yhlu
2007-05-08 17:18 ` Eric W. Biederman
2007-05-08 17:24 ` Vivek Goyal
2007-05-08 17:34 ` yhlu
2007-05-08 17:34 ` yhlu
2007-05-08 17:24 ` Vivek Goyal
2007-05-08 16:41 ` yhlu
2007-05-03 6:42 ` Eric W. Biederman
2007-05-03 4:50 ` Vivek Goyal
2007-05-03 2:01 ` Rusty Russell
2007-05-03 2:01 ` Rusty Russell
2007-05-02 21:01 ` Jeremy Fitzhardinge
2007-05-02 21:17 ` Eric W. Biederman
2007-05-02 21:24 ` H. Peter Anvin
2007-05-02 21:36 ` Eric W. Biederman
2007-05-02 21:36 ` Eric W. Biederman
2007-05-02 21:24 ` H. Peter Anvin
2007-05-02 21:17 ` Eric W. Biederman
2007-05-02 20:51 ` H. Peter Anvin
2007-05-02 15:16 ` Jeremy Fitzhardinge
2007-04-29 17:51 ` H. Peter Anvin
2007-04-29 18:10 ` Eric W. Biederman
2007-04-30 4:41 ` Rusty Russell
2007-04-28 17:59 ` [PATCH] [22/22] x86_64: Move cpu verification code to common file Andi Kleen
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=463A0C9E.4010402@goop.org \
--to=jeremy@goop.org \
--cc=ebiederm@xmission.com \
--cc=hpa@zytor.com \
--cc=jeff@garzik.org \
--cc=kraxel@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=patches@x86-64.org \
--cc=vgoyal@in.ibm.com \
--cc=virtualization@lists.linux-foundation.org \
/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.