diff options
author | Philippe Mathieu-Daudé <philmd@redhat.com> | 2020-02-24 10:13:00 +0100 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2020-03-17 15:18:45 +0100 |
commit | 39fa93c4438e7c5efb93d859224d27d04e5c2160 (patch) | |
tree | 2020e4e8a389bf9c5e84bc1e9e657b97a73254d4 /memory.c | |
parent | ac90871cf8030753a7bcef26fa1662c4e3c90078 (diff) | |
download | qemu-39fa93c4438e7c5efb93d859224d27d04e5c2160.zip qemu-39fa93c4438e7c5efb93d859224d27d04e5c2160.tar.gz qemu-39fa93c4438e7c5efb93d859224d27d04e5c2160.tar.bz2 |
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é <philmd@redhat.com>
Diffstat (limited to 'memory.c')
-rw-r--r-- | memory.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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)) { |