virtualization.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
From: Jeremy Fitzhardinge <jeremy@goop.org>
To: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Jeff Garzik <jeff@garzik.org>,
	patches@x86-64.org, linux-kernel@vger.kernel.org,
	Vivek Goyal <vgoyal@in.ibm.com>, "H. Peter Anvin" <hpa@zytor.com>,
	virtualization <virtualization@lists.linux-foundation.org>
Subject: Re: [patches] [PATCH] [21/22] x86_64: Extend bzImage protocol for relocatable bzImage
Date: Mon, 30 Apr 2007 11:50:16 -0700	[thread overview]
Message-ID: <46363A68.6080201@goop.org> (raw)
In-Reply-To: <m14pmz8bbb.fsf@ebiederm.dsl.xmission.com>

Eric W. Biederman wrote:
> I have several ideas on how we can make this work but first I have to
> ask what is it that you are trying to accomplish?
>   

The requirements are:

   1. the domain builder needs to get various information about the
      guest kernel by inspecting its ELF notes
   2. we start the kernel in 32-bit mode with paging enabled, in ring 1
   3. the guest kernel needs various pieces of runtime information from
      the hypervisor about its runtime environment

At the moment we just load a bare vmlinux kernel with a xen-specific
entrypoint, so 1 and 2 are easy.  3 is achieved by having the domain
builder start the kernel with %esi pointing to a Xen info structure
which tells the kernel what it needs to know.

That works OK for a kernel which is compiled to run under Xen and can't
run in any other environment, but now that we can generate a single
kernel which can run in any number of different environments, its
unfortunate that we still need multiple variants of the kernel image.

Clearly the Xen domain builder needs to be extended to deal with a
bzImage format kernel directly, so we can use the same actual kernel
image for native and Xen booting.  Since we're changing the domain
builder anyway, I can change the details of how it works so long as the
3 requirements can still be met.

So, I have no problem in also building a boot protocol info structure,
and passing that in %esi, so long as I can store a pointer to the
Xen-specific info as well.  Some info will be duplicated, like the
initrd location, but that's OK.

I'd already reserved a Xen bootloader ID specifically with this in mind;
all I really need is a place where I can stash the pointer.

I think I'd prefer to have the domain builder decompress/relocate the
kernel from the bzImage and start it directly, rather than have it
decompress/relocate itself, but I'm not really set on that.  It depends
on how well it can deal with having paging enabled and being in ring 1. 
Looks like it might just be a matter of starting up with "enough" memory
mapped.

So the biggest unknown is where to put the Xen ELF notes.

    J

  parent reply	other threads:[~2007-04-30 18:50 UTC|newest]

Thread overview: 104+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20070428758.455116000@suse.de>
     [not found] ` <20070428175909.1D09D151CA@wotan.suse.de>
     [not found]   ` <46338D72.70402@garzik.org>
     [not found]     ` <m1fy6kdzi1.fsf@ebiederm.dsl.xmission.com>
     [not found]       ` <4634483E.9030307@goop.org>
2007-04-29 15:11         ` [patches] [PATCH] [21/22] x86_64: Extend bzImage protocol for relocatable bzImage Eric W. Biederman
2007-04-30  3:03           ` Rusty Russell
     [not found]           ` <1177902195.30071.203.camel@localhost.localdomain>
2007-04-30  4:38             ` H. Peter Anvin
2007-04-30  5:03               ` Rusty Russell
     [not found]               ` <1177909434.30071.216.camel@localhost.localdomain>
2007-04-30  5:25                 ` Eric W. Biederman
2007-04-30 16:03                   ` H. Peter Anvin
     [not found]                   ` <46361341.1050806@zytor.com>
2007-04-30 16:47                     ` Eric W. Biederman
2007-04-30 15:34                 ` Eric W. Biederman
     [not found]                 ` <m1ejm16flv.fsf@ebiederm.dsl.xmission.com>
2007-05-01  3:38                   ` Rusty Russell
     [not found]                   ` <1177990722.28659.39.camel@localhost.localdomain>
2007-05-01  3:45                     ` H. Peter Anvin
2007-05-01  3:59                       ` Rusty Russell
2007-05-01  4:00                       ` H. Peter Anvin
2007-05-01  4:50                         ` Rusty Russell
     [not found]                         ` <1177995014.28659.54.camel@localhost.localdomain>
2007-05-01  5:28                           ` H. Peter Anvin
2007-05-01  6:05                             ` Eric W. Biederman
2007-05-01  3:57                     ` Eric W. Biederman
2007-05-01  5:37                       ` Jeremy Fitzhardinge
     [not found]                       ` <4636D200.3010406@goop.org>
2007-05-01  6:11                         ` Eric W. Biederman
2007-05-01  7:34                         ` Rusty Russell
     [not found]                         ` <1178004868.28659.57.camel@localhost.localdomain>
2007-05-01  8:03                           ` Jeremy Fitzhardinge
2007-04-30 18:50           ` Jeremy Fitzhardinge [this message]
2007-04-30 22:10             ` Eric W. Biederman
     [not found]             ` <m18xc9344o.fsf@ebiederm.dsl.xmission.com>
2007-04-30 22:42               ` Jeremy Fitzhardinge
     [not found]               ` <463670D1.3000003@goop.org>
2007-04-30 22:51                 ` Jeremy Fitzhardinge
2007-04-30 23:10                 ` Eric W. Biederman
     [not found]                 ` <m14pmx31bw.fsf@ebiederm.dsl.xmission.com>
2007-04-30 23:16                   ` H. Peter Anvin
2007-04-30 23:35                     ` Eric W. Biederman
     [not found]                     ` <20070501033931.GI25929@bingen.suse.de>
2007-05-01  2:48                       ` H. Peter Anvin
2007-05-01  3:39                     ` Andi Kleen
2007-05-02  9:31             ` Gerd Hoffmann
     [not found]             ` <46385A8A.6070405@redhat.com>
2007-05-02 15:16               ` Jeremy Fitzhardinge
     [not found]               ` <4638AB55.20408@goop.org>
2007-05-02 20:51                 ` H. Peter Anvin
     [not found]                 ` <4638F9BE.8090508@zytor.com>
2007-05-02 21:01                   ` Jeremy Fitzhardinge
     [not found]                   ` <4638FC39.4010101@goop.org>
2007-05-02 21:09                     ` H. Peter Anvin
     [not found]                     ` <4638FE1B.9050901@zytor.com>
2007-05-02 21:39                       ` Jeremy Fitzhardinge
     [not found]                       ` <46390523.5010809@goop.org>
2007-05-02 21:59                         ` H. Peter Anvin
     [not found]                         ` <463909AF.9040205@zytor.com>
2007-05-02 23:03                           ` Jeremy Fitzhardinge
2007-05-03  4:50                           ` Vivek Goyal
     [not found]                           ` <20070503045031.GA5794@in.ibm.com>
2007-05-03  6:42                             ` Eric W. Biederman
     [not found]                             ` <m1tzuuv24z.fsf@ebiederm.dsl.xmission.com>
2007-05-03  7:05                               ` Jeremy Fitzhardinge
     [not found]                               ` <463989BD.6040603@goop.org>
2007-05-03 13:23                                 ` Eric W. Biederman
     [not found]                                 ` <m1ps5iujl8.fsf@ebiederm.dsl.xmission.com>
2007-05-03 16:23                                   ` Jeremy Fitzhardinge
2007-05-08 16:41                               ` yhlu
     [not found]                               ` <86802c440705080941y69ddd5d6lab170c5f3967f148@mail.gmail.com>
2007-05-08 17:18                                 ` Eric W. Biederman
2007-05-08 17:24                                 ` Vivek Goyal
     [not found]                                 ` <m1sla7i68s.fsf@ebiederm.dsl.xmission.com>
2007-05-08 17:33                                   ` yhlu
2007-05-08 18:51                                     ` yhlu
     [not found]                                     ` <86802c440705081151r6bfd82e4o50c6a34b2b2a833f@mail.gmail.com>
2007-05-08 19:01                                       ` yhlu
2007-05-08 19:11                                       ` Eric W. Biederman
     [not found]                                       ` <m1k5vji107.fsf@ebiederm.dsl.xmission.com>
2007-05-08 22:00                                         ` yhlu
     [not found]                                         ` <86802c440705081500x682ee098y7d51f7bb98dbcff6@mail.gmail.com>
2007-05-08 22:07                                           ` Jeremy Fitzhardinge
     [not found]                                           ` <4640F4B3.30408@goop.org>
2007-05-08 22:35                                             ` H. Peter Anvin
     [not found]                                             ` <4640FB2C.2060300@zytor.com>
2007-05-08 22:41                                               ` yhlu
     [not found]                                               ` <86802c440705081541v7d0773cek2c5fae1854b68bbc@mail.gmail.com>
2007-05-08 23:13                                                 ` H. Peter Anvin
     [not found]                                                 ` <46410403.4050802@zytor.com>
2007-05-09  1:44                                                   ` Eric W. Biederman
     [not found]                                                   ` <m17irivkhy.fsf@ebiederm.dsl.xmission.com>
2007-05-09  2:23                                                     ` H. Peter Anvin
2007-05-09  2:44                                                     ` yhlu
     [not found]                                                     ` <46413087.2020505@zytor.com>
2007-05-09  3:30                                                       ` Eric W. Biederman
     [not found]                                                       ` <m1tzumu10k.fsf@ebiederm.dsl.xmission.com>
2007-05-09  4:52                                                         ` yhlu
2007-05-09  4:52                                                         ` yhlu
     [not found]                                                         ` <86802c440705082152g49d4d3echf3eb165ce4feb2e9@mail.gmail.com>
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
     [not found]                                                           ` <46415640.6000600@zytor.com>
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  5:08                                                             ` H. Peter Anvin
     [not found]                                                             ` <4641573C.1000205@zytor.com>
2007-05-09  5:48                                                               ` yhlu
2007-05-09  5:48                                                               ` yhlu
2007-05-09  5:48                                                               ` yhlu
     [not found]                                                               ` <86802c440705082248r5248aa08s8299e03f615b984a@mail.gmail.com>
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  5:55                                                                 ` H. Peter Anvin
2007-05-09  5:55                                                                 ` H. Peter Anvin
     [not found]                                                                 ` <46416246.9090005@zytor.com>
2007-05-09 10:52                                                                   ` Eric W. Biederman
     [not found]                                                                   ` <m1abwetgkn.fsf@ebiederm.dsl.xmission.com>
2007-05-09 16:31                                                                     ` yhlu
2007-05-09 19:21                                                                     ` H. Peter Anvin
     [not found]                                                                     ` <46421F3D.7060401@zytor.com>
2007-05-10  0:52                                                                       ` Eric W. Biederman
2007-05-09  7:58                                                         ` Gerd Hoffmann
     [not found]                                                         ` <46417F0B.1080405@redhat.com>
2007-05-09 11:21                                                           ` Eric W. Biederman
2007-05-10  0:55                                                           ` yhlu
2007-05-09  3:33                                       ` Vivek Goyal
     [not found]                                       ` <20070509033348.GA12361@in.ibm.com>
2007-05-09  4:42                                         ` yhlu
2007-05-09  4:42                                         ` yhlu
2007-05-09  4:42                                         ` yhlu
     [not found]                                         ` <86802c440705082142u7ee2b402q9ae09edbed32766a@mail.gmail.com>
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
     [not found]                                 ` <20070508172449.GA1932@in.ibm.com>
2007-05-08 17:34                                   ` yhlu
2007-05-03  2:01                       ` Rusty Russell
2007-05-02 21:17                   ` Eric W. Biederman
     [not found]                   ` <m13b2fvsbn.fsf@ebiederm.dsl.xmission.com>
2007-05-02 21:24                     ` H. Peter Anvin
     [not found]                     ` <46390185.30900@zytor.com>
2007-05-02 21:36                       ` Eric W. Biederman

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=46363A68.6080201@goop.org \
    --to=jeremy@goop.org \
    --cc=ebiederm@xmission.com \
    --cc=hpa@zytor.com \
    --cc=jeff@garzik.org \
    --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 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).