From patchwork Fri Apr 1 11:49:47 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Richard W.M. Jones" X-Patchwork-Id: 8723301 Return-Path: X-Original-To: patchwork-qemu-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id DDD44C0553 for ; Fri, 1 Apr 2016 11:50:04 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E779F203B6 for ; Fri, 1 Apr 2016 11:50:03 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DA2E8203B8 for ; Fri, 1 Apr 2016 11:50:02 +0000 (UTC) Received: from localhost ([::1]:43724 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1alxaT-0000Mk-EM for patchwork-qemu-devel@patchwork.kernel.org; Fri, 01 Apr 2016 07:50:01 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39066) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1alxaL-0000Mc-KO for qemu-devel@nongnu.org; Fri, 01 Apr 2016 07:49:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1alxaI-0008R2-CR for qemu-devel@nongnu.org; Fri, 01 Apr 2016 07:49:53 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41136) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1alxaI-0008Qu-42 for qemu-devel@nongnu.org; Fri, 01 Apr 2016 07:49:50 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 46FDE7F09A; Fri, 1 Apr 2016 11:49:49 +0000 (UTC) Received: from localhost (ovpn-204-90.brq.redhat.com [10.40.204.90]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u31Bnlnv014584; Fri, 1 Apr 2016 07:49:48 -0400 Date: Fri, 1 Apr 2016 12:49:47 +0100 From: "Richard W.M. Jones" To: Gerd Hoffmann Message-ID: <20160401114947.GM32728@redhat.com> References: <20160401080222.GC32728@redhat.com> <56FE2D42.5020607@redhat.com> <20160401081417.GD32728@redhat.com> <56FE3045.2030003@redhat.com> <20160401084456.GF32728@redhat.com> <1459502310.7011.37.camel@redhat.com> <20160401101733.GI32728@redhat.com> <1459508875.7011.62.camel@redhat.com> <20160401111139.GK32728@redhat.com> <1459510371.7011.63.camel@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1459510371.7011.63.camel@redhat.com> User-Agent: Mutt/1.5.20 (2009-12-10) X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: marc.mari.barcelo@gmail.com, Paolo Bonzini , Kevin O'Connor , qemu-devel@nongnu.org, Stefan Hajnoczi Subject: Re: [Qemu-devel] Why is SeaBIOS used with -kernel? X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Fri, Apr 01, 2016 at 01:32:51PM +0200, Gerd Hoffmann wrote: > Hi, > > > I think we were working on the same thing ... Attached is my > > version. > > > > Note that you must enable at least CONFIG_MPTABLE else virtio-scsi > > does not work in the guest. I also enabled ACPI & SMBIOS & PIRTABLE. > > They are enabled by default, no need to explicitly say so ;) So they are. Here's a v3 patch. I also retested everything from scratch. Previously I was testing the stock SeaBIOS bios.bin shipped with qemu vs the fast config. However that has the possible problem that I was testing two slightly different versions of SeaBIOS (whatever version qemu ships vs upstream). Testing from scratch, using upstream SeaBIOS in both cases, there's still a significant benefit. SeaBIOS overhead goes from 63 ms down to 19 ms (saving 44 ms). Overall the proportion of boot time of the libguestfs appliance attributed to SeaBIOS drops from 3.7% to 1.1% (but note this is with libguestfs & kernel debugging enabled -- for real users there'd be a much larger percentage drop). Rich. diff --git a/Makefile b/Makefile index 1d076a9..c4e939d 100644 --- a/Makefile +++ b/Makefile @@ -389,7 +389,8 @@ common de-ch es fo fr-ca hu ja mk nl-be pt sl tr \ bepo cz ifdef INSTALL_BLOBS -BLOBS=bios.bin bios-256k.bin sgabios.bin vgabios.bin vgabios-cirrus.bin \ +BLOBS=bios.bin bios-256k.bin bios-fast.bin \ +sgabios.bin vgabios.bin vgabios-cirrus.bin \ vgabios-stdvga.bin vgabios-vmware.bin vgabios-qxl.bin vgabios-virtio.bin \ acpi-dsdt.aml \ ppc_rom.bin openbios-sparc32 openbios-sparc64 openbios-ppc QEMU,tcx.bin QEMU,cgthree.bin \ diff --git a/roms/Makefile b/roms/Makefile index 7bd1252..26b0586 100644 --- a/roms/Makefile +++ b/roms/Makefile @@ -61,9 +61,11 @@ default: @echo " slof -- update slof.bin" @echo " u-boot.e500 -- update u-boot.e500" -bios: build-seabios-config-seabios-128k build-seabios-config-seabios-256k +bios: build-seabios-config-seabios-128k build-seabios-config-seabios-256k \ + build-seabios-config-seabios-fast cp seabios/builds/seabios-128k/bios.bin ../pc-bios/bios.bin cp seabios/builds/seabios-256k/bios.bin ../pc-bios/bios-256k.bin + cp seabios/builds/seabios-fast/bios.bin ../pc-bios/bios-fast.bin seavgabios: $(patsubst %,seavgabios-%,$(vgabios_variants)) diff --git a/roms/config.seabios-fast b/roms/config.seabios-fast new file mode 100644 index 0000000..f035b49 --- /dev/null +++ b/roms/config.seabios-fast @@ -0,0 +1,25 @@ +# The fastest SeaBIOS that can boot Linux using -kernel. + +# general stuff +CONFIG_QEMU=y +CONFIG_ROM_SIZE=128 +CONFIG_XEN=n +CONFIG_THREADS=n +CONFIG_WRITABLE_UPPERMEMORY=y + +# no input, no boot menu +CONFIG_MOUSE=n +CONFIG_KEYBOARD=n +CONFIG_BOOTMENU=n +CONFIG_BOOTSPLASH=n + +# hardware support we don't need +CONFIG_LPT=n +CONFIG_SERIAL=n +CONFIG_USB=n +CONFIG_DRIVES=n +CONFIG_TCGBIOS=n +CONFIG_VGAHOOKS=n + +# no logging +CONFIG_DEBUG_LEVEL=0