qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/8] hw/dma: Introduce dma_size_t type definition
@ 2021-12-31 11:48 Philippe Mathieu-Daudé
  2021-12-31 11:48 ` [PATCH 1/8] hw/nvram: Restrict stub to sysemu and tools Philippe Mathieu-Daudé
                   ` (7 more replies)
  0 siblings, 8 replies; 15+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-12-31 11:48 UTC (permalink / raw)
  To: qemu-devel
  Cc: Michael S. Tsirkin, David Hildenbrand, Peter Xu, Gerd Hoffmann,
	Paolo Bonzini, Philippe Mathieu-Daudé

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/qemu-devel@nongnu.org/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(-)

-- 
2.33.1




^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2022-01-18 10:18 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-12-31 11:48 [PATCH 0/8] hw/dma: Introduce dma_size_t type definition Philippe Mathieu-Daudé
2021-12-31 11:48 ` [PATCH 1/8] hw/nvram: Restrict stub to sysemu and tools Philippe Mathieu-Daudé
2021-12-31 11:48 ` [PATCH 2/8] hw/pci: Restrict pci-bus stub to sysemu Philippe Mathieu-Daudé
2021-12-31 11:48 ` [PATCH 3/8] hw/pci: Document pci_dma_map() Philippe Mathieu-Daudé
2022-01-04  7:25   ` Peter Xu
2022-01-04  8:36     ` Philippe Mathieu-Daudé
2021-12-31 11:48 ` [PATCH 4/8] hw/dma: Remove CONFIG_USER_ONLY check Philippe Mathieu-Daudé
2021-12-31 11:48 ` [PATCH 5/8] hw/rdma/rdma_utils: Rename rdma_pci_dma_map 'len' argument Philippe Mathieu-Daudé
2022-01-18 10:13   ` Yuval Shaia
2021-12-31 11:48 ` [PATCH 6/8] hw/scsi: Rename SCSIRequest::resid as 'residual' Philippe Mathieu-Daudé
2021-12-31 11:49 ` [PATCH 7/8] hw/dma: Introduce dma_size_t type definition Philippe Mathieu-Daudé
2022-01-03 10:20   ` David Hildenbrand
2022-01-04  8:50     ` Philippe Mathieu-Daudé
2021-12-31 11:49 ` [PATCH 8/8] hw/dma: Let dma_buf_read() / dma_buf_write() propagate MemTxResult Philippe Mathieu-Daudé
2021-12-31 11:51   ` Philippe Mathieu-Daudé

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).