virtualization.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
From: Jeremy Fitzhardinge <jeremy@goop.org>
To: "H. Peter Anvin" <hpa@zytor.com>
Cc: Virtualization Mailing List <virtualization@lists.osdl.org>,
	Vivek Goyal <vgoyal@in.ibm.com>,
	"Eric W. Biederman" <ebiederm@xmission.com>
Subject: Re: [patch rfc wip] first cut of ELF bzImage
Date: Thu, 31 May 2007 13:07:57 -0700	[thread overview]
Message-ID: <465F2B1D.5030704@goop.org> (raw)
In-Reply-To: <465F0B71.60303@zytor.com>

H. Peter Anvin wrote:
> Jeremy Fitzhardinge wrote:
>   
>> H. Peter Anvin wrote:
>>     
>>> The more I'm thinking about this whole issue, the more I'm thinking this
>>> is really misdirected.
>>>
>>> I'm starting to think that the right thing to do might very well be as
>>> follows:
>>>
>>> - Change the payload of the bzImage file from a flat binary to an ELF
>>>   file -- a stripped vmlinux.gz.
>>> - Change the decompressor to incorporate a (simple) ELF parser.
>>> - Incorporate a couple of pointer fields in the bzImage header that
>>>   points directly to the payload, the format of which can be identified
>>>   via its magic number (currently gzip). 
>>>       
>> I don't see a lot of benefit in doing this.  Having some form of
>> executable I can just run is probably simpler for me to implement than
>> trying to unwrap a vmlinux.gz from an envelope, even if that's what
>> we're currently booting.  The Xen domain builder simply wants an ELF
>> file it can load; if its a self-decompressing kernel image, then that's
>> OK.  The only real problem is setting up the initial mappings so that
>> the booting code can run as if paging is enabled.  The simplest answer
>> to that is to simply 1:1 map all lowmem and set it running, but having
>> specific Phdrs laying out the mappings would be a bit more refined.
>>
>> Now if the bzImage were simply some 16-bit startup code prepended onto
>> a self-decompressing 32-bit ELF kernel file, then that would be fairly
>> easy to deal with too, since that would just be a matter of looking at
>> the boot_params to find the start of the ELF file and continue from
>> there.
>>     
>
> You're focusing entirely on Xen here, but if Xen really is the only user
> of this, then I say there isn't much benefit into doing this at all.
>   

No, I'm using Xen as a concrete example of something which already
exists with well-understood requirements.  I don't think its
requirements are so wacky that it's unrepresentative of other things
which may want to use the same mechanism.  It's much better to talk
about concrete examples rather than just wave an
"architecture-in-the-abstract" wand around.

> So it really comes down to: what are the bigger problems we're solving?
>   

I think the concise statement is: how do we boot a kernel in 32/64-bit
mode, bypassing as much cruft as possible while supporting the widest
possible range of environments?

I think the environment space can be broadly parameterised by:

    paging enabled: yes(pae)/yes(non-pae)/no
    running in ring: 0/1/3
    mode: paravirtualized/native


> Anything that's a true virtualizer should just be able to load and run a
> bzImage file from the 16-bit entrypoint, obviously.  That's not what
> Rusty is doing, but all he'd need is the bit (already proposed) to
> inhibit cli and segment reloads.
>   

Yes, well, we're not talking about full virtualization.  If we were then
there'd be nothing to talk about.

Avoiding cli and segment reloads are part of the general "running
paravirtualized" (or perhaps "running in non-ring 0") part of the
environment space, which is common to all the current paravirt
implementations (though I think vmi and kvm will both be running fully
virtualized at the point in the boot).

    J

      parent reply	other threads:[~2007-05-31 20:07 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-31  7:27 [patch rfc wip] first cut of ELF bzImage Jeremy Fitzhardinge
2007-05-31  7:43 ` H. Peter Anvin
2007-05-31  7:52   ` Jeremy Fitzhardinge
2007-05-31  8:12     ` Rusty Russell
2007-05-31 17:52     ` H. Peter Anvin
2007-05-31 19:07       ` Eric W. Biederman
2007-05-31 19:27         ` H. Peter Anvin
2007-05-31 20:22           ` Jeremy Fitzhardinge
2007-05-31 20:17         ` Jeremy Fitzhardinge
2007-05-31 20:07       ` Jeremy Fitzhardinge [this message]

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=465F2B1D.5030704@goop.org \
    --to=jeremy@goop.org \
    --cc=ebiederm@xmission.com \
    --cc=hpa@zytor.com \
    --cc=vgoyal@in.ibm.com \
    --cc=virtualization@lists.osdl.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).