summaryrefslogtreecommitdiff
path: root/memory_mapping.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 /memory_mapping.h
parent76f3553883b868e99c78212b9d12309e8e1e5d81 (diff)
downloadqemu-fae001f55190b4de511269ca63eb635646d1c7c9.tar.gz
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 'memory_mapping.h')
-rw-r--r--memory_mapping.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/memory_mapping.h b/memory_mapping.h
index 836b0472b6..e486d1056e 100644
--- a/memory_mapping.h
+++ b/memory_mapping.h
@@ -16,6 +16,7 @@
#include "qemu-queue.h"
+#ifndef CONFIG_USER_ONLY
/* The physical and virtual address in the memory mapping are contiguous. */
typedef struct MemoryMapping {
target_phys_addr_t phys_addr;
@@ -44,4 +45,9 @@ void memory_mapping_list_free(MemoryMappingList *list);
void memory_mapping_list_init(MemoryMappingList *list);
+#else
+
+/* We use MemoryMappingList* in cpu-all.h */
+typedef struct MemoryMappingList MemoryMappingList;
+#endif
#endif