[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 06/24] exec: Have guest_addr_valid() methods take abi_ptr/size_t
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH 06/24] exec: Have guest_addr_valid() methods take abi_ptr/size_t arguments |
Date: |
Thu, 18 Apr 2024 21:25:05 +0200 |
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)
{
return len - 1 <= GUEST_ADDR_MAX && start <= GUEST_ADDR_MAX - len + 1;
}
--
2.41.0
- Re: [PATCH 02/24] exec: Declare CPUBreakpoint/CPUWatchpoint type in 'breakpoint.h' header, (continued)
- [PATCH 03/24] hw/core: Avoid including the full 'hw/core/cpu.h' in 'tcg-cpu-ops.h', Philippe Mathieu-Daudé, 2024/04/18
- [PATCH 04/24] exec: Restrict TCG specific declarations of 'cputlb.h', Philippe Mathieu-Daudé, 2024/04/18
- [PATCH 05/24] exec: Restrict 'cpu_ldst.h' to TCG accelerator, Philippe Mathieu-Daudé, 2024/04/18
- [PATCH 09/24] physmem: Restrict TCG CPU IOTLB code to TCG accel, Philippe Mathieu-Daudé, 2024/04/18
- [PATCH 06/24] exec: Have guest_addr_valid() methods take abi_ptr/size_t arguments,
Philippe Mathieu-Daudé <=
- [PATCH 08/24] physmem: Move TCG CPU IOTLB methods around, Philippe Mathieu-Daudé, 2024/04/18
- [PATCH 07/24] exec: Un-inline tlb_vaddr_to_host() and declare it in 'exec/cputlb.h', Philippe Mathieu-Daudé, 2024/04/18
- [PATCH 10/24] exec: Reduce tlb_set_dirty() declaration scope, Philippe Mathieu-Daudé, 2024/04/18
- [PATCH 11/24] exec: Move tlb_reset_dirty*() declarations to 'exec/cputlb.h', Philippe Mathieu-Daudé, 2024/04/18