From patchwork Fri Dec 18 17:12:06 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony Liguori X-Patchwork-Id: 41421 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 424601007D4 for ; Sat, 19 Dec 2009 04:43:21 +1100 (EST) Received: from localhost ([127.0.0.1]:44935 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NLgrG-00073n-0g for incoming@patchwork.ozlabs.org; Fri, 18 Dec 2009 12:43:18 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NLgND-0002y0-0G for qemu-devel@nongnu.org; Fri, 18 Dec 2009 12:12:15 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NLgN8-0002vd-6d for qemu-devel@nongnu.org; Fri, 18 Dec 2009 12:12:14 -0500 Received: from [199.232.76.173] (port=53291 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NLgN7-0002vP-NB for qemu-devel@nongnu.org; Fri, 18 Dec 2009 12:12:09 -0500 Received: from mail-gx0-f223.google.com ([209.85.217.223]:63092) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NLgN7-0000MJ-Ei for qemu-devel@nongnu.org; Fri, 18 Dec 2009 12:12:09 -0500 Received: by gxk23 with SMTP id 23so3454132gxk.2 for ; Fri, 18 Dec 2009 09:12:08 -0800 (PST) Received: by 10.150.234.4 with SMTP id g4mr6554743ybh.238.1261156328703; Fri, 18 Dec 2009 09:12:08 -0800 (PST) Received: from squirrel.codemonkey.ws ([24.174.33.212]) by mx.google.com with ESMTPS id 22sm2308235iwn.4.2009.12.18.09.12.07 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 18 Dec 2009 09:12:07 -0800 (PST) Message-ID: <4B2BB7E6.9040705@codemonkey.ws> Date: Fri, 18 Dec 2009 11:12:06 -0600 From: Anthony Liguori User-Agent: Thunderbird 2.0.0.23 (X11/20090825) MIME-Version: 1.0 To: Gerd Hoffmann References: <1261134074-11795-1-git-send-email-kraxel@redhat.com> <4B2B9340.1020001@codemonkey.ws> <4B2BAF25.2070800@redhat.com> <4B2BB0E8.7060907@codemonkey.ws> <4B2BB5E0.9010701@redhat.com> In-Reply-To: <4B2BB5E0.9010701@redhat.com> X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Cc: qemu-devel@nongnu.org Subject: [Qemu-devel] Re: [SeaBIOS] [PATCH 0/8] option rom loading overhaul. X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Gerd Hoffmann wrote: > On 12/18/09 17:42, Anthony Liguori wrote: >>> Do we need to do something for -M pc-0.11? Like loading the pci roms >>> via fw_cfg too so the guest doesn't see the new pci rom bar? >> >> Yes, we do. We can fix that problem as a stable-0.12 update though. >> Right now, migration with pc-0.11 is broken in other areas too. > > Ok. When it is fine to defer this to stable-0.12 then I have no > objections to merge it for 0.12 (assuming the seabios folks ack+merge > the seabios changes). Note, I also needed this to quiet things a bit. return 1; > Note that I'll be offline for x-mas and newyear starting tomorrow, so > I will not be able to work on that until January. No problem. >> It's really unclear to me the best way to handle live migration. The >> rom_offset is not enough because unfortunately it's not stable after >> invocations of qemu. I think we're going to have to actually save the >> some contents with the PCIDevices. > > With hotplug this will become a issue indeed. Yup. > Lets see how this works out in practice ... BTW, the following works: sudo x86_64-softmmu/qemu-system-x86_64 -hda ~/images/linux.img -snapshot -m 512 -net nic,model=rtl8139,macaddr=56:54:32:12:34:56 -net nic,model=e1000,macaddr=56:54:32:12:34:57 -net nic,model=virtio,macaddr=56:54:32:12:34:58 -boot menu=on -net tap -kernel /boot/vmlinuz-2.6.27.38-170.2.113.fc10.x86_64 -initrd /boot/initrd-2.6.27.38-170.2.113.fc10.x86_64.img -append "ro" Using the F12 menu, I can select any of the three option roms and it network boots or I can select 'Legacy Option ROM' and it will boot from -kernel. That is exceedingly cool :-) We just need to give it a proper PnP header and advertise it as a BEV device so that we can give it a meaningful name. Regards, Anthony Liguori diff --git a/hw/fw_cfg.c b/hw/fw_cfg.c index 0492f5f..fe9c527 100644 --- a/hw/fw_cfg.c +++ b/hw/fw_cfg.c @@ -309,8 +309,8 @@ int fw_cfg_add_file(FWCfgState *s, const char *dir, const c } s->files->f[index].size = cpu_to_be32(len); s->files->f[index].select = cpu_to_be16(FW_CFG_FILE_FIRST + index); - fprintf(stderr, "%s: #%d: %s (%d bytes)\n", __FUNCTION__, - index, s->files->f[index].name, len); + FW_CFG_DPRINTF("%s: #%d: %s (%d bytes)\n", __FUNCTION__, + index, s->files->f[index].name, len); s->files->count = cpu_to_be32(index+1);