From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:54862) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QzPEL-0000nb-Ix for qemu-devel@nongnu.org; Fri, 02 Sep 2011 04:36:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QzPEK-0003EB-Du for qemu-devel@nongnu.org; Fri, 02 Sep 2011 04:36:05 -0400 Received: from mx1.redhat.com ([209.132.183.28]:22723) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QzPEK-0003E6-42 for qemu-devel@nongnu.org; Fri, 02 Sep 2011 04:36:04 -0400 Message-ID: <4E60955A.2010404@redhat.com> Date: Fri, 02 Sep 2011 11:35:38 +0300 From: Avi Kivity MIME-Version: 1.0 References: <1314853263-2086-1-git-send-email-david@gibson.dropbear.id.au> <1314853263-2086-2-git-send-email-david@gibson.dropbear.id.au> <4E5FAADF.1040704@us.ibm.com> <4E5FACD6.9000603@redhat.com> <4E5FAD5C.4090208@codemonkey.ws> <4E5FAEC7.1080901@redhat.com> <4E5FB3A6.1050909@codemonkey.ws> In-Reply-To: <4E5FB3A6.1050909@codemonkey.ws> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 01/10] Add stub functions for PCI device models to do PCI DMA List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: Anthony Liguori , joerg.roedel@amd.com, agraf@suse.de, qemu-devel@nongnu.org, eduard.munteanu@linux360.ro, David Gibson , rth@twiddle.net On 09/01/2011 07:32 PM, Anthony Liguori wrote: >> True. But I still think it's the right thing. >> >> We can't really pass a MemoryRegion as the source address, since there >> is no per-device MemoryRegion. > > > Couldn't the PCI bus expose 255 MemoryRegions though? What would those mean? A MemoryRegion is something that can respond to reads and writes. > It could still use the pci_address_space I think since that should > include RAM too, right? > No. > In fact, initially, you could have a > pci_bus_get_device_memory_region(bus, dev) that just returns > pci_address_space(). > > You just need the memory_st[bwl] functions I think. > Maybe we need a different type of object here - MemoryClient or something. -- I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain.