From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40402) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1allKP-0005bt-Qy for qemu-devel@nongnu.org; Thu, 31 Mar 2016 18:44:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1allKM-0005i2-IY for qemu-devel@nongnu.org; Thu, 31 Mar 2016 18:44:37 -0400 Received: from mail-qg0-x234.google.com ([2607:f8b0:400d:c04::234]:34663) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1allKM-0005hy-DM for qemu-devel@nongnu.org; Thu, 31 Mar 2016 18:44:34 -0400 Received: by mail-qg0-x234.google.com with SMTP id n34so72268656qge.1 for ; Thu, 31 Mar 2016 15:44:34 -0700 (PDT) Date: Thu, 31 Mar 2016 18:44:32 -0400 From: Kevin O'Connor Message-ID: <20160331224432.GA4583@morn.lan> References: <20160319203124.GB19398@redhat.com> <20160331092125.GH32185@stefanha-x1.localdomain> <20160331162222.GA17533@morn.lan> <20160331221039.GA32728@redhat.com> <20160331221730.GA5637@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160331221730.GA5637@redhat.com> Subject: Re: [Qemu-devel] Why is SeaBIOS used with -kernel? List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Richard W.M. Jones" Cc: marc.mari.barcelo@gmail.com, Stefan Hajnoczi , qemu-devel@nongnu.org On Thu, Mar 31, 2016 at 11:17:30PM +0100, Richard W.M. Jones wrote: > On Thu, Mar 31, 2016 at 12:22:23PM -0400, Kevin O'Connor wrote: > > On Thu, Mar 31, 2016 at 10:21:25AM +0100, Stefan Hajnoczi wrote: > > > On Sat, Mar 19, 2016 at 08:31:24PM +0000, Richard W.M. Jones wrote: > > > > Is there something I'm missing, or for Linux + -kernel could we use a > > > > much simpler BIOS? > > > > > > The data that Marc Mari collected when comparing qboot with an optimized > > > SeaBIOS/QEMU showed that there's no need for a separate "lightweight > > > firmware" codebase. > > [http://www.seabios.org/pipermail/seabios/2015-July/009554.html] > > The problem is that now we've solved the fw_cfg problem, SeaBIOS is > again a bottleneck (but one of several, and not the biggest). > > > > https://github.com/bonzini/qboot > > I'm actually comparing this to the extremely minimal BIOS used by > kvmtool (and hence by Intel Clear Containers). That "BIOS" (it's > hardly fair to call it that) contains only a the bare minimum calls > necessary to service the Linux startup code. In this scenario Linux > is memcpy'd into the guest memory and jumped to directly, so there is > no separate BIOS loading step at all. The BIOS is only needed because > Linux startup issues BIOS calls eg to get the e820 memory map and do > some VGA mode manipulation. I think you'll find that if you compile out some features from SeaBIOS, it will be of a similar speed to that "minimal BIOS". Try this: cd /path/to/seabios/ echo -e 'CONFIG_USB=n\nCONFIG_DRIVES=n\nCONFIG_KEYBOARD=n\nCONFIG_MOUSE=n\nCONFIG_WRITABLE_UPPERMEMORY=y\nCONFIG_TCGBIOS=n\nCONFIG_PIRTABLE=n\nCONFIG_MPTABLE=n\nCONFIG_SMBIOS=n\nCONFIG_ACPI=n\nCONFIG_DEBUG_LEVEL=0' > .config make olddefconfig make What time do you get with the above stripped down seabios (the generated bios is in out/bios.bin)? [...] > I'd dearly love to get rid of the sgabios option ROM. It looks like > SeaBIOS nearly supports a full serial console now? Last I checked, one could disable the option rom by adding "-device VGA,romfile=" to the qemu command line. -Kevin