qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PULL 02/24] cpu: Introduce vaddr type


From: Andreas Färber
Subject: [Qemu-devel] [PULL 02/24] cpu: Introduce vaddr type
Date: Tue, 23 Jul 2013 04:53:34 +0200

vaddr is to target_ulong what uintmax_t is to unsigned int.

Its purpose is to allow turning per-target functions with target_ulong
arguments into CPUClass hooks.

Suggested-by: Peter Maydell <address@hidden>
Signed-off-by: Andreas Färber <address@hidden>
---
 include/qom/cpu.h | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/include/qom/cpu.h b/include/qom/cpu.h
index dfd81a1..829fd45 100644
--- a/include/qom/cpu.h
+++ b/include/qom/cpu.h
@@ -30,6 +30,18 @@
 typedef int (*WriteCoreDumpFunction)(void *buf, size_t size, void *opaque);
 
 /**
+ * vaddr:
+ * Type wide enough to contain any #target_ulong virtual address.
+ */
+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
+
+/**
  * SECTION:cpu
  * @section_id: QEMU-cpu
  * @title: CPU Class
-- 
1.8.1.4




reply via email to

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