aboutsummaryrefslogtreecommitdiff
path: root/cpu-all.h
diff options
context:
space:
mode:
authorWen Congyang <wency@cn.fujitsu.com>2012-05-07 12:04:57 +0800
committerLuiz Capitulino <lcapitulino@redhat.com>2012-06-04 13:49:33 -0300
commitfae001f55190b4de511269ca63eb635646d1c7c9 (patch)
tree712885b5a45e6b20d48f1acfa37a1baa23cafe8f /cpu-all.h
parent76f3553883b868e99c78212b9d12309e8e1e5d81 (diff)
implement cpu_get_memory_mapping()
Walk cpu's page table and collect all virtual address and physical address mapping. Then, add these mapping into memory mapping list. If the guest does not use paging, it will do nothing. Note: the I/O memory will be skipped. Signed-off-by: Wen Congyang <wency@cn.fujitsu.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Diffstat (limited to 'cpu-all.h')
-rw-r--r--cpu-all.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/cpu-all.h b/cpu-all.h
index 028528f0be..2688baca8c 100644
--- a/cpu-all.h
+++ b/cpu-all.h
@@ -22,6 +22,7 @@
#include "qemu-common.h"
#include "qemu-tls.h"
#include "cpu-common.h"
+#include "memory_mapping.h"
/* some important defines:
*
@@ -524,4 +525,14 @@ void dump_exec_info(FILE *f, fprintf_function cpu_fprintf);
int cpu_memory_rw_debug(CPUArchState *env, target_ulong addr,
uint8_t *buf, int len, int is_write);
+#if defined(CONFIG_HAVE_GET_MEMORY_MAPPING)
+int cpu_get_memory_mapping(MemoryMappingList *list, CPUArchState *env);
+#else
+static inline int cpu_get_memory_mapping(MemoryMappingList *list,
+ CPUArchState *env)
+{
+ return -1;
+}
+#endif
+
#endif /* CPU_ALL_H */