[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v3 28/35] arch_init: factor out setting last_block,
From: |
Isaku Yamahata |
Subject: |
[Qemu-devel] [PATCH v3 28/35] arch_init: factor out setting last_block, last_offset |
Date: |
Tue, 30 Oct 2012 17:33:04 +0900 |
Signed-off-by: Isaku Yamahata <address@hidden>
---
arch_init.c | 10 +++++++---
arch_init.h | 1 +
2 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/arch_init.c b/arch_init.c
index d95ce7b..9137013 100644
--- a/arch_init.c
+++ b/arch_init.c
@@ -416,6 +416,12 @@ static void migration_bitmap_sync(void)
static uint64_t bytes_transferred;
+void ram_save_set_last_block(RAMBlock *block, ram_addr_t offset)
+{
+ last_block = block;
+ last_offset = offset;
+}
+
/*
* ram_save_page: Writes a page of memory to the stream f
*
@@ -496,9 +502,7 @@ bool ram_save_block(QEMUFile *f, bool last_stage)
}
} while (block != last_block || offset != last_offset);
- last_block = block;
- last_offset = offset;
-
+ ram_save_set_last_block(block, offset);
return wrote;
}
diff --git a/arch_init.h b/arch_init.h
index 499d0f1..9165456 100644
--- a/arch_init.h
+++ b/arch_init.h
@@ -49,6 +49,7 @@ CpuDefinitionInfoList GCC_WEAK_DECL
*arch_query_cpu_definitions(Error **errp);
int ram_load_page(QEMUFile *f, void *host, int flags);
#if defined(NEED_CPU_H) && !defined(CONFIG_USER_ONLY)
+void ram_save_set_last_block(RAMBlock *block, ram_addr_t offset);
bool ram_save_page(QEMUFile *f, RAMBlock *block, ram_addr_t offset,
bool last_stage);
RAMBlock *ram_find_block(const char *id, uint8_t len);
--
1.7.10.4
- [Qemu-devel] [PATCH v3 01/35] migration.c: remove redundant line in migrate_init(), (continued)
- [Qemu-devel] [PATCH v3 01/35] migration.c: remove redundant line in migrate_init(), Isaku Yamahata, 2012/10/30
- [Qemu-devel] [PATCH v3 14/35] arch_init: refactor ram_save_block() and export ram_save_block(), Isaku Yamahata, 2012/10/30
- [Qemu-devel] [PATCH v3 11/35] savevm, buffered_file: introduce method to drain buffer of buffered file, Isaku Yamahata, 2012/10/30
- [Qemu-devel] [PATCH v3 33/35] arch_init: export migration_bitmap_sync and helper method to get bitmap, Isaku Yamahata, 2012/10/30
- [Qemu-devel] [PATCH v3 29/35] postcopy/outgoing: add movebg mode(-m) to migration command, Isaku Yamahata, 2012/10/30
- [Qemu-devel] [PATCH v3 24/35] postcopy outgoing: add -p option to migrate command, Isaku Yamahata, 2012/10/30
- [Qemu-devel] [PATCH v3 07/35] savevm: export qemu_peek_buffer, qemu_peek_byte, qemu_file_skip, qemu_fflush, Isaku Yamahata, 2012/10/30
- [Qemu-devel] [PATCH v3 15/35] arch_init/ram_save_setup: factor out bitmap alloc/free, Isaku Yamahata, 2012/10/30
- [Qemu-devel] [PATCH v3 19/35] uvmem.h: import Linux uvmem.h and teach update-linux-headers.sh, Isaku Yamahata, 2012/10/30
- [Qemu-devel] [PATCH v3 31/35] arch_init: export ram_save_iterate(), Isaku Yamahata, 2012/10/30
- [Qemu-devel] [PATCH v3 28/35] arch_init: factor out setting last_block, last_offset,
Isaku Yamahata <=
- [Qemu-devel] [PATCH v3 17/35] arch_init: factor out logic to find ram block with id string, Isaku Yamahata, 2012/10/30
- [Qemu-devel] [PATCH v3 18/35] migration: export migrate_fd_completed() and migrate_fd_cleanup(), Isaku Yamahata, 2012/10/30
- [Qemu-devel] [PATCH v3 34/35] postcopy/outgoing: introduce precopy_count parameter, Isaku Yamahata, 2012/10/30
- [Qemu-devel] [PATCH v3 16/35] arch_init/ram_load: refactor ram_load, Isaku Yamahata, 2012/10/30
- [Qemu-devel] [PATCH v3 13/35] arch_init/ram_save: introduce constant for ram save version = 4, Isaku Yamahata, 2012/10/30
- [Qemu-devel] [PATCH v3 30/35] arch_init: factor out ram_load, Isaku Yamahata, 2012/10/30
- [Qemu-devel] [PATCH v3 22/35] savevm: add new section that is used by postcopy, Isaku Yamahata, 2012/10/30
- [Qemu-devel] [PATCH v3 32/35] postcopy: pre+post optimization incoming side, Isaku Yamahata, 2012/10/30
- [Qemu-devel] [PATCH v3 21/35] postcopy: introduce helper functions for postcopy, Isaku Yamahata, 2012/10/30
- [Qemu-devel] [PATCH v3 35/35] postcopy: pre+post optimization outgoing side, Isaku Yamahata, 2012/10/30