Skip to content

hw/dma: Introduce dma_size_t type definition

Philippe Mathieu-Daudé qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest8 patches 6 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8hw/nvram: Restrict stub to sysemu and toolshw/nvram/meson.build stubs/meson.build+5 -30 replies
2/8hw/pci: Restrict pci-bus stub to sysemustubs/meson.build+1 -10 replies
3/8hw/pci: Document pci_dma_map()include/hw/pci/pci.h+12 -02 replies
4/8hw/dma: Remove CONFIG_USER_ONLY checkinclude/sysemu/dma.h+0 -30 replies
5/8hw/rdma/rdma_utils: Rename rdma_pci_dma_map 'len' argumenthw/rdma/rdma_utils.c hw/rdma/rdma_utils.h+8 -81 reply
6/8hw/scsi: Rename SCSIRequest::resid as 'residual'hw/scsi/megasas.c hw/scsi/scsi-bus.c hw/scsi/scsi-disk.c +2 more+47 -390 replies
7/8hw/dma: Introduce dma_size_t type definitionhw/ide/ahci.c hw/nvme/ctrl.c hw/nvram/fw_cfg.c +10 more+55 -532 replies
8/8hw/dma: Let dma_buf_read() / dma_buf_write() propagate MemTxResulthw/ide/ahci.c hw/nvme/ctrl.c hw/scsi/megasas.c +4 more+63 -401 reply

Reviews trailers per patch

2 of 8 patches have a Reviewed-by or Acked-by.

PatchKlaus JensenYuval Shaia
1/8
2/8
3/8
4/8
5/8R-b T-b
6/8
7/8
8/8R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/8] hw/dma: Introduce dma_size_t type definition

Hi,

This series aims to clarify a bit the DMA API, in particular the 'size' argument which is not clear enough (as we use multiple types for it). The clarification is trivial: add a dma_size_t typedef, similar to the dma_addr_t one. This helps avoiding build failures on 32-bit host [*] (and likely overflows calculation too IMO).

Some units using the DMA API are first removed from user-mode emulation to avoid build failure (they shouldn't be there in the first place).

Then some variables are renamed for clarity (no functional change).

Finally the dma_size_t typedef is added, and the previous patch which failed on 32-bit host applied on top (not failing anymore).

Regards,

Phil.

[*] https://www.mail-archive.com/[email protected]/msg858825.html

Philippe Mathieu-Daudé (8):
hw/nvram: Restrict stub to sysemu and tools
hw/pci: Restrict pci-bus stub to sysemu
hw/pci: Document pci_dma_map()
hw/dma: Remove CONFIG_USER_ONLY check hw/rdma/rdma_utils: Rename rdma_pci_dma_map 'len' argument hw/scsi: Rename SCSIRequest::resid as 'residual' hw/dma: Introduce dma_size_t type definition
hw/dma: Let dma_buf_read() / dma_buf_write() propagate MemTxResult

 hw/rdma/rdma_utils.h      |  4 +-
 include/hw/pci/pci.h      | 22 +++++++---
 include/hw/scsi/scsi.h    |  4 +-
 include/sysemu/dma.h      | 59 ++++++++++++++-------------
 hw/ide/ahci.c             | 10 ++---
 hw/nvme/ctrl.c            |  6 +--
 hw/nvram/fw_cfg.c         |  2 +-
 hw/rdma/rdma_utils.c      | 16 ++++----
 hw/rdma/vmw/pvrdma_main.c |  2 +-
 hw/scsi/lsi53c895a.c      |  4 +-
 hw/scsi/megasas.c         | 85 +++++++++++++++++++++++++++------------
 hw/scsi/scsi-bus.c        | 12 +++---
 hw/scsi/scsi-disk.c       |  4 +-
 hw/usb/libhw.c            |  4 +-
 softmmu/dma-helpers.c     | 38 ++++++++---------
 hw/nvram/meson.build      |  6 ++-
 hw/rdma/trace-events      |  2 +-
 stubs/meson.build         |  4 +-
 18 files changed, 164 insertions(+), 120 deletions(-)
Signature · 1 line
2.33.1