From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:50857) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UbtMm-0002B0-Rx for qemu-devel@nongnu.org; Mon, 13 May 2013 10:04:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UbtMk-00074P-Vl for qemu-devel@nongnu.org; Mon, 13 May 2013 10:04:40 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43659) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UbtMk-000749-M7 for qemu-devel@nongnu.org; Mon, 13 May 2013 10:04:38 -0400 Message-ID: <5190F2ED.7040600@redhat.com> Date: Mon, 13 May 2013 16:04:29 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1367936238-12196-1-git-send-email-pbonzini@redhat.com> <1367936238-12196-20-git-send-email-pbonzini@redhat.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 19/40] dma: eliminate old-style IOMMU support List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: aik@ozlabs.ru, jan.kiszka@siemens.com, qemu-devel@nongnu.org, qemulist@gmail.com, stefanha@redhat.com, david@gibson.dropbear.id.au Il 07/05/2013 20:20, Peter Maydell ha scritto: > On 7 May 2013 15:16, Paolo Bonzini wrote: >> The translate function in the DMAContext is now always NULL. >> Remove every reference to it. > >> --- a/include/sysemu/dma.h >> +++ b/include/sysemu/dma.h > >> -static inline int dma_memory_rw_relaxed(DMAContext *dma, dma_addr_t addr, >> - void *buf, dma_addr_t len, >> - DMADirection dir) >> +static inline void dma_memory_rw_relaxed(DMAContext *dma, dma_addr_t addr, >> + void *buf, dma_addr_t len, >> + DMADirection dir) >> { >> - if (!dma_has_iommu(dma)) { >> - /* Fast-path for no IOMMU */ >> - address_space_rw(dma->as, addr, buf, len, dir == DMA_DIRECTION_FROM_DEVICE); >> - return 0; >> - } else { >> - return iommu_dma_memory_rw(dma, addr, buf, len, dir); >> - } >> + address_space_rw(dma->as, addr, buf, len, dir == DMA_DIRECTION_FROM_DEVICE); >> } > > Should we really be removing the success-or-failure indication > from the read/write functions? For now yes. In the future I want to add it back to address_space_rw. Paolo