[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
[Qemu-devel] [PATCH 19/40] dma: eliminate old-style IOMMU support, Paolo Bonzini, 2013/05/07
[Qemu-devel] [PATCH 21/40] spapr_vio: take care of creating our own AddressSpace/DMAContext, Paolo Bonzini, 2013/05/07
[Qemu-devel] [PATCH 26/40] memory: add ref/unref calls, Paolo Bonzini, 2013/05/07
[Qemu-devel] [PATCH 28/40] sysbus: set owner for MMIO regions, Paolo Bonzini, 2013/05/07
[Qemu-devel] [PATCH 27/40] pci: set owner for BARs, Paolo Bonzini, 2013/05/07
[Qemu-devel] [PATCH 29/40] acpi: add memory_region_set_owner calls, Paolo Bonzini, 2013/05/07
[Qemu-devel] [PATCH 16/40] spapr: convert TCE API to use an opaque type, Paolo Bonzini, 2013/05/07
[Qemu-devel] [PATCH 25/40] memory: add ref/unref, Paolo Bonzini, 2013/05/07
[Qemu-devel] [PATCH 23/40] memory: give name to every AddressSpace, Paolo Bonzini, 2013/05/07
[Qemu-devel] [PATCH 04/40] memory: Rename readable flag to romd_mode, Paolo Bonzini, 2013/05/07