[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 099/136] memory: Correctly return alias region type
From: |
Paolo Bonzini |
Subject: |
[PULL 099/136] memory: Correctly return alias region type |
Date: |
Tue, 25 Feb 2020 12:50:29 +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>
Message-Id: <address@hidden>
Supersedes: <address@hidden>
---
memory.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/memory.c b/memory.c
index aeaa8dc..ce11798 100644
--- a/memory.c
+++ b/memory.c
@@ -2818,6 +2818,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
- [PULL 087/136] exec: Let the cpu_[physical]_memory API use void pointer arguments, (continued)
- [PULL 087/136] exec: Let the cpu_[physical]_memory API use void pointer arguments, Paolo Bonzini, 2020/02/25
- [PULL 089/136] hw/ide/internal: Remove unused DMARestartFunc typedef, Paolo Bonzini, 2020/02/25
- [PULL 086/136] Remove unnecessary cast when using the address_space API, Paolo Bonzini, 2020/02/25
- [PULL 088/136] Remove unnecessary cast when using the cpu_[physical]_memory API, Paolo Bonzini, 2020/02/25
- [PULL 090/136] hw/ide: Let the DMAIntFunc prototype use a boolean 'is_write' argument, Paolo Bonzini, 2020/02/25
- [PULL 091/136] hw/virtio: Let virtqueue_map_iovec() use a boolean 'is_write' argument, Paolo Bonzini, 2020/02/25
- [PULL 092/136] hw/virtio: Let vhost_memory_map() use a boolean 'is_write' argument, Paolo Bonzini, 2020/02/25
- [PULL 093/136] exec: Let address_space_unmap() use a boolean 'is_write' argument, Paolo Bonzini, 2020/02/25
- [PULL 096/136] exec: Let cpu_[physical]_memory API use a boolean 'is_write' argument, Paolo Bonzini, 2020/02/25
- [PULL 094/136] Let address_space_rw() calls pass a boolean 'is_write' argument, Paolo Bonzini, 2020/02/25
- [PULL 099/136] memory: Correctly return alias region type,
Paolo Bonzini <=
- [PULL 097/136] Let cpu_[physical]_memory() calls pass a boolean 'is_write' argument, Paolo Bonzini, 2020/02/25
- [PULL 098/136] Avoid cpu_physical_memory_rw() with a constant is_write argument, Paolo Bonzini, 2020/02/25
- [PULL 095/136] Avoid address_space_rw() with a constant is_write argument, Paolo Bonzini, 2020/02/25
- [PULL 102/136] scripts/cocci: Patch to replace memory_region_init_{ram, readonly -> rom}, Paolo Bonzini, 2020/02/25
- [PULL 100/136] memory: Simplify memory_region_init_rom_nomigrate() to ease review, Paolo Bonzini, 2020/02/25
- [PULL 101/136] scripts/cocci: Rename memory-region-{init-ram -> housekeeping}, Paolo Bonzini, 2020/02/25
- [PULL 103/136] hw/arm: Use memory_region_init_rom() with read-only regions, Paolo Bonzini, 2020/02/25
- [PULL 104/136] hw/display: Use memory_region_init_rom() with read-only regions, Paolo Bonzini, 2020/02/25
- [PULL 103/136] hw/arm: Use memory_region_init_rom() with read-only regions, Paolo Bonzini, 2020/02/25
- [PULL 105/136] hw/mips: Use memory_region_init_rom() with read-only regions, Paolo Bonzini, 2020/02/25