ae23c9
From 66e37a444b4b4818957dabadcc4580f1877e4ebb Mon Sep 17 00:00:00 2001
ae23c9
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
ae23c9
Date: Mon, 1 Oct 2018 10:54:48 +0100
ae23c9
Subject: [PATCH 02/28] migration/postcopy: Clear have_listen_thread
ae23c9
ae23c9
RH-Author: Dr. David Alan Gilbert <dgilbert@redhat.com>
ae23c9
Message-id: <20181001105449.41090-2-dgilbert@redhat.com>
ae23c9
Patchwork-id: 82326
ae23c9
O-Subject: [RHEL-8.0 qemu-kvm PATCH 1/2] migration/postcopy: Clear have_listen_thread
ae23c9
Bugzilla: 1608765
ae23c9
RH-Acked-by: Pankaj Gupta <pagupta@redhat.com>
ae23c9
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
ae23c9
RH-Acked-by: Laurent Vivier <lvivier@redhat.com>
ae23c9
ae23c9
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
ae23c9
ae23c9
Clear have_listen_thread when we exit the thread.
ae23c9
The fallout from this was that various things thought there was
ae23c9
an ongoing postcopy after the postcopy had finished.
ae23c9
ae23c9
The case that failed was postcopy->savevm->loadvm.
ae23c9
ae23c9
This corresponds to RH bug https://bugzilla.redhat.com/show_bug.cgi?id=1608765
ae23c9
ae23c9
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
ae23c9
Message-Id: <20180914170430.54271-2-dgilbert@redhat.com>
ae23c9
Reviewed-by: Peter Xu <peterx@redhat.com>
ae23c9
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
ae23c9
(cherry picked from commit 9cf4bb8730c669c40550e635a9e2b8ee4f1664ca)
ae23c9
  Manual merge due to context
ae23c9
ae23c9
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
ae23c9
---
ae23c9
 migration/savevm.c | 1 +
ae23c9
 1 file changed, 1 insertion(+)
ae23c9
ae23c9
diff --git a/migration/savevm.c b/migration/savevm.c
ae23c9
index 6c539d1..6a8d363 100644
ae23c9
--- a/migration/savevm.c
ae23c9
+++ b/migration/savevm.c
ae23c9
@@ -1620,6 +1620,7 @@ static void *postcopy_ram_listen_thread(void *opaque)
ae23c9
     migration_incoming_state_destroy();
ae23c9
     qemu_loadvm_state_cleanup();
ae23c9
 
ae23c9
+    mis->have_listen_thread = false;
ae23c9
     return NULL;
ae23c9
 }
ae23c9
 
ae23c9
-- 
ae23c9
1.8.3.1
ae23c9