aboutsummaryrefslogtreecommitdiff
path: root/migration/savevm.c
diff options
context:
space:
mode:
authorDr. David Alan Gilbert <dgilbert@redhat.com>2015-11-05 18:10:55 +0000
committerJuan Quintela <quintela@redhat.com>2015-11-10 15:00:26 +0100
commiteb59db53a4f23420f127ec7aad2a672f787df697 (patch)
treee186e3bf3fdea54ee6f705f3050dfca4cb5b07ba /migration/savevm.c
parentc31b098f64c5bbbc26350b9b5cf98ae2d2888de7 (diff)
postcopy: OS support test
Provide a check to see if the OS we're running on has all the bits needed for postcopy. Creates postcopy-ram.c which will get most of the other helpers we need. Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Amit Shah <amit.shah@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
Diffstat (limited to 'migration/savevm.c')
-rw-r--r--migration/savevm.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/migration/savevm.c b/migration/savevm.c
index 7467dc0e7b..0e48a919e9 100644
--- a/migration/savevm.c
+++ b/migration/savevm.c
@@ -37,6 +37,7 @@
#include "qemu/timer.h"
#include "audio/audio.h"
#include "migration/migration.h"
+#include "migration/postcopy-ram.h"
#include "qapi/qmp/qerror.h"
#include "qemu/error-report.h"
#include "qemu/sockets.h"
@@ -1205,6 +1206,10 @@ static int loadvm_postcopy_handle_advise(MigrationIncomingState *mis)
return -1;
}
+ if (!postcopy_ram_supported_by_host()) {
+ return -1;
+ }
+
remote_hps = qemu_get_be64(mis->from_src_file);
if (remote_hps != getpagesize()) {
/*