On Wed, 5 Jan 2022 at 21:05, Alex Bennée <alex.ben...@linaro.org> wrote: > Can't be added as a subregion to the container... > > qemu-system-arm: ../../softmmu/memory.c:2538: > memory_region_add_subregion_common: Assertion `!subregion->container' failed.
This assert means you tried to add the same MemoryRegion as a subregion of more than one parent MR. You can either: * pass all the CPUs the same container as their "memory" link, if they all see the same view of the world * if they have different views of the world, you need to create a container for each CPU to be the "memory" link, and to populate that container you need to create N-1 alias MRs of the board_memory MR (CPU 0's container can use the original board_memory MR; CPU 1, ... use the aliases). Example of option 1: virt board Example of option 2: hw/arm/armsse.c (look at what it does with the s->cpu_container[] and s->container_alias[] arrays) -- PMM