From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59249) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZMGkN-0002TX-MH for qemu-devel@nongnu.org; Mon, 03 Aug 2015 10:29:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZMGkJ-0007d1-9S for qemu-devel@nongnu.org; Mon, 03 Aug 2015 10:29:47 -0400 Received: from smtp.citrix.com ([66.165.176.89]:33963) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZMGkJ-0007cK-3B for qemu-devel@nongnu.org; Mon, 03 Aug 2015 10:29:43 -0400 From: Anthony PERARD Date: Mon, 3 Aug 2015 15:29:21 +0100 Message-ID: <1438612161-15822-4-git-send-email-anthony.perard@citrix.com> In-Reply-To: <1438612161-15822-1-git-send-email-anthony.perard@citrix.com> References: <1438612161-15822-1-git-send-email-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Type: text/plain Subject: [Qemu-devel] [PATCH for-2.4 v3 3/3] migration: Fix regression for xenfv and pc, accel=xen machine. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: QEMU-devel Cc: Amit Shah , Anthony PERARD , Juan Quintela , Stefano Stabellini , Xen Devel This fix migration from the same QEMU version and from previous QEMU version. >>From the global state section, we don't need runstate with Xen. Right now, the way the Xen toolstack knows when QEMU is ready is when QEMU reach "running" runstate. The configuration section and the section footers are not going to be present in previous version of QEMU with xenfv machine, so we skip them. The Xen toolstack libxenlight does not specify a particular version of the 'pc' machine, so migration from older version of QEMU used by Xen to newer one would break due to missing "configuration" section and section footers. Signed-off-by: Anthony PERARD --- xen-common.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/xen-common.c b/xen-common.c index 56359ca..0dcdbc3 100644 --- a/xen-common.c +++ b/xen-common.c @@ -12,6 +12,7 @@ #include "qmp-commands.h" #include "sysemu/char.h" #include "sysemu/accel.h" +#include "migration/migration.h" //#define DEBUG_XEN @@ -119,6 +120,10 @@ static int xen_init(MachineState *ms) } qemu_add_vm_change_state_handler(xen_change_state_handler, NULL); + global_state_set_optional(); + savevm_skip_configuration(); + savevm_skip_section_footers(); + return 0; } -- Anthony PERARD