From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=55293 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ObLHY-00028H-T7 for qemu-devel@nongnu.org; Tue, 20 Jul 2010 18:27:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1ObLDG-0006h7-Il for qemu-devel@nongnu.org; Tue, 20 Jul 2010 18:23:00 -0400 Received: from mail-qy0-f173.google.com ([209.85.216.173]:33775) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ObLDG-0006h3-EA for qemu-devel@nongnu.org; Tue, 20 Jul 2010 18:22:58 -0400 Received: by qyk7 with SMTP id 7so2419988qyk.4 for ; Tue, 20 Jul 2010 15:22:58 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <20100717095059.GA19767@amd.home.annexia.org> References: <20100717095059.GA19767@amd.home.annexia.org> From: Blue Swirl Date: Tue, 20 Jul 2010 22:22:22 +0000 Message-ID: Subject: Re: [Qemu-devel] Question about qemu firmware configuration (fw_cfg) device Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Richard W.M. Jones" Cc: qemu-devel@nongnu.org, Gleb Natapov , agraf@suse.de On Sat, Jul 17, 2010 at 9:50 AM, Richard W.M. Jones wro= te: > 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: > > =C2=A0rep 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? =C2=A0Does 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? =C2=A0I= 'm > quite prepared to do the work, just wondering if there's something > else I'm not getting about this. The entire discussion after this very first message seems to focus on the DMA method. But is it so hard to fix SeaBIOS from clobbering RAM? > > 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/~rj= ones > 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 > >