qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 00/21] hw: Let the machine be the owner of the system memory


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH 00/21] hw: Let the machine be the owner of the system memory
Date: Mon, 21 Oct 2019 16:31:08 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.1.1

Hi Peter,

On 10/21/19 10:52 AM, Philippe Mathieu-Daudé wrote:
On 10/21/19 12:56 AM, Philippe Mathieu-Daudé wrote:
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

I forgot 4 other calls:

hw/ppc/ppc4xx_devs.c:708:    memory_region_allocate_system_memory(ram, NULL, "ppc4xx.sdram", ram_size); hw/s390x/s390-virtio-ccw.c:164: memory_region_allocate_system_memory(ram, NULL, "s390.ram", mem_size); hw/sparc/sun4m.c:791:    memory_region_allocate_system_memory(&d->ram, NULL, "sun4m.ram", hw/sparc64/niagara.c:114: memory_region_allocate_system_memory(&s->partition_ram, NULL,

I'll need to respin this series because of this omission, but
- hw/ppc requires more cleanup patches as ARM has,
- hw/sparc is blocked until Igor sent his "convert
  memory_region_allocate_system_memory() to memdev" series.

I don't plan to rework on the ARM cleanups patches (1-6):

  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

Maybe you can take them directly in arm-next once they are reviewed,
then the rest can go via machine-next.

Thanks,

Phil.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]