From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:45789) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TRY9i-0001Qn-QY for qemu-devel@nongnu.org; Thu, 25 Oct 2012 20:52:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TRY9f-0005Gf-VS for qemu-devel@nongnu.org; Thu, 25 Oct 2012 20:52:10 -0400 Received: from ozlabs.org ([203.10.76.45]:60292) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TRY9f-0005Fy-KW for qemu-devel@nongnu.org; Thu, 25 Oct 2012 20:52:07 -0400 Date: Fri, 26 Oct 2012 11:48:32 +1100 From: David Gibson Message-ID: <20121026004832.GG7222@truffula.fritz.box> References: <1351013211-1907-1-git-send-email-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] [PATCH] dma: Define dma_context_memory and use in sysbus-ohci List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Crosthwaite Cc: Peter Maydell , Avi Kivity , patches@linaro.org, Gerd Hoffmann , qemu-devel@nongnu.org On Thu, Oct 25, 2012 at 08:33:13PM +1000, Peter Crosthwaite wrote: > On Oct 24, 2012 3:27 AM, "Peter Maydell" wrote: > > > > Define a new global dma_context_memory which is a DMAContext corresponding > > to the global address_space_memory AddressSpace. This can be used by > > sysbus peripherals like sysbus-ohci which need to do DMA. > > > > In particular, use it in the sysbus-ohci device, which fixes a > > segfault when attempting to use that device. > > > > Signed-off-by: Peter Maydell > Reviewed-by: Peter Crosthwaite Hrm. So, as I originally conceived DMAContext, a NULL context pointer means "no translation" which is to say that DMA addresses are the same as memory space addresses. Which would mean a context explicitly for this purpose should not be necessary. Has this assumption changed with the newer memory region integrated dma context stuff? -- 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