From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:56499) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ta87d-0006Uk-C2 for qemu-devel@nongnu.org; Sun, 18 Nov 2012 11:53:32 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ta87a-0000HS-9V for qemu-devel@nongnu.org; Sun, 18 Nov 2012 11:53:29 -0500 Received: from mx1.redhat.com ([209.132.183.28]:36013) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ta87a-0000Ga-06 for qemu-devel@nongnu.org; Sun, 18 Nov 2012 11:53:26 -0500 Message-ID: <50A9127C.7090205@redhat.com> Date: Sun, 18 Nov 2012 18:53:16 +0200 From: Avi Kivity MIME-Version: 1.0 References: <1351013211-1907-1-git-send-email-peter.maydell@linaro.org> <20121026004832.GG7222@truffula.fritz.box> <20121026035812.GK7222@truffula.fritz.box> <508A8B96.60302@redhat.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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 Maydell Cc: Peter Crosthwaite , patches@linaro.org, qemu-devel@nongnu.org, Gerd Hoffmann , Paolo Bonzini , David Gibson On 11/13/2012 01:44 PM, Peter Maydell wrote: > On 26 October 2012 17:00, Peter Maydell wrote: >> On 26 October 2012 14:09, Paolo Bonzini wrote: >>> As soon as Avi's iommu patches go in, in fact, dma->as will just be as. >>> Even if as == NULL were to be outlawed and you'd be forced to write >>> get_address_space_memory(), taking the pain to create dummy DMAContexts >>> now is just not worth it. >> >> Personally I think it's better not to permit NULL DMAContexts or >> AddressSpaces here, because they're kind of a hack (in the same way >> that the "system address space" is kind of a hack). In real hardware >> you probably aren't really doing dma to that address space but to >> some more local bus. dma_context_memory/address_space_memory are >> nice and easy to search for, whereas NULL isn't. [And in general >> I think NULL is too easy to use; if you have to go looking for the >> system dma context you've been prompted to think about whether >> that's the right one...] > > Ping! Can we have a ruling on what the right fix for this is so > we can fix these segfaults before 1.3 release, please? I agree with you here. Callers should be fixed to supply the proper AddressSpace. -- error compiling committee.c: too many arguments to function