From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:33639) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TwF8R-0003Lj-1H for qemu-devel@nongnu.org; Fri, 18 Jan 2013 11:49:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TwF8P-0001xO-Sj for qemu-devel@nongnu.org; Fri, 18 Jan 2013 11:49:42 -0500 Received: from mx1.redhat.com ([209.132.183.28]:46337) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TwF8P-0001xI-Kv for qemu-devel@nongnu.org; Fri, 18 Jan 2013 11:49:41 -0500 Message-ID: <50F97D1C.70003@redhat.com> Date: Fri, 18 Jan 2013 17:49:32 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <20130118160448.GA76938@onelab2.iet.unipi.it> <50F974CA.8010603@redhat.com> <20130118163329.GB76938@onelab2.iet.unipi.it> In-Reply-To: <20130118163329.GB76938@onelab2.iet.unipi.it> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] bypassing pci_dma_read() and pci_dma_write() ? List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Luigi Rizzo Cc: Giuseppe Lettieri , qemu-devel@nongnu.org, v.maffione@gmail.com Il 18/01/2013 17:33, Luigi Rizzo ha scritto: >> > First, host memory mappings could change (though they rarely do on PC). >> > The result of address_space_map is not guaranteed to be stable. To >> > avoid problems with this, however, you could use something like >> > hw/dataplane/hostmem.c and even avoid address_space_map altogether. > I'll look into that. Hopefully there is something that i can > use as a notification that the mapping has changed... Yes, that's the MemoryListener interface that hw/dataplane/hostmem.c uses. >> > Second, that pci_dma_*() could have the addresses translated by an >> > IOMMU. virtio is documented to have "real" physical memory addresses, >> > but this does not apply to other devices. > I see. I suppose the ability to have an iommu depends on the > specific NIC ? I am only planning to use the above shortcut for > e1000. It depends on the bus, in this case PCI. Paolo