From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:33734) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S5yGK-0005Fs-CU for qemu-devel@nongnu.org; Fri, 09 Mar 2012 06:45:33 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S5yGF-0005zk-37 for qemu-devel@nongnu.org; Fri, 09 Mar 2012 06:45:31 -0500 Received: from ozlabs.org ([203.10.76.45]:42703) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S5yGE-0005zI-OC for qemu-devel@nongnu.org; Fri, 09 Mar 2012 06:45:27 -0500 Date: Fri, 9 Mar 2012 21:58:47 +1100 From: David Gibson Message-ID: <20120309105847.GA24916@truffala.fritz.box> References: <1331269308-22372-1-git-send-email-david@gibson.dropbear.id.au> <1331269308-22372-14-git-send-email-david@gibson.dropbear.id.au> <4F59DA3E.4010902@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4F59DA3E.4010902@redhat.com> Subject: Re: [Qemu-devel] [PATCH 13/13] pseries: Implement IOMMU and DMA for PAPR PCI devices List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: agraf@suse.de, mst@redhat.com, eduard.munteanu@linux360.ro, qemu-devel@nongnu.org, rth@twiddle.net On Fri, Mar 09, 2012 at 11:23:58AM +0100, Paolo Bonzini wrote: > Il 09/03/2012 06:01, David Gibson ha scritto: > > Currently the pseries machine emulation does not support DMA for emulated > > PCI devices, because the PAPR spec always requires a (guest visible, > > paravirtualized) IOMMU which was not implemented. Now that we have > > infrastructure for IOMMU emulation, we can correct this and allow PCI DMA > > for pseries. > > > > With the existing PAPR IOMMU code used for VIO devices, this is almost > > trivial. We use a single DMAContext for each (virtual) PCI host bridge, > > which is the usual configuration on real PAPR machines (which often have > > _many_ PCI host bridges). > > What about virtio? virtio doesn't use virtualized PCI DMA, it uses direct hypervisor access to guest memory, by guest physical address. It *shouldn't*, but it does - that's the way it's specced and that's the way the guest kernel expects it to be. It could be fixed with a new feature bit, but that's a project for another day. -- David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson