aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2016-02-05 14:20:46 +0000
committerPeter Maydell <peter.maydell@linaro.org>2016-02-05 14:20:46 +0000
commitee8e8f92a730afc17ab8be6e86df6b9a23b8ebc6 (patch)
tree1ed2c16f95bcc6d5268afde9ca2a8321930b47a6 /include
parentd38ea87ac54af64ef611de434d07c12dc0399216 (diff)
parent15d61692da651fc79b3fc40050b986c5a73055c0 (diff)
downloadqemu-ee8e8f92a730afc17ab8be6e86df6b9a23b8ebc6.zip
qemu-ee8e8f92a730afc17ab8be6e86df6b9a23b8ebc6.tar.gz
qemu-ee8e8f92a730afc17ab8be6e86df6b9a23b8ebc6.tar.bz2
Merge remote-tracking branch 'remotes/amit-migration/tags/migration-for-2.6-2' into staging
Migration pull req. Small fixes, nothing major. # gpg: Signature made Fri 05 Feb 2016 13:51:30 GMT using RSA key ID 854083B6 # gpg: Good signature from "Amit Shah <amit@amitshah.net>" # gpg: aka "Amit Shah <amit@kernel.org>" # gpg: aka "Amit Shah <amitshah@gmx.net>" * remotes/amit-migration/tags/migration-for-2.6-2: migration: fix bad string passed to error_report() static checker: e1000-82540em got aliased to e1000 migration: remove useless code. qmp-commands.hx: Document the missing options for migration capability commands qmp-commands.hx: Fix the missing options for migration parameters commands migration/ram: Fix some helper functions' parameter to use PageSearchStatus savevm: Split load vm state function qemu_loadvm_state migration: rename 'file' in MigrationState to 'to_dst_file' ram: Split host_from_stream_offset() into two helper functions Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'include')
-rw-r--r--include/exec/ram_addr.h8
-rw-r--r--include/migration/migration.h2
2 files changed, 7 insertions, 3 deletions
diff --git a/include/exec/ram_addr.h b/include/exec/ram_addr.h
index ef1489d..606e277 100644
--- a/include/exec/ram_addr.h
+++ b/include/exec/ram_addr.h
@@ -38,10 +38,14 @@ struct RAMBlock {
int fd;
};
+static inline bool offset_in_ramblock(RAMBlock *b, ram_addr_t offset)
+{
+ return (b && b->host && offset < b->used_length) ? true : false;
+}
+
static inline void *ramblock_ptr(RAMBlock *block, ram_addr_t offset)
{
- assert(offset < block->used_length);
- assert(block->host);
+ assert(offset_in_ramblock(block, offset));
return (char *)block->host + offset;
}
diff --git a/include/migration/migration.h b/include/migration/migration.h
index 0fc1ffa..74684ad 100644
--- a/include/migration/migration.h
+++ b/include/migration/migration.h
@@ -133,7 +133,7 @@ struct MigrationState
size_t xfer_limit;
QemuThread thread;
QEMUBH *cleanup_bh;
- QEMUFile *file;
+ QEMUFile *to_dst_file;
int parameters[MIGRATION_PARAMETER__MAX];
int state;