diff options
author | Wen Congyang <wency@cn.fujitsu.com> | 2012-05-07 12:04:57 +0800 |
---|---|---|
committer | Luiz Capitulino <lcapitulino@redhat.com> | 2012-06-04 13:49:33 -0300 |
commit | fae001f55190b4de511269ca63eb635646d1c7c9 (patch) | |
tree | 712885b5a45e6b20d48f1acfa37a1baa23cafe8f /cpu-all.h | |
parent | 76f3553883b868e99c78212b9d12309e8e1e5d81 (diff) | |
download | qemu-fae001f55190b4de511269ca63eb635646d1c7c9.tar.gz qemu-fae001f55190b4de511269ca63eb635646d1c7c9.tar.bz2 qemu-fae001f55190b4de511269ca63eb635646d1c7c9.zip |
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.h | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -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 */ |