From nobody Thu Nov 6 16:14:19 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=intel.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1542222756912267.05104522490933; Wed, 14 Nov 2018 11:12:36 -0800 (PST) Received: from localhost ([::1]:33803 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gN0aZ-0004Nj-AA for importer@patchew.org; Wed, 14 Nov 2018 14:12:35 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37857) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gN0Zk-00046s-JU for qemu-devel@nongnu.org; Wed, 14 Nov 2018 14:11:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gN0Zf-0004aw-Ce for qemu-devel@nongnu.org; Wed, 14 Nov 2018 14:11:44 -0500 Received: from mga03.intel.com ([134.134.136.65]:22530) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gN0ZX-0004Nm-6j for qemu-devel@nongnu.org; Wed, 14 Nov 2018 14:11:36 -0500 Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Nov 2018 11:11:21 -0800 Received: from unknown (HELO localhost.localdomain) ([10.239.13.19]) by orsmga005.jf.intel.com with ESMTP; 14 Nov 2018 11:11:20 -0800 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,233,1539673200"; d="scan'208";a="274010404" From: Zhang Chen To: "Dr . David Alan Gilbert" , Juan Quintela , qemu-dev Date: Thu, 15 Nov 2018 03:09:12 +0800 Message-Id: <20181114190912.7242-1-chen.zhang@intel.com> X-Mailer: git-send-email 2.17.GIT X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 134.134.136.65 Subject: [Qemu-devel] [PATCH] migration/migration.c: Add COLO dependency checks X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Zhang Chen Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Zhang Chen Current COLO mode(independent disk mode) need replication module work together. Suggested by Dr. David Alan Gilbert . Signed-off-by: Zhang Chen Reviewed-by: Peter Xu --- migration/migration.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/migration/migration.c b/migration/migration.c index b261c1e4ce..49ffb9997a 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -918,6 +918,15 @@ static bool migrate_caps_check(bool *cap_list, } #endif =20 +#ifndef CONFIG_REPLICATION + if (cap_list[MIGRATION_CAPABILITY_X_COLO]) { + error_setg(errp, "QEMU compiled without replication module" + " can't enable COLO"); + error_append_hint(errp, "Please enable replication before COLO.\n"= ); + return false; + } +#endif + if (cap_list[MIGRATION_CAPABILITY_POSTCOPY_RAM]) { if (cap_list[MIGRATION_CAPABILITY_COMPRESS]) { /* The decompression threads asynchronously write into RAM --=20 2.17.GIT