Received: from eggs.gnu.org ([140.186.70.92]:58402) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RDdQB-0007rO-38 for qemu-devel@nongnu.org; Tue, 11 Oct 2011 10:35:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RDdQ1-0008AS-Ex for qemu-devel@nongnu.org; Tue, 11 Oct 2011 10:35:07 -0400 Received: from cantor2.suse.de ([195.135.220.15]:48215 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RDdQ1-0008AM-7B for qemu-devel@nongnu.org; Tue, 11 Oct 2011 10:34:57 -0400 Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Alexander Graf In-Reply-To: <4E9453CD.50608@codemonkey.ws> Date: Tue, 11 Oct 2011 16:34:55 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: References: <4E933F2D.7090703@codemonkey.ws> <20111011082315.GI14627@redhat.com> <4E940919.7010901@redhat.com> <5C80782F-C30A-4F35-93FD-0397A1040AFF@suse.de> <4E940BB6.2000400@redhat.com> <050FFBD4-BF45-4425-865B-24E7C228B592@suse.de> <4E9440B6.3060201@codemonkey.ws> <2DB3FD25-4BF7-4F82-9A62-49A6891316B3@suse.de> <4E944252.7020508@codemonkey.ws> <20111011140150.GD4485@redhat.com> <4E9453CD.50608@codemonkey.ws> Subject: Re: [Qemu-devel] Slow kernel/initrd loading via fw_cfg; Was Re: Hack integrating SeaBios / LinuxBoot option rom with QEMU trace backends List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: qemu-devel , Avi Kivity , Gleb Natapov , "Richard W.M. Jones" On 11.10.2011, at 16:33, Anthony Liguori wrote: > On 10/11/2011 09:01 AM, Daniel P. Berrange wrote: >> On Tue, Oct 11, 2011 at 08:19:14AM -0500, Anthony Liguori wrote: >>> On 10/11/2011 08:14 AM, Alexander Graf wrote: >>>>>>>> And I don't see the point why we would have to shoot yet = another hole into the guest just because we're too unwilling to make an = interface that's perfectly valid horribly slow. >>>>>>>=20 >>>>>>> rep/ins is exactly like dma+wait for this use case: provide an = address, get a memory image in return. There's no need to add another = interface, we should just optimize the existing one. >>>>>>=20 >>>>>> Whatever we do, the interface will never be as fast as DMA. We = will always have to do sanity / permission checks for every IO = operation, can batch up only so many IO requests and in QEMU again have = to call our callbacks in a loop. >>>>>=20 >>>>> rep/ins is effectively equivalent to DMA except in how it's = handled within QEMU. >>>>=20 >>>> No, DMA has a lot bigger granularities in kvm/user interaction. We = can easily DMA a 50MB region with a single kvm/user exit. For PIO we can = at most do page granularity. >>>=20 >>> So make a proper PCI device for kernel loading. It's a much more >>> natural approach and let's use alias -kernel/-initrd/-append to >>> -device kernel-pci,kernel=3DPATH,initrd=3DPATH >>=20 >> Adding a PCI device doesn't sound very appealing, unless you >> can guarentee it is never visible to the guest once LinuxBoot >> has finished its dirty work, >=20 > It'll definitely be guest visible just like fwcfg is guest visible. Yup, just that this time it eats up one of our previous PCI slots ;) So far it's the best proposal I've heard though. Alex