mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 07:13: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
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue