summaryrefslogtreecommitdiff
path: root/include/qom
diff options
context:
space:
mode:
authorAndreas Färber <afaerber@suse.de>2013-07-06 03:14:52 +0200
committerAndreas Färber <afaerber@suse.de>2013-07-23 02:41:31 +0200
commit577f42c0e11a5bfb462ff3a217701cd5c4356fb4 (patch)
treef2138e034bd6c8e8750a9e958702e4a5feeeb9d8 /include/qom
parent52f34623b499cb0273118b1f637c2c6ebaf5d5a1 (diff)
downloadqemu-577f42c0e11a5bfb462ff3a217701cd5c4356fb4.zip
cpu: Introduce vaddr type
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 <peter.maydell@linaro.org> Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'include/qom')
-rw-r--r--include/qom/cpu.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/qom/cpu.h b/include/qom/cpu.h
index dfd81a1d2f..829fd4554f 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