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: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH 19/40] dma: eliminate old-style IOMMU support
Date: Mon, 13 May 2013 16:04:29 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130311 Thunderbird/17.0.4

Il 07/05/2013 20:20, Peter Maydell ha scritto:
> 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?

For now yes.  In the future I want to add it back to address_space_rw.

Paolo



reply via email to

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