All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [RFC 0/3] QEMU changes to do PVH boot
@ 2018-12-05 22:37 ` Liam Merwick
  0 siblings, 0 replies; 32+ messages in thread
From: Liam Merwick @ 2018-12-05 22:37 UTC (permalink / raw)
  To: qemu-devel
  Cc: pbonzini, ehabkost, rth, xen-devel, sgarzare, mst, stefanha,
	maran.wilson, liam.merwick

For certain applications it is desirable to rapidly boot a KVM virtual
machine. In cases where legacy hardware and software support within the
guest is not needed, QEMU should be able to boot directly into the
uncompressed Linux kernel binary with minimal firmware involvement.

There already exists an ABI to allow this for Xen PVH guests and the ABI
is supported by Linux and FreeBSD:

   https://xenbits.xen.org/docs/unstable/misc/pvh.html

Details on the Linux changes: https://lkml.org/lkml/2018/4/16/1002
qboot patches: http://patchwork.ozlabs.org/project/qemu-devel/list/?series=80020

This patch series provides QEMU support to read the ELF header of an
uncompressed kernel binary and get the 32-bit PVH kernel entry point
from an ELF Note.  This is called when initialising the machine state
in pc_memory_init().  Later on in load_linux() if the kernel entry
address is present, the uncompressed kernel binary (ELF) is loaded
and qboot does futher initialisation of the guest (e820, etc.) and
jumps to the kernel entry address and boots the guest.


Usіng the method/scripts documented by the NEMU team at

   https://github.com/intel/nemu/wiki/Measuring-Boot-Latency
   https://lists.gnu.org/archive/html/qemu-devel/2018-12/msg00200.html

below are some timings measured (vmlinux and bzImage from the same build)
Time to get to kernel start is almost halved (95ṁs -> 48ms)

QEMU + qboot + vmlinux (PVH + 4.20-rc4)
 qemu_init_end: 41.550521
 fw_start: 41.667139 (+0.116618)
 fw_do_boot: 47.448495 (+5.781356)
 linux_startup_64: 47.720785 (+0.27229)
 linux_start_kernel: 48.399541 (+0.678756)
 linux_start_user: 296.952056 (+248.552515)

QEMU + qboot + bzImage:
 qemu_init_end: 29.209276
 fw_start: 29.317342 (+0.108066)
 linux_start_boot: 36.679362 (+7.36202)
 linux_startup_64: 94.531349 (+57.851987)
 linux_start_kernel: 94.900913 (+0.369564)
 linux_start_user: 401.060971 (+306.160058)

QEMU + bzImage:
 qemu_init_end: 30.424430
 linux_startup_64: 893.770334 (+863.345904)
 linux_start_kernel: 894.17049 (+0.400156)
 linux_start_user: 1208.679768 (+314.509278)


Liam Merwick (3):
  pvh: Add x86/HVM direct boot ABI header file
  pc: Read PVH entry point from ELF note in kernel binary
  pvh: Boot uncompressed kernel using direct boot ABI

 hw/i386/pc.c                | 344 +++++++++++++++++++++++++++++++++++++++++++-
 include/elf.h               |  10 ++
 include/hw/xen/start_info.h | 146 +++++++++++++++++++
 3 files changed, 499 insertions(+), 1 deletion(-)
 create mode 100644 include/hw/xen/start_info.h

-- 
1.8.3.1

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

end of thread, other threads:[~2018-12-21 21:35 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-05 22:37 [Qemu-devel] [RFC 0/3] QEMU changes to do PVH boot Liam Merwick
2018-12-05 22:37 ` Liam Merwick
2018-12-05 22:37 ` [Qemu-devel] [RFC 1/3] pvh: Add x86/HVM direct boot ABI header file Liam Merwick
2018-12-05 22:37   ` Liam Merwick
2018-12-11 14:01   ` [Qemu-devel] " Stefan Hajnoczi
2018-12-11 14:01     ` Stefan Hajnoczi
2018-12-11 14:57     ` [Qemu-devel] " Liam Merwick
2018-12-11 14:57       ` Liam Merwick
2018-12-11 15:03       ` [Qemu-devel] " Daniel P. Berrangé
2018-12-11 15:03         ` Daniel P. Berrangé
2018-12-21 20:03       ` Liam Merwick
2018-12-21 20:03         ` Liam Merwick
2018-12-05 22:37 ` [Qemu-devel] [RFC 2/3] pc: Read PVH entry point from ELF note in kernel binary Liam Merwick
2018-12-05 22:37   ` Liam Merwick
2018-12-11 14:17   ` [Qemu-devel] " Stefan Hajnoczi
2018-12-21 20:03     ` Liam Merwick
2018-12-21 20:03       ` Liam Merwick
2018-12-11 14:17   ` Stefan Hajnoczi
2018-12-05 22:37 ` [Qemu-devel] [RFC 3/3] pvh: Boot uncompressed kernel using direct boot ABI Liam Merwick
2018-12-05 22:37   ` Liam Merwick
2018-12-11 17:11   ` [Qemu-devel] " Stefano Garzarella
2018-12-11 18:35     ` Maran Wilson
2018-12-11 18:35       ` Maran Wilson
2018-12-12 15:28       ` [Qemu-devel] " Stefano Garzarella
2018-12-12 17:36         ` Maran Wilson
2018-12-12 17:36           ` Maran Wilson
2018-12-12 15:28       ` Stefano Garzarella
2018-12-11 17:11   ` Stefano Garzarella
2018-12-06  0:01 ` [Qemu-devel] [RFC 0/3] QEMU changes to do PVH boot no-reply
2018-12-06  0:01   ` no-reply
2018-12-06  6:18 ` Maran Wilson
2018-12-06  6:18   ` Maran Wilson

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.