From: Philippe Mathieu-Daudé Date: Mon, 24 Feb 2020 09:13:00 +0000 (+0100) Subject: memory: Correctly return alias region type X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=39fa93c4438e7c5efb93d859224d27d04e5c2160;p=qemu.git memory: Correctly return alias region type Since memory region aliases are neither rom nor ram, they are described as i/o, which is often incorrect. Return instead the type of the original region we are aliasing. Signed-off-by: Philippe Mathieu-Daudé --- diff --git a/memory.c b/memory.c index 404ff4ed39..fc99e7fa2c 100644 --- a/memory.c +++ b/memory.c @@ -2819,6 +2819,9 @@ void address_space_destroy(AddressSpace *as) static const char *memory_region_type(MemoryRegion *mr) { + if (mr->alias) { + return memory_region_type(mr->alias); + } if (memory_region_is_ram_device(mr)) { return "ramd"; } else if (memory_region_is_romd(mr)) {