[PATCH v3 00/25] hw/sysbus: Spring cleanups (part 1)

Philippe Mathieu-Daudé posted 25 patches 2 weeks, 2 days ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20251028181300.41475-1-philmd@linaro.org
Maintainers: "Michael S. Tsirkin" <mst@redhat.com>, Igor Mammedov <imammedo@redhat.com>, Ani Sinha <anisinha@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>, "Daniel P. Berrangé" <berrange@redhat.com>, Eduardo Habkost <eduardo@habkost.net>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>, Richard Henderson <richard.henderson@linaro.org>, Song Gao <gaosong@loongson.cn>, Bibo Mao <maobibo@loongson.cn>, Jiaxun Yang <jiaxun.yang@flygoat.com>, Keith Busch <kbusch@kernel.org>, Klaus Jensen <its@irrelevant.dk>, Jesper Devantier <foss@defmacro.it>, Bernhard Beschow <shentey@gmail.com>, Matthew Rosato <mjrosato@linux.ibm.com>, Eric Farman <farman@linux.ibm.com>, Thomas Huth <thuth@redhat.com>, David Hildenbrand <david@redhat.com>, Ilya Leoshkevich <iii@linux.ibm.com>, Halil Pasic <pasic@linux.ibm.com>, Christian Borntraeger <borntraeger@linux.ibm.com>, "Cédric Le Goater" <clg@kaod.org>, Peter Maydell <peter.maydell@linaro.org>, Steven Lee <steven_lee@aspeedtech.com>, Troy Lee <leetroy@gmail.com>, Jamin Lin <jamin_lin@aspeedtech.com>, Andrew Jeffery <andrew@codeconstruct.com.au>, Joel Stanley <joel@jms.id.au>, Peter Xu <peterx@redhat.com>, "Philippe Mathieu-Daudé" <philmd@linaro.org>, Fabiano Rosas <farosas@suse.de>
include/hw/sysbus.h                 |  5 +--
include/system/memory.h             |  9 ++++-
hw/acpi/cxl.c                       | 10 +++--
hw/core/sysbus.c                    | 57 ++++++++++++-----------------
hw/i386/acpi-build.c                |  8 ++--
hw/i386/kvm/ioapic.c                |  3 +-
hw/i386/microvm-dt.c                |  6 ++-
hw/loongarch/virt-acpi-build.c      |  4 +-
hw/loongarch/virt-fdt-build.c       |  4 +-
hw/nvme/ctrl.c                      | 15 +++++---
hw/pci-bridge/pci_expander_bridge.c |  6 ++-
hw/ppc/e500.c                       |  2 +-
hw/s390x/s390-pci-inst.c            | 23 ++++++++----
hw/timer/hpet.c                     |  4 +-
hw/watchdog/wdt_aspeed.c            |  2 +-
migration/ram.c                     | 11 +++---
system/ioport.c                     | 21 +++++++----
system/memory.c                     |  7 +++-
18 files changed, 113 insertions(+), 84 deletions(-)
[PATCH v3 00/25] hw/sysbus: Spring cleanups (part 1)
Posted by Philippe Mathieu-Daudé 2 weeks, 2 days ago
- Use sysbus_mmio_get_region() instead of SysBusDevice::mmio[].memory
- Use memory_region_name() instead of MemoryRegion::name
- Use memory_region_size() instead of int128_get64(MemoryRegion::size)
- Add memory_region_get_address()
- Use memory_region_get_address() instead of MemoryRegion::addr
- Remove SysBusDevice::mmio[].addr
- Simplify SysBusDevice::mmio[]

Philippe Mathieu-Daudé (25):
  hw/i386/microvm: Use proper SysBus accessors
  hw/i386/ioapic: Use proper SysBus accessors
  hw/timer/hpet: Use proper SysBus accessors
  hw/acpi/cxl: Use proper SysBus accessors
  hw/ppc/e500: Use proper SysBus accessors
  hw/pci-bridge: Use proper SysBus accessors
  hw/sysbus: Use memory_region_name()
  hw/nvme/ctrl: Use memory_region_size()
  hw/s390x: Use memory_region_size()
  system/memory: Have memory_region_size() take a const argument
  system/memory: Introduce memory_region_get_address()
  migration/ram: Use memory_region_get_address()
  hw/acpi: Use memory_region_get_address()
  hw/fdt: Use memory_region_get_address()
  hw/nvme: Use memory_region_get_address()
  hw/s390x: Use memory_region_get_address()
  hw/timer/hpet: Use memory_region_get_address()
  hw/watchdog/aspeed: Use memory_region_get_address()
  hw/pci-bridge: Use memory_region_get_address()
  system/ioport: Use memory_region_get_address()
  hw/sysbus: Use memory_region_get_address()
  hw/sysbus: Hoist MemoryRegion in sysbus_mmio_map_common()
  hw/sysbus: Remove sysbus_mmio_map_common() @may_overlap argument
  hw/sysbus: Use memory_region_is_mapped() to check for mapped region
  hw/sysbus: Simplify SysBusDevice::mmio

 include/hw/sysbus.h                 |  5 +--
 include/system/memory.h             |  9 ++++-
 hw/acpi/cxl.c                       | 10 +++--
 hw/core/sysbus.c                    | 57 ++++++++++++-----------------
 hw/i386/acpi-build.c                |  8 ++--
 hw/i386/kvm/ioapic.c                |  3 +-
 hw/i386/microvm-dt.c                |  6 ++-
 hw/loongarch/virt-acpi-build.c      |  4 +-
 hw/loongarch/virt-fdt-build.c       |  4 +-
 hw/nvme/ctrl.c                      | 15 +++++---
 hw/pci-bridge/pci_expander_bridge.c |  6 ++-
 hw/ppc/e500.c                       |  2 +-
 hw/s390x/s390-pci-inst.c            | 23 ++++++++----
 hw/timer/hpet.c                     |  4 +-
 hw/watchdog/wdt_aspeed.c            |  2 +-
 migration/ram.c                     | 11 +++---
 system/ioport.c                     | 21 +++++++----
 system/memory.c                     |  7 +++-
 18 files changed, 113 insertions(+), 84 deletions(-)

-- 
2.51.0