Message ID | 20250205040341.2056361-11-richard.henderson@linaro.org |
---|---|
State | New |
Headers | show |
Series | tcg: Cleanups after disallowing 64-on-32 | expand |
On 5/2/25 05:03, Richard Henderson wrote: > Since we no longer support 64-bit guests on 32-bit hosts, > we can use a 32-bit type on a 32-bit host. > > Signed-off-by: Richard Henderson <richard.henderson@linaro.org> > --- > include/exec/vaddr.h | 16 +++++++++------- > 1 file changed, 9 insertions(+), 7 deletions(-) Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
diff --git a/include/exec/vaddr.h b/include/exec/vaddr.h index b9844afc77..28bec632fb 100644 --- a/include/exec/vaddr.h +++ b/include/exec/vaddr.h @@ -6,13 +6,15 @@ /** * vaddr: * Type wide enough to contain any #target_ulong virtual address. + * We do not support 64-bit guest on 32-host and detect at configure time. + * Therefore, a host pointer width will always fit a guest pointer. */ -typedef uint64_t vaddr; -#define VADDR_PRId PRId64 -#define VADDR_PRIu PRIu64 -#define VADDR_PRIo PRIo64 -#define VADDR_PRIx PRIx64 -#define VADDR_PRIX PRIX64 -#define VADDR_MAX UINT64_MAX +typedef uintptr_t vaddr; +#define VADDR_PRId PRIdPTR +#define VADDR_PRIu PRIuPTR +#define VADDR_PRIo PRIoPTR +#define VADDR_PRIx PRIxPTR +#define VADDR_PRIX PRIXPTR +#define VADDR_MAX UINTPTR_MAX #endif
Since we no longer support 64-bit guests on 32-bit hosts, we can use a 32-bit type on a 32-bit host. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> --- include/exec/vaddr.h | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-)