qemu-devel
[Top][All Lists]
Advanced

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

[PULL 37/61] memory: Correctly return alias region type


From: Paolo Bonzini
Subject: [PULL 37/61] memory: Correctly return alias region type
Date: Mon, 16 Mar 2020 22:27:04 +0100

From: Philippe Mathieu-Daudé <address@hidden>

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é <address@hidden>
---
 memory.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/memory.c b/memory.c
index 404ff4e..fc99e7f 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)) {
-- 
1.8.3.1





reply via email to

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