All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH 0/2] support xen HVM direct kernel boot
@ 2014-05-29  3:23 Chunyan Liu
  2014-05-29  3:23 ` [RFC PATCH 1/2] xen: pass kernel initrd to qemu Chunyan Liu
                   ` (2 more replies)
  0 siblings, 3 replies; 37+ messages in thread
From: Chunyan Liu @ 2014-05-29  3:23 UTC (permalink / raw)
  To: xen-devel; +Cc: Chunyan Liu, qemu-devel, pasik, Ian.Campbell

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.

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?
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.

Personally I'm not quite familiar with the details in this part of code,
so there might be things not considered, or there might be better method.
I'm very willing to hear suggestions to improve the work. Any comment or
feedback would be very appreciated! Thanks.
 
Chunyan Liu (2):
  xen: pass kernel initrd to qemu
  qemu: support xen hvm direct kernel boot

^ permalink raw reply	[flat|nested] 37+ messages in thread

end of thread, other threads:[~2014-06-03 11:32 UTC | newest]

Thread overview: 37+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-29  3:23 [RFC PATCH 0/2] support xen HVM direct kernel boot Chunyan Liu
2014-05-29  3:23 ` [RFC PATCH 1/2] xen: pass kernel initrd to qemu Chunyan Liu
2014-06-02 15:24   ` [Qemu-devel] " Ian Campbell
2014-06-02 15:24     ` Ian Campbell
2014-06-03  4:49     ` [Qemu-devel] [Xen-devel] " Chun Yan Liu
2014-06-03  4:49       ` Chun Yan Liu
2014-06-03  9:06       ` [Qemu-devel] " Ian Campbell
2014-06-03  9:06         ` Ian Campbell
2014-06-03  9:18         ` [Qemu-devel] " Chun Yan Liu
2014-06-03  9:18           ` Chun Yan Liu
2014-05-29  3:23 ` [RFC PATCH 2/2] qemu: support xen hvm direct kernel boot Chunyan Liu
2014-05-29  8:23   ` Paolo Bonzini
2014-06-03  4:59     ` [Qemu-devel] [Xen-devel] " Chun Yan Liu
2014-06-03  4:59       ` Chun Yan Liu
2014-05-30 16:04 ` [Xen-devel] [RFC PATCH 0/2] support xen HVM " Konrad Rzeszutek Wilk
2014-06-02 15:14   ` [Qemu-devel] " Stefano Stabellini
2014-06-02 15:14     ` Stefano Stabellini
2014-06-03  9:16     ` [Qemu-devel] " Chun Yan Liu
2014-06-03  9:16       ` Chun Yan Liu
2014-06-03  9:31       ` [Qemu-devel] " Ian Campbell
2014-06-03  9:31         ` [Qemu-devel] " Ian Campbell
2014-06-03 10:20         ` [Qemu-devel] [Xen-devel] " Chun Yan Liu
2014-06-03 10:20           ` Chun Yan Liu
2014-06-03 11:32         ` [Qemu-devel] " Stefano Stabellini
2014-06-03 11:32           ` Stefano Stabellini
2014-06-02 15:19   ` [Qemu-devel] " Ian Campbell
2014-06-02 15:19     ` Ian Campbell
2014-06-02 16:58     ` [Qemu-devel] " Konrad Rzeszutek Wilk
2014-06-02 16:58       ` Konrad Rzeszutek Wilk
2014-06-03  3:35       ` [Qemu-devel] " Chun Yan Liu
2014-06-03  3:35         ` Chun Yan Liu
2014-06-03  9:04         ` [Qemu-devel] " Ian Campbell
2014-06-03  9:04           ` Ian Campbell
2014-06-03  9:24           ` [Qemu-devel] " Chun Yan Liu
2014-06-03  9:24             ` Chun Yan Liu
2014-06-03  8:59       ` [Qemu-devel] [Xen-devel] " Ian Campbell
2014-06-03  8:59         ` Ian Campbell

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.