qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] Question about qemu firmware configuration (fw_cfg) device


From: Richard W.M. Jones
Subject: [Qemu-devel] Question about qemu firmware configuration (fw_cfg) device
Date: Sat, 17 Jul 2010 10:50:59 +0100
User-agent: Mutt/1.5.18 (2008-05-17)

I'm trying to speed up the process of loading kernel and initrd.

I found that the main loop which loads these into qemu memory does it
via executing in the guest:

  rep insb (%dx),%es:(%edi)

In other words, reading it byte-at-a-time from an emulated IO port.
This is very slow[1] when your initrd is > 100MB like mine is.

Questions:

Is fw_cfg a purely qemu concept?  Does this BIOS firmware port
0x510-0x511 exist in real hardware?

I understand from the git logs that fw_cfg was added because the old
way was to load kernel & initrd into RAM directly, but this didn't
work because SeaBIOS would clear the RAM, clobbering kernel & initrd.
Could we change to loading these directly into RAM, and instead
provide some indication to SeaBIOS so it doesn't clobber the RAM?  I'm
quite prepared to do the work, just wondering if there's something
else I'm not getting about this.

Rich.

[1] Several seconds of wallclock time, and according to gprof, the
function 'fw_cfg_io_readb' accounts for > 50% of the time taken in
qemu between qemu starting and us entering the Linux kernel.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming blog: http://rwmj.wordpress.com
Fedora now supports 80 OCaml packages (the OPEN alternative to F#)
http://cocan.org/getting_started_with_ocaml_on_red_hat_and_fedora



reply via email to

[Prev in Thread] Current Thread [Next in Thread]