mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
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>
This commit is contained in:
parent
76f3553883
commit
fae001f551
5 changed files with 288 additions and 0 deletions
11
cpu-all.h
11
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 */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue