diff options
Diffstat (limited to 'memory_mapping.c')
-rw-r--r-- | memory_mapping.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/memory_mapping.c b/memory_mapping.c index 515a984e0d..c70505b7fa 100644 --- a/memory_mapping.c +++ b/memory_mapping.c @@ -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; |