qemu-riscv
[Top][All Lists]
Advanced

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

Re: [PATCH 06/24] exec: Have guest_addr_valid() methods take abi_ptr/siz


From: Richard Henderson
Subject: Re: [PATCH 06/24] exec: Have guest_addr_valid() methods take abi_ptr/size_t arguments
Date: Sun, 21 Apr 2024 09:29:02 -0700
User-agent: Mozilla Thunderbird

On 4/18/24 12:25, Philippe Mathieu-Daudé wrote:
abi_ulong is target specific, replace by abi_ptr which isn't.
Use size_t for the @len type.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
  include/exec/cpu_ldst.h | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/exec/cpu_ldst.h b/include/exec/cpu_ldst.h
index f3c2a3ca74..63186b07e4 100644
--- a/include/exec/cpu_ldst.h
+++ b/include/exec/cpu_ldst.h
@@ -92,12 +92,12 @@ static inline void *g2h(CPUState *cs, abi_ptr x)
      return g2h_untagged(cpu_untagged_addr(cs, x));
  }
-static inline bool guest_addr_valid_untagged(abi_ulong x)
+static inline bool guest_addr_valid_untagged(abi_ptr x)
  {
      return x <= GUEST_ADDR_MAX;
  }
-static inline bool guest_range_valid_untagged(abi_ulong start, abi_ulong len)
+static inline bool guest_range_valid_untagged(abi_ptr start, size_t len)

No, this needs to remain a large type for 64-bit guest on 32-bit host.
(When will that ever die...)


r~



reply via email to

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