[PATCH 0/6] memory: Introduce address_space_create(), re-use &address_space_memory

Philippe Mathieu-Daudé posted 6 patches 2 years, 8 months ago
Test checkpatch passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20210819142039.2825366-1-philmd@redhat.com
include/exec/memory.h    | 14 ++++++++++++++
hw/dma/xlnx-zdma.c       | 15 +++++++++------
hw/dma/xlnx_csu_dma.c    |  9 ++-------
hw/usb/hcd-xhci-sysbus.c | 16 ++++++++++------
softmmu/memory.c         | 24 ++++++++++++++++++++++--
softmmu/physmem.c        |  4 ++--
6 files changed, 59 insertions(+), 23 deletions(-)
[PATCH 0/6] memory: Introduce address_space_create(), re-use &address_space_memory
Posted by Philippe Mathieu-Daudé 2 years, 8 months ago
Introduce address_space_create() (return .heap allocated AddressSpace)
and return directly &address_space_memory if the root MemoryRegion is
get_system_memory().

This simplifies the 'info mtree' output of some boards. Flatview is
unchanged.

Inspired by this thread:
https://www.mail-archive.com/qemu-devel@nongnu.org/msg829819.html

Based-on: <20210819141527.2821842-1-philmd@redhat.com>

Philippe Mathieu-Daudé (6):
  memory: Do not increase refcount on global system_memory region
  memory: Introduce address_space_create()
  memory: Have cpu_address_space_init() use address_space_create()
  hw/dma: Replace alloc() + address_space_init() by
    address_space_create()
  hw/usb: Replace alloc() + address_space_init() by
    address_space_create()
  memory: Have address_space_create() re-use global
    &address_space_memory

 include/exec/memory.h    | 14 ++++++++++++++
 hw/dma/xlnx-zdma.c       | 15 +++++++++------
 hw/dma/xlnx_csu_dma.c    |  9 ++-------
 hw/usb/hcd-xhci-sysbus.c | 16 ++++++++++------
 softmmu/memory.c         | 24 ++++++++++++++++++++++--
 softmmu/physmem.c        |  4 ++--
 6 files changed, 59 insertions(+), 23 deletions(-)

-- 
2.31.1