All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH RESEND v2 00/32] hw: Sanitize various MemoryRegion calls
@ 2020-02-24 20:55 ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 81+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-02-24 20:55 UTC (permalink / raw)
  To: qemu-devel, Paolo Bonzini, Peter Maydell
  Cc: Sagar Karandikar, Michael S. Tsirkin, Jason Wang,
	Philippe Mathieu-Daudé,
	Mark Cave-Ayland, KONRAD Frederic, Alistair Francis,
	Edgar E. Iglesias, Subbaraya Sundeep, qemu-block, Magnus Damm,
	Hervé Poussineau, Joel Stanley, Marc-André Lureau,
	Aleksandar Rikalo, David Gibson, Artyom Tarasenko,
	Eduardo Habkost, Jean-Christophe Dubois, Alistair Francis,
	Fabien Chouteau, qemu-arm, Peter Chubb, Palmer Dabbelt,
	Richard Henderson, Kevin Wolf, qemu-riscv, Igor Mitsyanko,
	Bastian Koppelmann, Laurent Vivier, Max Reitz, Michael Walle,
	qemu-ppc, Aleksandar Markovic, Aurelien Jarno

Resending after being kicked by gsmtp...

 4.3.0 Temporary System Problem.  Try again later (10). t81sm863436wmg.6 - gsmtp

This series simplifies various memory API calls when creating
memory regions.

Most of the patches are generated with Coccinelle semantic
patches (provided).
Few more cleanups added while writting the patches have been
added.

v1 was 'Let devices own the MemoryRegion they create':
https://www.mail-archive.com/qemu-devel@nongnu.org/msg681960.html

Since v1:
- understood a bit more Peter Maydell comments regarding
  how memory devices are migrated.

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

Philippe Mathieu-Daudé (32):
  memory: Correctly return alias region type
  memory: Simplify memory_region_init_rom_nomigrate() to ease review
  scripts/cocci: Rename memory-region-{init-ram -> housekeeping}
  scripts/cocci: Patch to replace memory_region_init_{ram,readonly ->
    rom}
  hw/arm: Use memory_region_init_rom() with read-only regions
  hw/display: Use memory_region_init_rom() with read-only regions
  hw/mips: Use memory_region_init_rom() with read-only regions
  hw/m68k: Use memory_region_init_rom() with read-only regions
  hw/net: Use memory_region_init_rom() with read-only regions
  hw/pci-host: Use memory_region_init_rom() with read-only regions
  hw/ppc: Use memory_region_init_rom() with read-only regions
  hw/riscv: Use memory_region_init_rom() with read-only regions
  hw/sh4: Use memory_region_init_rom() with read-only regions
  hw/sparc: Use memory_region_init_rom() with read-only regions
  scripts/cocci: Patch to detect potential use of memory_region_init_rom
  hw/arm/stm32: Use memory_region_init_rom() with read-only regions
  hw/ppc/ppc405: Use memory_region_init_rom() with read-only regions
  hw/i386/pc_sysfw: Simplify using memory_region_init_alias()
  hw/i386/pc_sysfw: Remove unused 'ram_size' argument
  scripts/cocci: Patch to remove unnecessary
    memory_region_set_readonly()
  hw/arm: Remove unnecessary memory_region_set_readonly() on ROM alias
  scripts/cocci: Patch to let devices own their MemoryRegions
  hw/arm: Let devices own the MemoryRegion they create
  hw/char: Let devices own the MemoryRegion they create
  hw/core: Let devices own the MemoryRegion they create
  hw/display: Let devices own the MemoryRegion they create
  hw/dma: Let devices own the MemoryRegion they create
  hw/riscv: Let devices own the MemoryRegion they create
  hw/input/milkymist-softusb: Remove unused 'pmem_ptr' field
  hw/input/milkymist-softusb: Let devices own the MemoryRegion they
    create
  hw/net/milkymist-minimac2: Let devices own the MemoryRegion they
    create
  hw/block/onenand: Let devices own the MemoryRegion they create

 .../memory-region-housekeeping.cocci          | 159 ++++++++++++++++++
 .../coccinelle/memory-region-init-ram.cocci   |  38 -----
 hw/arm/exynos4210.c                           |  14 +-
 hw/arm/fsl-imx25.c                            |  10 +-
 hw/arm/fsl-imx31.c                            |   6 +-
 hw/arm/fsl-imx6.c                             |   6 +-
 hw/arm/fsl-imx6ul.c                           |   9 +-
 hw/arm/mainstone.c                            |   3 +-
 hw/arm/msf2-soc.c                             |   6 +-
 hw/arm/nrf51_soc.c                            |   2 +-
 hw/arm/omap_sx1.c                             |   6 +-
 hw/arm/palm.c                                 |   3 +-
 hw/arm/spitz.c                                |   3 +-
 hw/arm/stellaris.c                            |   3 +-
 hw/arm/stm32f205_soc.c                        |  11 +-
 hw/arm/stm32f405_soc.c                        |  12 +-
 hw/arm/tosa.c                                 |   3 +-
 hw/arm/xlnx-zynqmp.c                          |  11 +-
 hw/block/onenand.c                            |   7 +-
 hw/char/serial.c                              |   7 +-
 hw/core/platform-bus.c                        |   3 +-
 hw/display/cg3.c                              |   5 +-
 hw/display/g364fb.c                           |   3 +-
 hw/display/macfb.c                            |   4 +-
 hw/display/tcx.c                              |   5 +-
 hw/dma/i8257.c                                |   2 +-
 hw/dma/rc4030.c                               |   4 +-
 hw/i386/pc_sysfw.c                            |  29 +---
 hw/input/milkymist-softusb.c                  |  12 +-
 hw/m68k/q800.c                                |   3 +-
 hw/mips/mips_fulong2e.c                       |   3 +-
 hw/mips/mips_jazz.c                           |   6 +-
 hw/mips/mips_mipssim.c                        |   3 +-
 hw/mips/mips_r4k.c                            |   3 +-
 hw/net/dp8393x.c                              |   5 +-
 hw/net/milkymist-minimac2.c                   |   8 +-
 hw/pci-host/prep.c                            |   5 +-
 hw/ppc/mac_newworld.c                         |   3 +-
 hw/ppc/mac_oldworld.c                         |   3 +-
 hw/ppc/ppc405_boards.c                        |   6 +-
 hw/riscv/sifive_e.c                           |   9 +-
 hw/riscv/sifive_u.c                           |   2 +-
 hw/sh4/shix.c                                 |   3 +-
 hw/sparc/leon3.c                              |   3 +-
 memory.c                                      |  16 +-
 MAINTAINERS                                   |   1 +
 46 files changed, 268 insertions(+), 200 deletions(-)
 create mode 100644 scripts/coccinelle/memory-region-housekeeping.cocci
 delete mode 100644 scripts/coccinelle/memory-region-init-ram.cocci

-- 
2.21.1



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

end of thread, other threads:[~2020-02-26 11:45 UTC | newest]

Thread overview: 81+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-24 20:55 [PATCH RESEND v2 00/32] hw: Sanitize various MemoryRegion calls Philippe Mathieu-Daudé
2020-02-24 20:55 ` Philippe Mathieu-Daudé
2020-02-24 20:55 ` [PATCH RESEND v2 01/32] memory: Correctly return alias region type Philippe Mathieu-Daudé
2020-02-24 20:55   ` Philippe Mathieu-Daudé
2020-02-24 20:55 ` [PATCH RESEND v2 02/32] memory: Simplify memory_region_init_rom_nomigrate() to ease review Philippe Mathieu-Daudé
2020-02-24 20:55   ` Philippe Mathieu-Daudé
2020-02-24 21:17   ` Alistair Francis
2020-02-24 21:17     ` Alistair Francis
2020-02-24 20:55 ` [PATCH RESEND v2 03/32] scripts/cocci: Rename memory-region-{init-ram -> housekeeping} Philippe Mathieu-Daudé
2020-02-24 20:55   ` Philippe Mathieu-Daudé
2020-02-24 20:55 ` [PATCH RESEND v2 04/32] scripts/cocci: Patch to replace memory_region_init_{ram, readonly -> rom} Philippe Mathieu-Daudé
2020-02-24 20:55   ` Philippe Mathieu-Daudé
2020-02-24 20:55 ` [PATCH RESEND v2 05/32] hw/arm: Use memory_region_init_rom() with read-only regions Philippe Mathieu-Daudé
2020-02-24 20:55   ` Philippe Mathieu-Daudé
2020-02-24 20:55 ` [PATCH RESEND v2 06/32] hw/display: " Philippe Mathieu-Daudé
2020-02-24 20:55   ` Philippe Mathieu-Daudé
2020-02-24 20:55 ` [PATCH RESEND v2 07/32] hw/mips: " Philippe Mathieu-Daudé
2020-02-24 20:55   ` Philippe Mathieu-Daudé
2020-02-26 11:38   ` Aleksandar Markovic
2020-02-26 11:38     ` Aleksandar Markovic
2020-02-24 20:55 ` [PATCH RESEND v2 08/32] hw/m68k: " Philippe Mathieu-Daudé
2020-02-24 20:55   ` Philippe Mathieu-Daudé
2020-02-24 20:55 ` [PATCH RESEND v2 09/32] hw/net: " Philippe Mathieu-Daudé
2020-02-24 20:55   ` Philippe Mathieu-Daudé
2020-02-24 20:55 ` [PATCH RESEND v2 10/32] hw/pci-host: " Philippe Mathieu-Daudé
2020-02-24 20:55   ` Philippe Mathieu-Daudé
2020-02-25  0:23   ` David Gibson
2020-02-25  0:23     ` David Gibson
2020-02-24 20:55 ` [PATCH RESEND v2 11/32] hw/ppc: " Philippe Mathieu-Daudé
2020-02-24 20:55   ` Philippe Mathieu-Daudé
2020-02-25  0:23   ` David Gibson
2020-02-25  0:23     ` David Gibson
2020-02-24 20:55 ` [PATCH RESEND v2 12/32] hw/riscv: " Philippe Mathieu-Daudé
2020-02-24 20:55   ` Philippe Mathieu-Daudé
2020-02-24 20:55 ` [PATCH RESEND v2 13/32] hw/sh4: " Philippe Mathieu-Daudé
2020-02-24 20:55   ` Philippe Mathieu-Daudé
2020-02-24 20:55 ` [PATCH RESEND v2 14/32] hw/sparc: " Philippe Mathieu-Daudé
2020-02-24 20:55   ` Philippe Mathieu-Daudé
2020-02-25 10:32   ` KONRAD Frederic
2020-02-24 20:55 ` [PATCH RESEND v2 15/32] scripts/cocci: Patch to detect potential use of memory_region_init_rom Philippe Mathieu-Daudé
2020-02-24 20:55   ` Philippe Mathieu-Daudé
2020-02-24 20:55 ` [PATCH RESEND v2 16/32] hw/arm/stm32: Use memory_region_init_rom() with read-only regions Philippe Mathieu-Daudé
2020-02-24 20:55   ` Philippe Mathieu-Daudé
2020-02-24 20:55 ` [PATCH RESEND v2 17/32] hw/ppc/ppc405: " Philippe Mathieu-Daudé
2020-02-24 20:55   ` Philippe Mathieu-Daudé
2020-02-25  0:24   ` David Gibson
2020-02-25  0:24     ` David Gibson
2020-02-24 20:55 ` [PATCH RESEND v2 18/32] hw/i386/pc_sysfw: Simplify using memory_region_init_alias() Philippe Mathieu-Daudé
2020-02-24 20:55   ` Philippe Mathieu-Daudé
2020-02-25 10:05   ` Philippe Mathieu-Daudé
2020-02-25 10:05     ` Philippe Mathieu-Daudé
2020-02-25 12:39     ` Paolo Bonzini
2020-02-25 12:39       ` Paolo Bonzini
2020-02-24 20:55 ` [PATCH RESEND v2 19/32] hw/i386/pc_sysfw: Remove unused 'ram_size' argument Philippe Mathieu-Daudé
2020-02-24 20:55   ` Philippe Mathieu-Daudé
2020-02-24 20:55 ` [PATCH RESEND v2 20/32] scripts/cocci: Patch to remove unnecessary memory_region_set_readonly() Philippe Mathieu-Daudé
2020-02-24 20:55   ` Philippe Mathieu-Daudé
2020-02-24 20:55 ` [PATCH RESEND v2 21/32] hw/arm: Remove unnecessary memory_region_set_readonly() on ROM alias Philippe Mathieu-Daudé
2020-02-24 20:55   ` Philippe Mathieu-Daudé
2020-02-24 20:55 ` [PATCH RESEND v2 22/32] scripts/cocci: Patch to let devices own their MemoryRegions Philippe Mathieu-Daudé
2020-02-24 20:55   ` Philippe Mathieu-Daudé
2020-02-24 20:55 ` [PATCH RESEND v2 23/32] hw/arm: Let devices own the MemoryRegion they create Philippe Mathieu-Daudé
2020-02-24 20:55   ` Philippe Mathieu-Daudé
2020-02-24 20:55 ` [PATCH RESEND v2 24/32] hw/char: " Philippe Mathieu-Daudé
2020-02-24 20:55   ` Philippe Mathieu-Daudé
2020-02-24 20:55 ` [PATCH RESEND v2 25/32] hw/core: " Philippe Mathieu-Daudé
2020-02-24 20:55   ` Philippe Mathieu-Daudé
2020-02-24 20:55 ` [PATCH RESEND v2 26/32] hw/display: " Philippe Mathieu-Daudé
2020-02-24 20:55   ` Philippe Mathieu-Daudé
2020-02-24 20:55 ` [PATCH RESEND v2 27/32] hw/dma: " Philippe Mathieu-Daudé
2020-02-24 20:55   ` Philippe Mathieu-Daudé
2020-02-24 20:55 ` [PATCH RESEND v2 28/32] hw/riscv: " Philippe Mathieu-Daudé
2020-02-24 20:55   ` Philippe Mathieu-Daudé
2020-02-24 20:55 ` [PATCH RESEND v2 29/32] hw/input/milkymist-softusb: Remove unused 'pmem_ptr' field Philippe Mathieu-Daudé
2020-02-24 20:55   ` Philippe Mathieu-Daudé
2020-02-24 20:55 ` [RFC PATCH RESEND v2 30/32] hw/input/milkymist-softusb: Let devices own the MemoryRegion they create Philippe Mathieu-Daudé
2020-02-24 20:55   ` Philippe Mathieu-Daudé
2020-02-24 20:55 ` [RFC PATCH RESEND v2 31/32] hw/net/milkymist-minimac2: " Philippe Mathieu-Daudé
2020-02-24 20:55   ` Philippe Mathieu-Daudé
2020-02-24 20:55 ` [RFC PATCH RESEND v2 32/32] hw/block/onenand: " Philippe Mathieu-Daudé
2020-02-24 20:55   ` Philippe Mathieu-Daudé

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.