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>
This commit is contained in:
Laszlo Ersek 2013-08-06 12:37:09 +02:00 committed by Luiz Capitulino
parent 2cac260768
commit 5ee163e8ea
3 changed files with 65 additions and 19 deletions

View file

@ -165,6 +165,23 @@ void memory_mapping_list_init(MemoryMappingList *list)
QTAILQ_INIT(&list->head);
}
void guest_phys_blocks_free(GuestPhysBlockList *list)
{
GuestPhysBlock *p, *q;
QTAILQ_FOREACH_SAFE(p, &list->head, next, q) {
QTAILQ_REMOVE(&list->head, p, next);
g_free(p);
}
list->num = 0;
}
void guest_phys_blocks_init(GuestPhysBlockList *list)
{
list->num = 0;
QTAILQ_INIT(&list->head);
}
static CPUState *find_paging_enabled_cpu(CPUState *start_cpu)
{
CPUState *cpu;