Lines Matching full:list

25 static void memory_mapping_list_add_mapping_sorted(MemoryMappingList *list,  in memory_mapping_list_add_mapping_sorted()  argument
30 QTAILQ_FOREACH(p, &list->head, next) { in memory_mapping_list_add_mapping_sorted()
36 QTAILQ_INSERT_TAIL(&list->head, mapping, next); in memory_mapping_list_add_mapping_sorted()
39 static void create_new_memory_mapping(MemoryMappingList *list, in create_new_memory_mapping() argument
50 list->last_mapping = memory_mapping; in create_new_memory_mapping()
51 list->num++; in create_new_memory_mapping()
52 memory_mapping_list_add_mapping_sorted(list, memory_mapping); in create_new_memory_mapping()
107 void memory_mapping_list_add_merge_sorted(MemoryMappingList *list, in memory_mapping_list_add_merge_sorted() argument
114 if (QTAILQ_EMPTY(&list->head)) { in memory_mapping_list_add_merge_sorted()
115 create_new_memory_mapping(list, phys_addr, virt_addr, length); in memory_mapping_list_add_merge_sorted()
119 last_mapping = list->last_mapping; in memory_mapping_list_add_merge_sorted()
127 QTAILQ_FOREACH(memory_mapping, &list->head, next) { in memory_mapping_list_add_merge_sorted()
130 list->last_mapping = memory_mapping; in memory_mapping_list_add_merge_sorted()
146 list->last_mapping = memory_mapping; in memory_mapping_list_add_merge_sorted()
152 create_new_memory_mapping(list, phys_addr, virt_addr, length); in memory_mapping_list_add_merge_sorted()
155 void memory_mapping_list_free(MemoryMappingList *list) in memory_mapping_list_free() argument
159 QTAILQ_FOREACH_SAFE(p, &list->head, next, q) { in memory_mapping_list_free()
160 QTAILQ_REMOVE(&list->head, p, next); in memory_mapping_list_free()
164 list->num = 0; in memory_mapping_list_free()
165 list->last_mapping = NULL; in memory_mapping_list_free()
168 void memory_mapping_list_init(MemoryMappingList *list) in memory_mapping_list_init() argument
170 list->num = 0; in memory_mapping_list_init()
171 list->last_mapping = NULL; in memory_mapping_list_init()
172 QTAILQ_INIT(&list->head); in memory_mapping_list_init()
175 void guest_phys_blocks_free(GuestPhysBlockList *list) in guest_phys_blocks_free() argument
179 QTAILQ_FOREACH_SAFE(p, &list->head, next, q) { in guest_phys_blocks_free()
180 QTAILQ_REMOVE(&list->head, p, next); in guest_phys_blocks_free()
184 list->num = 0; in guest_phys_blocks_free()
187 void guest_phys_blocks_init(GuestPhysBlockList *list) in guest_phys_blocks_init() argument
189 list->num = 0; in guest_phys_blocks_init()
190 QTAILQ_INIT(&list->head); in guest_phys_blocks_init()
194 GuestPhysBlockList *list; member
208 if (!QTAILQ_EMPTY(&g->list->head)) { in guest_phys_block_add_section()
211 predecessor = QTAILQ_LAST(&g->list->head); in guest_phys_block_add_section()
226 /* isolated mapping, allocate it and add it to the list */ in guest_phys_block_add_section()
235 QTAILQ_INSERT_TAIL(&g->list->head, block, next); in guest_phys_block_add_section()
236 ++g->list->num; in guest_phys_block_add_section()
247 target_end, predecessor ? "joined" : "added", g->list->num); in guest_phys_block_add_section()
285 void guest_phys_blocks_append(GuestPhysBlockList *list) in guest_phys_blocks_append() argument
289 g.list = list; in guest_phys_blocks_append()
308 bool qemu_get_guest_memory_mapping(MemoryMappingList *list, in qemu_get_guest_memory_mapping() argument
321 if (!cpu_get_memory_mapping(cpu, list, errp)) { in qemu_get_guest_memory_mapping()
335 create_new_memory_mapping(list, offset, offset, length); in qemu_get_guest_memory_mapping()
340 void qemu_get_guest_simple_memory_mapping(MemoryMappingList *list, in qemu_get_guest_simple_memory_mapping() argument
346 create_new_memory_mapping(list, block->target_start, 0, in qemu_get_guest_simple_memory_mapping()
351 void memory_mapping_filter(MemoryMappingList *list, int64_t begin, in memory_mapping_filter() argument
356 QTAILQ_FOREACH_SAFE(cur, &list->head, next, next) { in memory_mapping_filter()
358 QTAILQ_REMOVE(&list->head, cur, next); in memory_mapping_filter()
360 list->num--; in memory_mapping_filter()