]> Git Repo - qemu.git/commitdiff
migration: Move postcopy-ram.h to migration/
authorJuan Quintela <[email protected]>
Thu, 20 Apr 2017 11:12:24 +0000 (13:12 +0200)
committerJuan Quintela <[email protected]>
Thu, 4 May 2017 08:40:30 +0000 (10:40 +0200)
It is internal to migration, not intended for other users.

Signed-off-by: Juan Quintela <[email protected]>
Reviewed-by: Dr. David Alan Gilbert <[email protected]>
include/migration/postcopy-ram.h [deleted file]
migration/migration.c
migration/postcopy-ram.c
migration/postcopy-ram.h [new file with mode: 0644]
migration/ram.c
migration/savevm.c

diff --git a/include/migration/postcopy-ram.h b/include/migration/postcopy-ram.h
deleted file mode 100644 (file)
index 4c25f03..0000000
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * Postcopy migration for RAM
- *
- * Copyright 2013 Red Hat, Inc. and/or its affiliates
- *
- * Authors:
- *  Dave Gilbert  <[email protected]>
- *
- * This work is licensed under the terms of the GNU GPL, version 2 or later.
- * See the COPYING file in the top-level directory.
- *
- */
-#ifndef QEMU_POSTCOPY_RAM_H
-#define QEMU_POSTCOPY_RAM_H
-
-/* Return true if the host supports everything we need to do postcopy-ram */
-bool postcopy_ram_supported_by_host(void);
-
-/*
- * Make all of RAM sensitive to accesses to areas that haven't yet been written
- * and wire up anything necessary to deal with it.
- */
-int postcopy_ram_enable_notify(MigrationIncomingState *mis);
-
-/*
- * Initialise postcopy-ram, setting the RAM to a state where we can go into
- * postcopy later; must be called prior to any precopy.
- * called from ram.c's similarly named ram_postcopy_incoming_init
- */
-int postcopy_ram_incoming_init(MigrationIncomingState *mis, size_t ram_pages);
-
-/*
- * At the end of a migration where postcopy_ram_incoming_init was called.
- */
-int postcopy_ram_incoming_cleanup(MigrationIncomingState *mis);
-
-/*
- * Userfault requires us to mark RAM as NOHUGEPAGE prior to discard
- * however leaving it until after precopy means that most of the precopy
- * data is still THPd
- */
-int postcopy_ram_prepare_discard(MigrationIncomingState *mis);
-
-/*
- * Called at the start of each RAMBlock by the bitmap code.
- * Returns a new PDS
- */
-PostcopyDiscardState *postcopy_discard_send_init(MigrationState *ms,
-                                                 const char *name);
-
-/*
- * Called by the bitmap code for each chunk to discard.
- * May send a discard message, may just leave it queued to
- * be sent later.
- * @start,@length: a range of pages in the migration bitmap in the
- *  RAM block passed to postcopy_discard_send_init() (length=1 is one page)
- */
-void postcopy_discard_send_range(MigrationState *ms, PostcopyDiscardState *pds,
-                                 unsigned long start, unsigned long length);
-
-/*
- * Called at the end of each RAMBlock by the bitmap code.
- * Sends any outstanding discard messages, frees the PDS.
- */
-void postcopy_discard_send_finish(MigrationState *ms,
-                                  PostcopyDiscardState *pds);
-
-/*
- * Place a page (from) at (host) efficiently
- *    There are restrictions on how 'from' must be mapped, in general best
- *    to use other postcopy_ routines to allocate.
- * returns 0 on success
- */
-int postcopy_place_page(MigrationIncomingState *mis, void *host, void *from,
-                        size_t pagesize);
-
-/*
- * Place a zero page at (host) atomically
- * returns 0 on success
- */
-int postcopy_place_page_zero(MigrationIncomingState *mis, void *host,
-                             size_t pagesize);
-
-/*
- * Allocate a page of memory that can be mapped at a later point in time
- * using postcopy_place_page
- * Returns: Pointer to allocated page
- */
-void *postcopy_get_tmp_page(MigrationIncomingState *mis);
-
-#endif
index 353f2728cf737eeeb750d5be99f8c380bfcf41f2..799952ce99a41ba2e13d9da30616394fc366238e 100644 (file)
@@ -26,7 +26,7 @@
 #include "qemu/sockets.h"
 #include "qemu/rcu.h"
 #include "migration/block.h"
-#include "migration/postcopy-ram.h"
+#include "postcopy-ram.h"
 #include "qemu/thread.h"
 #include "qmp-commands.h"
 #include "trace.h"
index e3f4a37b46b9c9a49096ea3eb28108a7d9d347a7..cdadaf65784a424bca22f535de2f3550f5d6aeb3 100644 (file)
@@ -20,7 +20,7 @@
 
 #include "qemu-common.h"
 #include "migration/migration.h"
-#include "migration/postcopy-ram.h"
+#include "postcopy-ram.h"
 #include "sysemu/sysemu.h"
 #include "sysemu/balloon.h"
 #include "qemu/error-report.h"
diff --git a/migration/postcopy-ram.h b/migration/postcopy-ram.h
new file mode 100644 (file)
index 0000000..4c25f03
--- /dev/null
@@ -0,0 +1,91 @@
+/*
+ * Postcopy migration for RAM
+ *
+ * Copyright 2013 Red Hat, Inc. and/or its affiliates
+ *
+ * Authors:
+ *  Dave Gilbert  <[email protected]>
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2 or later.
+ * See the COPYING file in the top-level directory.
+ *
+ */
+#ifndef QEMU_POSTCOPY_RAM_H
+#define QEMU_POSTCOPY_RAM_H
+
+/* Return true if the host supports everything we need to do postcopy-ram */
+bool postcopy_ram_supported_by_host(void);
+
+/*
+ * Make all of RAM sensitive to accesses to areas that haven't yet been written
+ * and wire up anything necessary to deal with it.
+ */
+int postcopy_ram_enable_notify(MigrationIncomingState *mis);
+
+/*
+ * Initialise postcopy-ram, setting the RAM to a state where we can go into
+ * postcopy later; must be called prior to any precopy.
+ * called from ram.c's similarly named ram_postcopy_incoming_init
+ */
+int postcopy_ram_incoming_init(MigrationIncomingState *mis, size_t ram_pages);
+
+/*
+ * At the end of a migration where postcopy_ram_incoming_init was called.
+ */
+int postcopy_ram_incoming_cleanup(MigrationIncomingState *mis);
+
+/*
+ * Userfault requires us to mark RAM as NOHUGEPAGE prior to discard
+ * however leaving it until after precopy means that most of the precopy
+ * data is still THPd
+ */
+int postcopy_ram_prepare_discard(MigrationIncomingState *mis);
+
+/*
+ * Called at the start of each RAMBlock by the bitmap code.
+ * Returns a new PDS
+ */
+PostcopyDiscardState *postcopy_discard_send_init(MigrationState *ms,
+                                                 const char *name);
+
+/*
+ * Called by the bitmap code for each chunk to discard.
+ * May send a discard message, may just leave it queued to
+ * be sent later.
+ * @start,@length: a range of pages in the migration bitmap in the
+ *  RAM block passed to postcopy_discard_send_init() (length=1 is one page)
+ */
+void postcopy_discard_send_range(MigrationState *ms, PostcopyDiscardState *pds,
+                                 unsigned long start, unsigned long length);
+
+/*
+ * Called at the end of each RAMBlock by the bitmap code.
+ * Sends any outstanding discard messages, frees the PDS.
+ */
+void postcopy_discard_send_finish(MigrationState *ms,
+                                  PostcopyDiscardState *pds);
+
+/*
+ * Place a page (from) at (host) efficiently
+ *    There are restrictions on how 'from' must be mapped, in general best
+ *    to use other postcopy_ routines to allocate.
+ * returns 0 on success
+ */
+int postcopy_place_page(MigrationIncomingState *mis, void *host, void *from,
+                        size_t pagesize);
+
+/*
+ * Place a zero page at (host) atomically
+ * returns 0 on success
+ */
+int postcopy_place_page_zero(MigrationIncomingState *mis, void *host,
+                             size_t pagesize);
+
+/*
+ * Allocate a page of memory that can be mapped at a later point in time
+ * using postcopy_place_page
+ * Returns: Pointer to allocated page
+ */
+void *postcopy_get_tmp_page(MigrationIncomingState *mis);
+
+#endif
index 1f03469c1368d83ec313847063f9ef2deee30b47..4918c115761a2eb8f3fb2004c7b7e507958845cc 100644 (file)
@@ -36,7 +36,7 @@
 #include "qemu/timer.h"
 #include "qemu/main-loop.h"
 #include "migration/migration.h"
-#include "migration/postcopy-ram.h"
+#include "postcopy-ram.h"
 #include "exec/address-spaces.h"
 #include "migration/page_cache.h"
 #include "qemu/error-report.h"
index ff78a8948dd3bd167282307a3e6215d5cb771056..7668510cfc13585b78f3ec95844ce3950f16d299 100644 (file)
@@ -36,7 +36,7 @@
 #include "sysemu/sysemu.h"
 #include "qemu/timer.h"
 #include "migration/migration.h"
-#include "migration/postcopy-ram.h"
+#include "postcopy-ram.h"
 #include "qapi/qmp/qerror.h"
 #include "qemu/error-report.h"
 #include "qemu/queue.h"
This page took 0.038533 seconds and 4 git commands to generate.