From patchwork Wed Jul 23 14:25:29 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Hongyang X-Patchwork-Id: 372965 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 490D11401A0 for ; Thu, 24 Jul 2014 00:30:58 +1000 (EST) Received: from localhost ([::1]:45376 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X9xZH-00070G-Sb for incoming@patchwork.ozlabs.org; Wed, 23 Jul 2014 10:30:55 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48193) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X9xUa-00071s-Ct for qemu-devel@nongnu.org; Wed, 23 Jul 2014 10:26:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X9xUU-0005uh-P3 for qemu-devel@nongnu.org; Wed, 23 Jul 2014 10:26:04 -0400 Received: from [59.151.112.132] (port=59763 helo=heian.cn.fujitsu.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X9xUU-0005sA-CK for qemu-devel@nongnu.org; Wed, 23 Jul 2014 10:25:58 -0400 X-IronPort-AV: E=Sophos;i="5.00,931,1396972800"; d="scan'208";a="33686781" Received: from unknown (HELO edo.cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 23 Jul 2014 22:23:08 +0800 Received: from G08CNEXCHPEKD03.g08.fujitsu.local (localhost.localdomain [127.0.0.1]) by edo.cn.fujitsu.com (8.14.3/8.13.1) with ESMTP id s6NEPriT021554; Wed, 23 Jul 2014 22:25:53 +0800 Received: from localhost (10.167.226.223) by G08CNEXCHPEKD03.g08.fujitsu.local (10.167.33.89) with Microsoft SMTP Server (TLS) id 14.3.181.6; Wed, 23 Jul 2014 22:25:59 +0800 From: Yang Hongyang To: Date: Wed, 23 Jul 2014 22:25:29 +0800 Message-ID: <1406125538-27992-9-git-send-email-yanghy@cn.fujitsu.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1406125538-27992-1-git-send-email-yanghy@cn.fujitsu.com> References: <1406125538-27992-1-git-send-email-yanghy@cn.fujitsu.com> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 59.151.112.132 Cc: kvm@vger.kernel.org, GuiJianfeng@cn.fujitsu.com, eddie.dong@intel.com, dgilbert@redhat.com, mrhines@linux.vnet.ibm.com, Yang Hongyang Subject: [Qemu-devel] [RFC PATCH 08/17] COLO: disable qdev hotplug 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 COLO do not support qdev hotplug migration, disable it. Signed-off-by: Yang Hongyang --- migration-colo.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/migration-colo.c b/migration-colo.c index b90d9b6..f295e56 100644 --- a/migration-colo.c +++ b/migration-colo.c @@ -12,6 +12,7 @@ #include "qemu/thread.h" #include "block/coroutine.h" #include "qemu/error-report.h" +#include "hw/qdev-core.h" #include "migration/migration-colo.h" static QEMUBH *colo_bh; @@ -130,6 +131,9 @@ static const QEMUFileOps colo_read_ops = { static void *colo_thread(void *opaque) { MigrationState *s = opaque; + int dev_hotplug = qdev_hotplug; + + qdev_hotplug = 0; colo_buffer_init(); @@ -145,6 +149,8 @@ static void *colo_thread(void *opaque) qemu_bh_schedule(s->cleanup_bh); qemu_mutex_unlock_iothread(); + qdev_hotplug = dev_hotplug; + return NULL; } @@ -179,10 +185,14 @@ static Coroutine *colo; void colo_process_incoming_checkpoints(QEMUFile *f) { + int dev_hotplug = qdev_hotplug; + if (!restore_use_colo()) { return; } + qdev_hotplug = 0; + colo = qemu_coroutine_self(); assert(colo != NULL); @@ -194,5 +204,7 @@ void colo_process_incoming_checkpoints(QEMUFile *f) colo = NULL; restore_exit_colo(); + qdev_hotplug = dev_hotplug; + return; }