[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v7 05/31] exec: Improve types for guest_addr_valid
From: |
Richard Henderson |
Subject: |
[PATCH v7 05/31] exec: Improve types for guest_addr_valid |
Date: |
Fri, 12 Feb 2021 10:48:36 -0800 |
Return bool not int; pass abi_ulong not 'unsigned long'.
All callers use abi_ulong already, so the change in type
has no effect.
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
include/exec/cpu_ldst.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/exec/cpu_ldst.h b/include/exec/cpu_ldst.h
index 3f9063aade..5e8878ee9b 100644
--- a/include/exec/cpu_ldst.h
+++ b/include/exec/cpu_ldst.h
@@ -79,7 +79,7 @@ typedef uint64_t abi_ptr;
#endif
#define h2g_valid(x) guest_addr_valid((uintptr_t)(x) - guest_base)
-static inline int guest_range_valid(unsigned long start, unsigned long len)
+static inline bool guest_range_valid(abi_ulong start, abi_ulong len)
{
return len - 1 <= GUEST_ADDR_MAX && start <= GUEST_ADDR_MAX - len + 1;
}
--
2.25.1
- [PATCH v7 00/31] target-arm: Implement ARMv8.5-MemTag, user mode, Richard Henderson, 2021/02/12
- [PATCH v7 01/31] tcg: Introduce target-specific page data for user-only, Richard Henderson, 2021/02/12
- [PATCH v7 02/31] linux-user: Introduce PAGE_ANON, Richard Henderson, 2021/02/12
- [PATCH v7 03/31] exec: Use uintptr_t for guest_base, Richard Henderson, 2021/02/12
- [PATCH v7 05/31] exec: Improve types for guest_addr_valid,
Richard Henderson <=
- [PATCH v7 04/31] exec: Use uintptr_t in cpu_ldst.h, Richard Henderson, 2021/02/12
- [PATCH v7 08/31] bsd-user: Tidy VERIFY_READ/VERIFY_WRITE, Richard Henderson, 2021/02/12
- [PATCH v7 13/31] linux-user: Explicitly untag memory management syscalls, Richard Henderson, 2021/02/12
- [PATCH v7 09/31] linux-user: Do not use guest_addr_valid for h2g_valid, Richard Henderson, 2021/02/12
- [PATCH v7 07/31] linux-user: Tidy VERIFY_READ/VERIFY_WRITE, Richard Henderson, 2021/02/12
- [PATCH v7 12/31] exec: Use cpu_untagged_addr in g2h; split out g2h_untagged, Richard Henderson, 2021/02/12
- [PATCH v7 15/31] exec: Rename guest_{addr,range}_valid to *_untagged, Richard Henderson, 2021/02/12
- [PATCH v7 11/31] exec: Introduce cpu_untagged_addr, Richard Henderson, 2021/02/12