From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Ian Campbell <Ian.Campbell@citrix.com>
Cc: xen-devel@lists.xensource.com, Chunyan Liu <cyliu@suse.com>,
qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [Xen-devel] [RFC PATCH 0/2] support xen HVM direct kernel boot
Date: Mon, 2 Jun 2014 12:58:36 -0400 [thread overview]
Message-ID: <20140602165836.GD5127@phenom.dumpdata.com> (raw)
In-Reply-To: <1401722371.30097.5.camel@kazak.uk.xensource.com>
On Mon, Jun 02, 2014 at 04:19:31PM +0100, Ian Campbell wrote:
> On Fri, 2014-05-30 at 12:04 -0400, Konrad Rzeszutek Wilk wrote:
> > On Thu, May 29, 2014 at 11:23:22AM +0800, Chunyan Liu wrote:
> > > Following previous discussion:
> > > https://lists.gnu.org/archive/html/qemu-devel/2014-04/msg03843.html
> > >
> > > I spent lot of time to understand xen xc_hvm_build, hvmloader code,
> > > and qemu pc_memory_init, xen_ram_init code, and wrote experimental
> > > code to test. Now it's basically working based on seabios.
> >
> > Excellent!
> > >
> > > Talking about qemu linuxboot.bin/multiboot.bin first, they are
> > > implemented to intercept boot process, originally by override int19,
> > > later changed to provide BEV entry which will be called by seabios
> > > if option rom is selected for booting. linuxboot.bin/multiboot.bin
> > > will load kernel/initrd and jump to execute kernel directly.
> > >
> > > In qemu load_linux() code, it first read out kernel/initrd file and
> > > store related ADDRs to fw_cfg (from where linuxboot.bin/multiboot.bin
> > > will get the ADDRs and load kernel/initrd data), then add
> > > linuxboot.bin/multiboot.bin to option rom with bootindex=0.
> > >
> > > In seabios side, it could load and execute ROMs by itself, and according
> > > to boot order, it will boot from the BEV entry on the option rom. That
> > > will then be taken over by linuxboot.bin/multiboot.bin.
> > >
> > > So, in theory, qemu load_linux() code almost does the work. I just tried
> > > to reuse it for xen.
> > >
> > > xen side patch: pass kernel/initrd/append parameters to qemu-dm
> > > qemu side patch: reuse load_linux() for xen hvm direct kernel boot.
> > > Different from pc_memory_init which does lots of ram alloc work
> > > and rom/bios loading work, for xen, we only need to init a basic
> > > fw_cfg device used by load_linux() to store ADDRs and
> > > linuxboot.bin/multiboot.bin to retrive ADDRs, then load_linux(),
> > > after that, do real add option rom work to add
> > > linuxboot.bin/multiboot.bin to system option rom. Other things
> > > would be done by seabios smoothly.
> > >
> > > In my testing, it's working based on seabios.
> > > Rombios case is not working. But now that xen prefers qemu upstream,
> > > seabios will be default, do we need to put effort to make rombios work?
> >
> > No. But the code (libxl) should detect whether you are using the
> > traditional QEMU - which would be using ROM BIOS. If it detects that
> > it shouldn't allow you to pass the arguments.
> >
> > You probably will also need to an docs/ change to document these
> > new parameters.
>
> Yes, at the very least the manpages...
>
> > > And stubdom case, since I didn't make my guest started even without direct
> > > kernel boot, I don't know if it works. And I still could not well
> > > understand about the differences to stubdom and non stubdom this work
> > > may cover. Any problems please point out.
> >
> > Hmm, you would have to somehow 'transfer' the images from one domain
> > (the control domain) to the stubdomain which would do the execution.
>
> Yes, which most likely involves preseeding the guest RAM with the files
> at a discoverable location. Icky.
Or some form of FTP over XenBus :-)
>
> Ian.
>
next prev parent reply other threads:[~2014-06-02 16:59 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1401333804-15456-1-git-send-email-cyliu@suse.com>
[not found] ` <20140530160452.GB3621@localhost.localdomain>
2014-06-02 15:14 ` [Qemu-devel] [Xen-devel] [RFC PATCH 0/2] support xen HVM direct kernel boot Stefano Stabellini
2014-06-03 9:16 ` Chun Yan Liu
2014-06-03 9:31 ` Ian Campbell
2014-06-03 10:20 ` Chun Yan Liu
2014-06-03 11:32 ` Stefano Stabellini
2014-06-02 15:19 ` Ian Campbell
2014-06-02 16:58 ` Konrad Rzeszutek Wilk [this message]
2014-06-03 3:35 ` Chun Yan Liu
2014-06-03 9:04 ` Ian Campbell
2014-06-03 9:24 ` Chun Yan Liu
2014-06-03 8:59 ` Ian Campbell
[not found] ` <1401333804-15456-2-git-send-email-cyliu@suse.com>
2014-06-02 15:24 ` [Qemu-devel] [RFC PATCH 1/2] xen: pass kernel initrd to qemu Ian Campbell
2014-06-03 4:49 ` [Qemu-devel] [Xen-devel] " Chun Yan Liu
2014-06-03 9:06 ` Ian Campbell
2014-06-03 9:18 ` Chun Yan Liu
[not found] ` <1401333804-15456-3-git-send-email-cyliu@suse.com>
[not found] ` <5386EE82.8040208@redhat.com>
2014-06-03 4:59 ` [Qemu-devel] [Xen-devel] [RFC PATCH 2/2] qemu: support xen hvm direct kernel boot Chun Yan Liu
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=20140602165836.GD5127@phenom.dumpdata.com \
--to=konrad.wilk@oracle.com \
--cc=Ian.Campbell@citrix.com \
--cc=cyliu@suse.com \
--cc=qemu-devel@nongnu.org \
--cc=xen-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 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).