Based-on: <cover.1751493467.git.bala...@eik.bme.hu> ("[PATCH v2 00/14] hw/pci-host/raven clean ups")
Supersedes: <20240829-memory-v1-1-ac07af2f4...@daynix.com> ("[PATCH] docs/devel: Prohibit calling object_unparent() for memory region") When developing the next version of "[PATCH 00/16] memory: Stop piggybacking on memory region owners*", I faced multiple memory region leaks and use-after-finalization. This series extracts their fixes so that the number of Cc: won't explode. Patch "qdev: Automatically delete memory subregions" and the succeeding patches are for refactoring, but patch "vfio-user: Do not delete the subregion" does fix use-after-finalization. * https://lore.kernel.org/qemu-devel/20250901-mr-v1-0-dd7cb6b14...@rsg.ci.i.u-tokyo.ac.jp/ Signed-off-by: Akihiko Odaki <od...@rsg.ci.i.u-tokyo.ac.jp> --- Changes in v2: - Added a reference to "[PATCH] docs/devel: Prohibit calling object_unparent() for memory region", which does something similar to patch "docs/devel: Do not unparent in instance_finalize()" but I forgot I sent it in the past. - Fixed a typo in patch "docs/devel: Do not unparent in instance_finalize()" and "[PATCH 02/22] vfio/pci: Do not unparent in instance_finalize()". - Dropped patches to move address_space_init() calls; I intend to QOM-ify to fix memory leaks automatically as discussed in the following thread: https://lore.kernel.org/qemu-devel/cd21698f-db77-eb75-6966-d559fdcab...@eik.bme.hu/ But the QOM-ification will be big so I'll send it as a separate series. - Rebased on top of "[PATCH v2 00/14] hw/pci-host/raven clean ups". https://lore.kernel.org/qemu-devel/cover.1751493467.git.bala...@eik.bme.hu/ - Link to v1: https://lore.kernel.org/qemu-devel/20250906-use-v1-0-c51caafd1...@rsg.ci.i.u-tokyo.ac.jp --- Akihiko Odaki (15): docs/devel: Do not unparent in instance_finalize() vfio/pci: Do not unparent in instance_finalize() hw/pci-bridge: Do not assume immediate MemoryRegion finalization vfio-user: Do not delete the subregion hw/char/diva-gsp: Do not delete the subregion hw/char/serial-pci-multi: Do not delete the subregion secondary-vga: Do not delete the subregions cmd646: Do not delete the subregions hw/ide/piix: Do not delete the subregions hw/ide/via: Do not delete the subregions hw/nvme: Do not delete the subregion pci: Do not delete the subregions hw/ppc/spapr_pci: Do not delete the subregions hw/usb/hcd-ehci: Do not delete the subregions hw/usb/hcd-xhci: Do not delete the subregions docs/devel/memory.rst | 19 +++------ include/hw/pci/pci.h | 1 + hw/char/diva-gsp.c | 1 - hw/char/serial-pci-multi.c | 1 - hw/display/vga-pci.c | 8 ---- hw/ide/cmd646.c | 12 ------ hw/ide/piix.c | 13 ------- hw/ide/via.c | 12 ------ hw/nvme/ctrl.c | 2 - hw/pci/pci.c | 22 +---------- hw/pci/pci_bridge.c | 96 +++++++++++++++++++++++++--------------------- hw/ppc/spapr_pci.c | 22 ----------- hw/usb/hcd-ehci.c | 4 -- hw/usb/hcd-xhci.c | 10 ----- hw/vfio-user/pci.c | 6 --- hw/vfio/pci.c | 4 -- 16 files changed, 60 insertions(+), 173 deletions(-) --- base-commit: e101d33792530093fa0b0a6e5f43e4d8cfe4581e change-id: 20250906-use-37ecc903a9e0 Best regards, -- Akihiko Odaki <od...@rsg.ci.i.u-tokyo.ac.jp>