qemu-devel
[Top][All Lists]
Advanced

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

Re: [RFC PATCH 13/15] sysemu/memory_mapping: Become target-agnostic


From: Richard Henderson
Subject: Re: [RFC PATCH 13/15] sysemu/memory_mapping: Become target-agnostic
Date: Wed, 26 May 2021 12:06:35 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1

On 5/17/21 4:55 AM, Philippe Mathieu-Daudé wrote:
target_ulong is target-specific, while hwaddr isn't.

memory_mapping_list_add_merge_sorted() uses hwaddr arguments
anyway, so use the hwaddr type for MemoryMapping::virt_addr.

Remove the unnecessary "exec/cpu-defs.h" target-speficic header
from "memory_mapping.h" and use the target-agnostic "hw/core/cpu.h"
locally in memory_mapping.c.

Signed-off-by: Philippe Mathieu-Daudé<f4bug@amsat.org>
---
  include/sysemu/memory_mapping.h | 3 +--
  softmmu/memory_mapping.c        | 1 +
  2 files changed, 2 insertions(+), 2 deletions(-)

Certainly hwaddr is now unconditionally 64-bit, so I think this would work fine. I just wonder if uint64_t wouldn't be better, since virt_addr is not a "hardware" aka physical address (as per hwaddr.h).

Either way,
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


r~



reply via email to

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