mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
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>
This commit is contained in:
parent
ac90871cf8
commit
39fa93c443
1 changed files with 3 additions and 0 deletions
3
memory.c
3
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)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue