From patchwork Thu Feb 12 03:16:53 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhanghailiang X-Patchwork-Id: 439045 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 6F54114012A for ; Thu, 12 Feb 2015 14:35:46 +1100 (AEDT) Received: from localhost ([::1]:48256 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YLkZ6-00070f-MS for incoming@patchwork.ozlabs.org; Wed, 11 Feb 2015 22:35:44 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36188) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YLkJK-0004QK-UG for qemu-devel@nongnu.org; Wed, 11 Feb 2015 22:19:31 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YLkJF-0005rv-MX for qemu-devel@nongnu.org; Wed, 11 Feb 2015 22:19:26 -0500 Received: from szxga03-in.huawei.com ([119.145.14.66]:44853) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YLkJF-0005rc-1O for qemu-devel@nongnu.org; Wed, 11 Feb 2015 22:19:21 -0500 Received: from 172.24.2.119 (EHLO szxeml427-hub.china.huawei.com) ([172.24.2.119]) by szxrg03-dlp.huawei.com (MOS 4.4.3-GA FastPath queued) with ESMTP id BBV26988; Thu, 12 Feb 2015 11:19:01 +0800 (CST) Received: from localhost (10.177.22.69) by szxeml427-hub.china.huawei.com (10.82.67.182) with Microsoft SMTP Server id 14.3.158.1; Thu, 12 Feb 2015 11:17:55 +0800 From: zhanghailiang To: Date: Thu, 12 Feb 2015 11:16:53 +0800 Message-ID: <1423711034-5340-7-git-send-email-zhang.zhanghailiang@huawei.com> X-Mailer: git-send-email 1.9.2.msysgit.0 In-Reply-To: <1423711034-5340-1-git-send-email-zhang.zhanghailiang@huawei.com> References: <1423711034-5340-1-git-send-email-zhang.zhanghailiang@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.177.22.69] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020206.54DC1BA5.0085, ss=1, re=0.001, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0, ip=0.0.0.0, so=2013-05-26 15:14:31, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 86fa77e47413607e86d8092675ae26a9 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 119.145.14.66 Cc: zhanghailiang , yunhong.jiang@intel.com, eddie.dong@intel.com, dgilbert@redhat.com, peter.huangpeng@huawei.com, stefanha@redhat.com, pbonzini@redhat.com, Yang Hongyang Subject: [Qemu-devel] [PATCH RFC v3 06/27] migration: Don't send vm description in COLO mode X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Commit 8118f09 add vm description to the end of migration stream, but in COLO mode, we use the migration channel to send control code, so the additional info been send will cause slave receive unexpect control msg, so just do not send vm description when migrate under COLO mode. Signed-off-by: zhanghailiang Signed-off-by: Yang Hongyang --- savevm.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/savevm.c b/savevm.c index 8040766..7d79a4b 100644 --- a/savevm.c +++ b/savevm.c @@ -782,9 +782,11 @@ void qemu_savevm_state_complete(QEMUFile *f) qjson_finish(vmdesc); vmdesc_len = strlen(qjson_get_str(vmdesc)); - qemu_put_byte(f, QEMU_VM_VMDESCRIPTION); - qemu_put_be32(f, vmdesc_len); - qemu_put_buffer(f, (uint8_t *)qjson_get_str(vmdesc), vmdesc_len); + if (!migrate_enable_colo()) { + qemu_put_byte(f, QEMU_VM_VMDESCRIPTION); + qemu_put_be32(f, vmdesc_len); + qemu_put_buffer(f, (uint8_t *)qjson_get_str(vmdesc), vmdesc_len); + } object_unref(OBJECT(vmdesc)); qemu_fflush(f);