mbox series

[v2,00/23] hw: Have DMA APIs take MemTxAttrs arg & propagate MemTxResult (full)

Message ID 20211223115554.3155328-1-philmd@redhat.com (mailing list archive)
Headers show
Series hw: Have DMA APIs take MemTxAttrs arg & propagate MemTxResult (full) | expand

Message

Philippe Mathieu-Daudé Dec. 23, 2021, 11:55 a.m. UTC
Hi Peter and Paolo.

This series contains all the uncontroversary patches from
the "improve DMA situations, avoid re-entrancy issues"
earlier series. The rest will be discussed on top.

The only operations added are:
- take MemTxAttrs argument
- propagate MemTxResult

All patches are reviewed.

If you don't see any objection, I plan to send this via
a pull request by the end of next week.

Regards,

Phil.

Philippe Mathieu-Daudé (23):
  dma: Let dma_memory_valid() take MemTxAttrs argument
  dma: Let dma_memory_set() take MemTxAttrs argument
  dma: Let dma_memory_rw_relaxed() take MemTxAttrs argument
  dma: Let dma_memory_rw() take MemTxAttrs argument
  dma: Let dma_memory_read/write() take MemTxAttrs argument
  dma: Let dma_memory_map() take MemTxAttrs argument
  dma: Have dma_buf_rw() take a void pointer
  dma: Have dma_buf_read() / dma_buf_write() take a void pointer
  dma: Let pci_dma_rw() take MemTxAttrs argument
  dma: Let dma_buf_rw() take MemTxAttrs argument
  dma: Let dma_buf_write() take MemTxAttrs argument
  dma: Let dma_buf_read() take MemTxAttrs argument
  dma: Let dma_buf_rw() propagate MemTxResult
  dma: Let dma_buf_read() / dma_buf_write() propagate MemTxResult
  dma: Let st*_dma() take MemTxAttrs argument
  dma: Let ld*_dma() take MemTxAttrs argument
  dma: Let st*_dma() propagate MemTxResult
  dma: Let ld*_dma() propagate MemTxResult
  hw/scsi/megasas: Use uint32_t for reply queue head/tail values
  pci: Let st*_pci_dma() take MemTxAttrs argument
  pci: Let ld*_pci_dma() take MemTxAttrs argument
  pci: Let st*_pci_dma() propagate MemTxResult
  pci: Let ld*_pci_dma() propagate MemTxResult

 include/hw/pci/pci.h          | 38 +++++++++------
 include/hw/ppc/spapr_vio.h    | 30 ++++++++----
 include/sysemu/dma.h          | 90 +++++++++++++++++++++--------------
 hw/arm/musicpal.c             | 13 ++---
 hw/arm/smmu-common.c          |  3 +-
 hw/arm/smmuv3.c               | 14 ++++--
 hw/audio/intel-hda.c          | 13 +++--
 hw/core/generic-loader.c      |  3 +-
 hw/display/virtio-gpu.c       | 10 ++--
 hw/dma/pl330.c                | 12 +++--
 hw/dma/sparc32_dma.c          | 16 ++++---
 hw/dma/xlnx-zynq-devcfg.c     |  6 ++-
 hw/dma/xlnx_dpdma.c           | 10 ++--
 hw/hyperv/vmbus.c             |  8 ++--
 hw/i386/amd_iommu.c           | 16 ++++---
 hw/i386/intel_iommu.c         | 28 ++++++-----
 hw/ide/ahci.c                 | 18 ++++---
 hw/ide/macio.c                |  2 +-
 hw/intc/pnv_xive.c            |  7 +--
 hw/intc/spapr_xive.c          |  3 +-
 hw/intc/xive.c                |  7 +--
 hw/misc/bcm2835_property.c    |  3 +-
 hw/misc/macio/mac_dbdma.c     | 10 ++--
 hw/net/allwinner-sun8i-emac.c | 18 ++++---
 hw/net/eepro100.c             | 49 +++++++++++--------
 hw/net/ftgmac100.c            | 25 ++++++----
 hw/net/imx_fec.c              | 32 ++++++++-----
 hw/net/npcm7xx_emc.c          | 20 ++++----
 hw/net/tulip.c                | 36 +++++++-------
 hw/nvme/ctrl.c                |  5 +-
 hw/nvram/fw_cfg.c             | 16 ++++---
 hw/pci-host/pnv_phb3.c        |  5 +-
 hw/pci-host/pnv_phb3_msi.c    |  9 ++--
 hw/pci-host/pnv_phb4.c        |  5 +-
 hw/scsi/esp-pci.c             |  2 +-
 hw/scsi/megasas.c             | 86 ++++++++++++++++++++++-----------
 hw/scsi/mptsas.c              | 16 +++++--
 hw/scsi/scsi-bus.c            |  4 +-
 hw/scsi/vmw_pvscsi.c          | 20 +++++---
 hw/sd/allwinner-sdhost.c      | 14 +++---
 hw/sd/sdhci.c                 | 35 +++++++++-----
 hw/usb/hcd-dwc2.c             |  8 ++--
 hw/usb/hcd-ehci.c             |  6 ++-
 hw/usb/hcd-ohci.c             | 28 ++++++-----
 hw/usb/hcd-xhci.c             | 26 ++++++----
 hw/usb/libhw.c                |  3 +-
 hw/virtio/virtio.c            |  6 ++-
 softmmu/dma-helpers.c         | 32 ++++++++-----
 hw/scsi/trace-events          |  8 ++--
 49 files changed, 542 insertions(+), 332 deletions(-)

Comments

Philippe Mathieu-Daudé Dec. 30, 2021, 4:07 p.m. UTC | #1
On 12/23/21 12:55, Philippe Mathieu-Daudé wrote:
> Hi Peter and Paolo.
> 
> This series contains all the uncontroversary patches from
> the "improve DMA situations, avoid re-entrancy issues"
> earlier series. The rest will be discussed on top.
> 
> The only operations added are:
> - take MemTxAttrs argument
> - propagate MemTxResult

Series queued.
Philippe Mathieu-Daudé Dec. 31, 2021, 12:01 a.m. UTC | #2
On 12/30/21 17:07, Philippe Mathieu-Daudé wrote:
> On 12/23/21 12:55, Philippe Mathieu-Daudé wrote:
>> Hi Peter and Paolo.
>>
>> This series contains all the uncontroversary patches from
>> the "improve DMA situations, avoid re-entrancy issues"
>> earlier series. The rest will be discussed on top.
>>
>> The only operations added are:
>> - take MemTxAttrs argument
>> - propagate MemTxResult
> 
> Series queued.

Patch 14 "dma: Let dma_buf_read/dma_buf_write propagate MemTxResult"
fails on 32-bit host (when passing &size_t). Dropped it from the queue.