[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 01/32] memory: Correctly return alias region type
From: |
Alistair Francis |
Subject: |
Re: [PATCH v2 01/32] memory: Correctly return alias region type |
Date: |
Mon, 24 Feb 2020 13:14:59 -0800 |
On Mon, Feb 24, 2020 at 12:49 PM Philippe Mathieu-Daudé
<address@hidden> wrote:
>
> 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>
Reviewed-by: Alistair Francis <address@hidden>
Alistair
> ---
> Cc: address@hidden
>
> memory.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/memory.c b/memory.c
> index aeaa8dcc9e..ce1179874e 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)) {
> --
> 2.21.1
>
>
- [PATCH v2 00/32] hw: Sanitize various MemoryRegion uses, Philippe Mathieu-Daudé, 2020/02/24
- [PATCH v2 02/32] memory: Simplify memory_region_init_rom_nomigrate() to ease review, Philippe Mathieu-Daudé, 2020/02/24
- [PATCH v2 01/32] memory: Correctly return alias region type, Philippe Mathieu-Daudé, 2020/02/24
- Re: [PATCH v2 01/32] memory: Correctly return alias region type,
Alistair Francis <=
- [PATCH v2 03/32] scripts/cocci: Rename memory-region-{init-ram -> housekeeping}, Philippe Mathieu-Daudé, 2020/02/24
- [PATCH v2 04/32] scripts/cocci: Patch to replace memory_region_init_{ram, readonly -> rom}, Philippe Mathieu-Daudé, 2020/02/24
- [PATCH v2 05/32] hw/arm: Use memory_region_init_rom() with read-only regions, Philippe Mathieu-Daudé, 2020/02/24
- [PATCH v2 06/32] hw/display: Use memory_region_init_rom() with read-only regions, Philippe Mathieu-Daudé, 2020/02/24
- [PATCH v2 08/32] hw/m68k: Use memory_region_init_rom() with read-only regions, Philippe Mathieu-Daudé, 2020/02/24
- [PATCH v2 07/32] hw/mips: Use memory_region_init_rom() with read-only regions, Philippe Mathieu-Daudé, 2020/02/24