mbox series

[RESEND,v3,00/10] hw: Let DMA/PCI API propagate MemTxResult

Message ID 20201023151923.3243652-1-philmd@redhat.com
Headers show
Series hw: Let DMA/PCI API propagate MemTxResult | expand

Message

Philippe Mathieu-Daudé Oct. 23, 2020, 3:19 p.m. UTC
Currently the MemTxResult return value is not propagated,
so lost. The motivation behind this series is to make the
API more robust to enforce correct use by the consumers.

All series reviewed.

Since v2:
- Rebased
- Removed patches adding MemTxAttrs argument to DMA/PCI API
  (we will discuss them later).

v2:
https://www.mail-archive.com/qemu-devel@nongnu.org/msg746761.html

The DMA API propagates MemTxResult:
- MEMTX_OK,
- MEMTX_device_ERROR,
- MEMTX_DECODE_ERROR.

Let the PCI DMA API propagate them, as they are
clearer than an undocumented 'int'.

Supersedes: <20201001172519.1620782-1-philmd@redhat.com>

Klaus Jensen (1):
  pci: pass along the return value of dma_memory_rw

Philippe Mathieu-Daudé (9):
  docs/devel/loads-stores: Add regexp for DMA functions
  dma: Document address_space_map/address_space_unmap() prototypes
  dma: Let dma_memory_set() propagate MemTxResult
  dma: Let dma_memory_rw() propagate MemTxResult
  dma: Let dma_memory_read() propagate MemTxResult
  dma: Let dma_memory_write() propagate MemTxResult
  pci: Let pci_dma_rw() propagate MemTxResult
  pci: Let pci_dma_read() propagate MemTxResult
  pci: Let pci_dma_write() propagate MemTxResult

 docs/devel/loads-stores.rst |   2 +
 include/hw/pci/pci.h        |  53 +++++++++++++---
 include/sysemu/dma.h        | 117 ++++++++++++++++++++++++++++++------
 softmmu/dma-helpers.c       |   7 ++-
 4 files changed, 150 insertions(+), 29 deletions(-)

-- 
2.26.2

Comments

Philippe Mathieu-Daudé Oct. 23, 2020, 3:20 p.m. UTC | #1
On 10/23/20 5:19 PM, Philippe Mathieu-Daudé wrote:
> Currently the MemTxResult return value is not propagated,

> so lost. The motivation behind this series is to make the

> API more robust to enforce correct use by the consumers.

> 

> All series reviewed.

> 

> Since v2:

> - Rebased

> - Removed patches adding MemTxAttrs argument to DMA/PCI API

>    (we will discuss them later).


Sorry this is not a RESEND, this is first post of v3,
I forgot to use '--clear-subject-prefix' and git-publish
reused the same prefix from v2.