Lines Matching refs:block
116 RAMBlock *block = last_block;
121 if (!block)
122 block = QLIST_FIRST(&ram_list.blocks);
124 current_addr = block->offset + offset;
129 int cont = (block == last_block) ? RAM_SAVE_FLAG_CONTINUE : 0;
135 p = block->host + offset;
140 qemu_put_byte(f, strlen(block->idstr));
141 qemu_put_buffer(f, (uint8_t *)block->idstr,
142 strlen(block->idstr));
149 qemu_put_byte(f, strlen(block->idstr));
150 qemu_put_buffer(f, (uint8_t *)block->idstr,
151 strlen(block->idstr));
161 if (offset >= block->length) {
163 block = QLIST_NEXT(block, next);
164 if (!block)
165 block = QLIST_FIRST(&ram_list.blocks);
168 current_addr = block->offset + offset;
172 last_block = block;
182 RAMBlock *block;
185 QLIST_FOREACH(block, &ram_list.blocks, next) {
187 for (addr = block->offset; addr < block->offset + block->length;
210 RAMBlock *block;
213 QLIST_FOREACH(block, &ram_list.blocks, next)
214 total += block->length;
233 RAMBlock *block, *nblock, **blocks;
236 QLIST_FOREACH(block, &ram_list.blocks, next) {
241 QLIST_FOREACH_SAFE(block, &ram_list.blocks, next, nblock) {
242 blocks[n++] = block;
243 QLIST_REMOVE(block, next);
270 RAMBlock *block;
277 QLIST_FOREACH(block, &ram_list.blocks, next) {
278 for (addr = block->offset; addr < block->offset + block->length;
292 QLIST_FOREACH(block, &ram_list.blocks, next) {
293 qemu_put_byte(f, strlen(block->idstr));
294 qemu_put_buffer(f, (uint8_t *)block->idstr, strlen(block->idstr));
295 qemu_put_be64(f, block->length);
343 static RAMBlock *block = NULL;
348 if (!block) {
353 return block->host + offset;
360 QLIST_FOREACH(block, &ram_list.blocks, next) {
361 if (!strncmp(id, block->idstr, sizeof(id)))
362 return block->host + offset;
365 fprintf(stderr, "Can't find block %s!\n", id);
390 /* Synchronize RAM block list */
396 RAMBlock *block;
404 QLIST_FOREACH(block, &ram_list.blocks, next) {
405 if (!strncmp(id, block->idstr, sizeof(id))) {
406 if (block->length != length)
412 if (!block) {