aboutsummaryrefslogtreecommitdiff
path: root/include/exec
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2025-02-04 18:56:07 -0800
committerRichard Henderson <richard.henderson@linaro.org>2025-02-18 08:29:02 -0800
commita70af12addd9060fdf8f3dbd42b42e3072c3914f (patch)
tree1426001e551422bcc5c33d5c48c6422a2d9ddc4a /include/exec
parenta630055df39e1960275d0e273af036f794b15662 (diff)
downloadqemu-a70af12addd9060fdf8f3dbd42b42e3072c3914f.zip
qemu-a70af12addd9060fdf8f3dbd42b42e3072c3914f.tar.gz
qemu-a70af12addd9060fdf8f3dbd42b42e3072c3914f.tar.bz2
include/exec: Change vaddr to uintptr_t
Since we no longer support 64-bit guests on 32-bit hosts, we can use a 32-bit type on a 32-bit host. Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'include/exec')
-rw-r--r--include/exec/vaddr.h16
1 files changed, 9 insertions, 7 deletions
diff --git a/include/exec/vaddr.h b/include/exec/vaddr.h
index b9844af..28bec63 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