Hi,
This series is based on Igor's "eliminate remaining places that
abuse memory_region_allocate_system_memory()":
https://lists.gnu.org/archive/html/qemu-devel/2019-10/msg01601.html
It is quite simple, we enforce all machines to be the QOM owner
of the system memory.
This changes the memory tree from:
(qemu) info mtree -o
memory-region: pc.ram
0000000000000000-0000000007ffffff (prio 0, ram): pc.ram
parent:{obj path=/machine/unattached}
to:
(qemu) info mtree -o
memory-region: pc.ram
0000000000000000-0000000007ffffff (prio 0, ram): pc.ram
owner:{obj path=/machine}
Few patches are required to clean the codebase first, to unify the
creation of the system memory in the board/machine code. Mostly some
old ARM machines (pre-QOM) were affected.
Please review (as a generic codebase cleanup).
Regards,
Phil.
Based-on: <address@hidden>
Philippe Mathieu-Daudé (21):
hw/arm/xilinx_zynq: Use the IEC binary prefix definitions
hw/arm/mps2: Use the IEC binary prefix definitions
hw/arm/collie: Create the RAM in the board
hw/arm/omap2: Create the RAM in the board
hw/arm/omap1: Create the RAM in the board
hw/arm/digic4: Inline digic4_board_setup_ram() function
hw: Drop QOM ownership on memory_region_allocate_system_memory() calls
hw/alpha/dp264: Create the RAM in the board
hw: Let memory_region_allocate_system_memory take MachineState
argument
hw/core: Let the machine be the owner of the system memory
hw/alpha: Let the machine be the owner of the system memory
hw/arm: Let the machine be the owner of the system memory
hw/cris: Let the machine be the owner of the system memory
hw/hppa: Let the machine be the owner of the system memory
hw/i386: Let the machine be the owner of the system memory
hw/lm32: Let the machine be the owner of the system memory
hw/m68k: Let the machine be the owner of the system memory
hw/mips: Let the machine be the owner of the system memory
hw/ppc: Let the machine be the owner of the system memory
hw/sparc: Let the machine be the owner of the system memory
hw/core: Assert memory_region_allocate_system_memory has machine owner