diff options
author | Laszlo Ersek <lersek@redhat.com> | 2013-08-06 12:37:09 +0200 |
---|---|---|
committer | Luiz Capitulino <lcapitulino@redhat.com> | 2013-08-08 11:01:46 -0400 |
commit | 5ee163e8ea2fb6610339f494e039159e08a69066 (patch) | |
tree | 1920cb270da0408460aa213ee9c16286557cf7c8 /include | |
parent | 2cac260768b9d4253737417ea7501cf2950e257f (diff) | |
download | qemu-5ee163e8ea2fb6610339f494e039159e08a69066.tar.gz qemu-5ee163e8ea2fb6610339f494e039159e08a69066.tar.bz2 qemu-5ee163e8ea2fb6610339f494e039159e08a69066.zip |
dump: introduce GuestPhysBlockList
The vmcore must use physical addresses that are visible to the guest, not
addresses that point into linear RAMBlocks. As first step, introduce the
list type into which we'll collect the physical mappings in effect at the
time of the dump.
Related RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=981582
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/sysemu/memory_mapping.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/include/sysemu/memory_mapping.h b/include/sysemu/memory_mapping.h index 6dfb68ddcd..d2d06cdd54 100644 --- a/include/sysemu/memory_mapping.h +++ b/include/sysemu/memory_mapping.h @@ -17,6 +17,25 @@ #include "qemu/queue.h" #include "qemu/typedefs.h" +typedef struct GuestPhysBlock { + /* visible to guest, reflects PCI hole, etc */ + hwaddr target_start; + + /* implies size */ + hwaddr target_end; + + /* points into host memory */ + uint8_t *host_addr; + + QTAILQ_ENTRY(GuestPhysBlock) next; +} GuestPhysBlock; + +/* point-in-time snapshot of guest-visible physical mappings */ +typedef struct GuestPhysBlockList { + unsigned num; + QTAILQ_HEAD(GuestPhysBlockHead, GuestPhysBlock) head; +} GuestPhysBlockList; + /* The physical and virtual address in the memory mapping are contiguous. */ typedef struct MemoryMapping { hwaddr phys_addr; @@ -45,6 +64,9 @@ void memory_mapping_list_free(MemoryMappingList *list); void memory_mapping_list_init(MemoryMappingList *list); +void guest_phys_blocks_free(GuestPhysBlockList *list); +void guest_phys_blocks_init(GuestPhysBlockList *list); + void qemu_get_guest_memory_mapping(MemoryMappingList *list, Error **errp); /* get guest's memory mapping without do paging(virtual address is 0). */ |