Skip to content

global exec/memory/dma APIs cleanup

Philippe Mathieu-Daudé kvm qemu-arm qemu-devel xen-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v3 Latest19 of 20 patches 15 repliesIn review

19 of 20 patches are in this archive. The cover letter announces 20.

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/20scripts/git.orderfile: Display Cocci scripts before code modificationsscripts/git.orderfile+3 -03 replies
2/20hw: Remove unnecessary cast when calling dma_memory_read()hw/arm/smmu-common.c hw/arm/smmuv3.c hw/sd/sdhci.c +1 more+25 -183 replies
3/20exec: Let qemu_ram_*() functions take a const pointer argumentexec.c hw/i386/xen/xen-mapcache.c include/exec/cpu-common.h +1 more+10 -103 replies
4/20exec: Rename ram_ptr variableexec.c+10 -100 replies
5/20exec: Let flatview API take void pointer argumentsexec.c include/exec/memory.h+9 -70 replies
6/20exec: Let the address_space API use void pointer argumentsexec.c include/exec/memory.h+12 -110 replies
7/20hw/net: Avoid casting non-const pointer, use address_space_write()hw/net/dp8393x.c hw/net/i82596.c scripts/coccinelle/exec_rw_const.cocci+17 -40 replies
8/20Remove unnecessary cast when using the address_space APIhw/arm/boot.c hw/dma/rc4030.c hw/dma/xlnx-zdma.c +9 more+54 -461 reply
9/20exec: Let the cpu_[physical]_memory API use void pointer argumentsexec.c include/exec/cpu-all.h include/exec/cpu-common.h+7 -50 replies
10/20Remove unnecessary cast when using the cpu_[physical]_memory APIhw/display/omap_lcdc.c hw/dma/etraxfs_dma.c hw/scsi/vmw_pvscsi.c +2 more+31 -280 replies
11/20hw/ide/internal: Remove unused DMARestartFunc typedefinclude/hw/ide/internal.h+0 -11 reply
12/20hw/ide: Let the DMAIntFunc prototype use a boolean 'is_write' argumenthw/dma/rc4030.c hw/ide/ahci.c hw/ide/core.c +3 more+8 -81 reply
13/20hw/virtio: Let virtqueue_map_iovec() use a boolean 'is_write' argumenthw/virtio/virtio.c+4 -30 replies
14/20hw/virtio: Let vhost_memory_map() use a boolean 'is_write' argumenthw/virtio/vhost.c+4 -40 replies
15/20exec: Let address_space_unmap() use a boolean 'is_write' argumentexec.c include/exec/memory.h+3 -30 replies
16/20Let address_space_rw() calls pass a boolean 'is_write' argumentexec.c hw/net/dp8393x.c hw/net/i82596.c +4 more+41 -270 replies
17/20Avoid address_space_rw() with a constant is_write argumentaccel/kvm/kvm-all.c dma-helpers.c exec.c +10 more+119 -1070 replies
18/20exec: Let cpu_[physical]_memory API use a boolean 'is_write' argumentexec.c include/exec/cpu-all.h include/exec/cpu-common.h+9 -90 replies
19/20Let cpu_[physical]_memory() calls pass a boolean 'is_write' argumenthw/display/exynos4210_fimd.c hw/display/milkymist-tmu2.c hw/display/omap_dss.c +14 more+43 -263 replies

Reviews trailers per patch

7 of 19 patches have a Reviewed-by or Acked-by.

PatchPeter MaydellPhilippe Mathieu-DaudéEdgar E. IglesiasLaurent VivierCédric Le GoaterChristian BorntraegerCornelia HuckAlistair FrancisDavid GibsonEric BlakePaul DurrantMichael S. TsirkinJohn Snow
1/20R-b R-b R-b
2/20
3/20R-b
4/20
5/20
6/20
7/20
8/20A-b
9/20
10/20
11/20A-b
12/20A-b
13/20
14/20
15/20
16/20Inspired-by
17/20R-b R-b R-b R-b A-b R-b R-b A-b
18/20
19/20A-b A-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 13 reviewers.

Read the v3 thread

Cover letter [PATCH v3 00/20] global exec/memory/dma APIs cleanup

This series is inspired from Peter Maydel cleanup patch:
https://www.mail-archive.com/[email protected]/msg680625.html

- Convert 'is_write' argument to boolean
- Use void pointer for blob buffer
- Remove unnecessary casts (Stefan Weil)
- Replace [API]_rw() by [API]_read/write() when is_write is constant

Supersedes: <[email protected]>

Peter Maydell (1):
Avoid address_space_rw() with a constant is_write argument

Philippe Mathieu-Daudé (19):
scripts/git.orderfile: Display Cocci scripts before code modifications
hw: Remove unnecessary cast when calling dma_memory_read()
exec: Let qemu_ram_*() functions take a const pointer argument
exec: Rename ram_ptr variable
exec: Let flatview API take void pointer arguments
exec: Let the address_space API use void pointer arguments hw/net: Avoid casting non-const pointer, use address_space_write() Remove unnecessary cast when using the address_space API
exec: Let the cpu_[physical]_memory API use void pointer arguments Remove unnecessary cast when using the cpu_[physical]_memory API hw/ide/internal: Remove unused DMARestartFunc typedef hw/ide: Let the DMAIntFunc prototype use a boolean 'is_write' argument hw/virtio: Let virtqueue_map_iovec() use a boolean 'is_write' argument hw/virtio: Let vhost_memory_map() use a boolean 'is_write' argument
exec: Let address_space_unmap() use a boolean 'is_write' argument Let address_space_rw() calls pass a boolean 'is_write' argument
exec: Let cpu_[physical]_memory API use a boolean 'is_write' argument Let cpu_[physical]_memory() calls pass a boolean 'is_write' argument Avoid cpu_physical_memory_rw() with a constant is_write argument

 scripts/coccinelle/exec_rw_const.cocci | 103 +++++++++++++++++++++++++
 include/exec/cpu-all.h                 |   2 +-
 include/exec/cpu-common.h              |  18 ++---
 include/exec/memory.h                  |  16 ++--
 include/hw/ide/internal.h              |   3 +-
 include/sysemu/xen-mapcache.h          |   4 +-
 target/i386/hvf/vmx.h                  |   7 +-
 accel/kvm/kvm-all.c                    |   6 +-
 dma-helpers.c                          |   4 +-
 exec.c                                 |  75 +++++++++---------
 hw/arm/boot.c                          |   6 +-
 hw/arm/smmu-common.c                   |   3 +-
 hw/arm/smmuv3.c                        |  10 +--
 hw/display/exynos4210_fimd.c           |   3 +-
 hw/display/milkymist-tmu2.c            |   8 +-
 hw/display/omap_dss.c                  |   2 +-
 hw/display/omap_lcdc.c                 |  10 +--
 hw/display/ramfb.c                     |   2 +-
 hw/dma/etraxfs_dma.c                   |  25 +++---
 hw/dma/rc4030.c                        |  10 +--
 hw/dma/xlnx-zdma.c                     |  11 +--
 hw/i386/xen/xen-mapcache.c             |   2 +-
 hw/ide/ahci.c                          |   2 +-
 hw/ide/core.c                          |   2 +-
 hw/ide/macio.c                         |   2 +-
 hw/ide/pci.c                           |   2 +-
 hw/misc/pc-testdev.c                   |   2 +-
 hw/net/cadence_gem.c                   |  21 +++--
 hw/net/dp8393x.c                       |  70 +++++++++--------
 hw/net/i82596.c                        |  25 +++---
 hw/net/lasi_i82596.c                   |   5 +-
 hw/nvram/spapr_nvram.c                 |   4 +-
 hw/ppc/pnv_lpc.c                       |   8 +-
 hw/ppc/ppc440_uc.c                     |   6 +-
 hw/ppc/spapr_hcall.c                   |   4 +-
 hw/s390x/css.c                         |  12 +--
 hw/s390x/ipl.c                         |   2 +-
 hw/s390x/s390-pci-bus.c                |   2 +-
 hw/s390x/virtio-ccw.c                  |   2 +-
 hw/scsi/vmw_pvscsi.c                   |   8 +-
 hw/sd/sdhci.c                          |  15 ++--
 hw/virtio/vhost.c                      |   8 +-
 hw/virtio/virtio.c                     |   7 +-
 hw/xen/xen_pt_graphics.c               |   2 +-
 qtest.c                                |  52 ++++++-------
 target/i386/hax-all.c                  |   6 +-
 target/i386/hvf/x86_mmu.c              |  12 +--
 target/i386/whpx-all.c                 |   2 +-
 target/s390x/excp_helper.c             |   2 +-
 target/s390x/helper.c                  |   6 +-
 target/s390x/mmu_helper.c              |   2 +-
 scripts/git.orderfile                  |   3 +
 52 files changed, 360 insertions(+), 266 deletions(-)
 create mode 100644 scripts/coccinelle/exec_rw_const.cocci
Signature · 1 line
2.21.1