qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 19/40] dma: eliminate old-style IOMMU support


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH 19/40] dma: eliminate old-style IOMMU support
Date: Tue, 7 May 2013 19:20:58 +0100

On 7 May 2013 15:16, Paolo Bonzini <address@hidden> 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?

thanks
-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]