From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NKfD3-0002qE-5S for qemu-devel@nongnu.org; Tue, 15 Dec 2009 16:45:33 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NKfCy-0002n8-MH for qemu-devel@nongnu.org; Tue, 15 Dec 2009 16:45:32 -0500 Received: from [199.232.76.173] (port=34805 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NKfCy-0002n5-DW for qemu-devel@nongnu.org; Tue, 15 Dec 2009 16:45:28 -0500 Received: from mail-yw0-f171.google.com ([209.85.211.171]:38938) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NKfCy-0004aD-7X for qemu-devel@nongnu.org; Tue, 15 Dec 2009 16:45:28 -0500 Received: by ywh1 with SMTP id 1so340285ywh.18 for ; Tue, 15 Dec 2009 13:45:27 -0800 (PST) Message-ID: <4B280374.5010604@codemonkey.ws> Date: Tue, 15 Dec 2009 15:45:24 -0600 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: Proper support for PCI-based option rom loading (was Re: [Qemu-devel] Re: qdev property bug?) References: <4B269933.3010906@codemonkey.ws> <20091214202019.GF6150@redhat.com> <4B26A0DE.5000304@redhat.com> <20091214203428.GI6150@redhat.com> <20091214203603.GJ6150@redhat.com> <4B26A3B2.2030006@codemonkey.ws> <20091214205141.GC6398@redhat.com> <4B26F678.4010603@codemonkey.ws> <4B27541F.9020603@redhat.com> <4B27E1C2.5090506@codemonkey.ws> <20091215211900.GG26712@redhat.com> In-Reply-To: <20091215211900.GG26712@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: glommer@redhat.com, qemu-devel@nongnu.org, Alexander Graf , Kevin O'Connor , Gerd Hoffmann , Sebastian Herbszt Michael S. Tsirkin wrote: > On Tue, Dec 15, 2009 at 01:21:38PM -0600, Anthony Liguori wrote: > >> Gerd Hoffmann wrote: >> >>> On 12/15/09 03:37, Anthony Liguori wrote: >>> >>>> Okay, I think I've figured out how this is supposed to work. With these >>>> two patches to SeaBIOS and the patch to qemu, I can run: >>>> >>>> qemu -net nic,model=rtl8139 -net nic,model=virtio -net nic,model=e1000 >>>> -boot menu=on >>>> >>>> And all three option roms load. I can also select which NIC I want to >>>> boot from using the F12 menu. This works by not actually loading the >>>> option roms in the 1M space, but instead making them mappable through >>>> the PCI devices. With PMM and DDIM, the result is that we only have to >>>> copy in 2K for each option rom which means we can support up to 48 >>>> unique option roms. That should be plenty for now. >>>> >>>> These patches are very rough but I'll clean them up tomorrow. I'm not >>>> sure the best way to integrate with the rom infrastructure since we no >>>> longer have a physical address to map to. Any suggestions Gerd? >>>> >>> Is this needed in the first place? >>> >> Only if we care about 'info roms' working. Problem is roms is very >> centric now to roms at a static guest physical location. In this case, >> the rom lives in hardware and is mapped into physical memory based on >> what the guest does. >> >> Regards, >> >> Anthony Liguori >> > > > I also think it is very important to have roms sent during > migration, otherwise things break if we migrate in the middle > of accessing roms. > Heh, this is going to be really broken with my patches :-) We're during qemu_ram_alloc() and we currently don't have a means to associate ram with anything meaningful. This means that if you hot plug on two ends in different orders (even with fixed slots), the returned qemu_ram_alloc() pointers will be different for the same device. This means when you did the live migration of the rom contents, you'd get the wrong roms in the wrong places. I think we need to improve how we do qemu_ram_alloc() such that we can associate some meaningful context with each allocated chunk that we can migrate with the chunk of ram. Regards, Anthony Liguori