aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2017-09-22 14:04:10 +0100
committerPeter Maydell <peter.maydell@linaro.org>2017-09-22 14:04:10 +0100
commitbef81b3eb521f2825d85b8ddf246c81a28dcef35 (patch)
tree1d75795c73f05daa4d58fa12b6b81ccdba530754 /include
parent159a9df02127cbf6fe640f67954794a99a12a005 (diff)
parent54ae0886b12c4934e84381af777d4df6147cc2ec (diff)
downloadqemu-bef81b3eb521f2825d85b8ddf246c81a28dcef35.zip
qemu-bef81b3eb521f2825d85b8ddf246c81a28dcef35.tar.gz
qemu-bef81b3eb521f2825d85b8ddf246c81a28dcef35.tar.bz2
Merge remote-tracking branch 'remotes/juanquintela/tags/migration/20170922-1' into staging
migration/next for 20170922 # gpg: Signature made Fri 22 Sep 2017 13:15:06 BST # gpg: using RSA key 0xF487EF185872D723 # gpg: Good signature from "Juan Quintela <quintela@redhat.com>" # gpg: aka "Juan Quintela <quintela@trasno.org>" # Primary key fingerprint: 1899 FF8E DEBF 58CC EE03 4B82 F487 EF18 5872 D723 * remotes/juanquintela/tags/migration/20170922-1: migration: split ufd_version_check onto receive/request features part migration: fix hardcoded function name in error report migration: pass MigrationIncomingState* into migration check functions migration: split common postcopy out of ram postcopy migration: fix ram_save_pending migration: add has_postcopy savevm handler bitmap: provide to_le/from_le helpers bitmap: introduce bitmap_count_one() bitmap: remove BITOP_WORD() migration: Split migration_fd_process_incoming migration: Create multifd migration threads migration: Create x-multifd-page-count parameter migration: Create x-multifd-channels parameter migration: Add multifd capability migration: Create migration_has_all_channels migration: Add comments to channel functions migration: Teach it about G_SOURCE_REMOVE migration: Create migration_ioc_process_incoming() Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'include')
-rw-r--r--include/glib-compat.h2
-rw-r--r--include/migration/register.h1
-rw-r--r--include/qemu/bitmap.h17
3 files changed, 20 insertions, 0 deletions
diff --git a/include/glib-compat.h b/include/glib-compat.h
index fcffcd3..e15aca2 100644
--- a/include/glib-compat.h
+++ b/include/glib-compat.h
@@ -223,6 +223,8 @@ static inline gboolean g_hash_table_contains(GHashTable *hash_table,
{
return g_hash_table_lookup_extended(hash_table, key, NULL, NULL);
}
+#define G_SOURCE_CONTINUE TRUE
+#define G_SOURCE_REMOVE FALSE
#endif
#ifndef g_assert_true
diff --git a/include/migration/register.h b/include/migration/register.h
index a0f1edd..f4f7bdc 100644
--- a/include/migration/register.h
+++ b/include/migration/register.h
@@ -24,6 +24,7 @@ typedef struct SaveVMHandlers {
/* This runs both outside and inside the iothread lock. */
bool (*is_active)(void *opaque);
+ bool (*has_postcopy)(void *opaque);
/* This runs outside the iothread lock in the migration case, and
* within the lock in the savevm case. The callback had better only
diff --git a/include/qemu/bitmap.h b/include/qemu/bitmap.h
index c318da1..509eedd 100644
--- a/include/qemu/bitmap.h
+++ b/include/qemu/bitmap.h
@@ -39,6 +39,8 @@
* bitmap_clear(dst, pos, nbits) Clear specified bit area
* bitmap_test_and_clear_atomic(dst, pos, nbits) Test and clear area
* bitmap_find_next_zero_area(buf, len, pos, n, mask) Find bit free area
+ * bitmap_to_le(dst, src, nbits) Convert bitmap to little endian
+ * bitmap_from_le(dst, src, nbits) Convert bitmap from little endian
*/
/*
@@ -82,6 +84,7 @@ int slow_bitmap_andnot(unsigned long *dst, const unsigned long *bitmap1,
const unsigned long *bitmap2, long bits);
int slow_bitmap_intersects(const unsigned long *bitmap1,
const unsigned long *bitmap2, long bits);
+long slow_bitmap_count_one(const unsigned long *bitmap, long nbits);
static inline unsigned long *bitmap_try_new(long nbits)
{
@@ -216,6 +219,15 @@ static inline int bitmap_intersects(const unsigned long *src1,
}
}
+static inline long bitmap_count_one(const unsigned long *bitmap, long nbits)
+{
+ if (small_nbits(nbits)) {
+ return ctpopl(*bitmap & BITMAP_LAST_WORD_MASK(nbits));
+ } else {
+ return slow_bitmap_count_one(bitmap, nbits);
+ }
+}
+
void bitmap_set(unsigned long *map, long i, long len);
void bitmap_set_atomic(unsigned long *map, long i, long len);
void bitmap_clear(unsigned long *map, long start, long nr);
@@ -237,4 +249,9 @@ static inline unsigned long *bitmap_zero_extend(unsigned long *old,
return new;
}
+void bitmap_to_le(unsigned long *dst, const unsigned long *src,
+ long nbits);
+void bitmap_from_le(unsigned long *dst, const unsigned long *src,
+ long nbits);
+
#endif /* BITMAP_H */