Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 52D86C433F5 for ; Thu, 27 Jan 2022 02:03:55 +0000 (UTC) Received: from localhost ([::1]:58402 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nCu8g-0006Ef-2y for qemu-devel@archiver.kernel.org; Wed, 26 Jan 2022 21:03:54 -0500 Received: from eggs.gnu.org ([209.51.188.92]:59182) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nCu6i-0004MO-Pi for qemu-devel@nongnu.org; Wed, 26 Jan 2022 21:01:52 -0500 Received: from mga12.intel.com ([192.55.52.136]:34870) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nCu6f-0003E4-MU for qemu-devel@nongnu.org; Wed, 26 Jan 2022 21:01:52 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1643248910; x=1674784910; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=8vXSJWZPIERlHsE1YsPCqlxHMdQuegU1VTax1D1M9vQ=; b=NAa1JZeigwiLMpBACGU0RQg/4ACufaai4MaAyQD7lXkVjyx9hLyNKANH nchCnzE9edZDPvCNRbrGUsgPzfLWhnGI3KIFGejMtIzTourTn71aKriVP gKCAGtJeuniP3fSID5E2iIZnodiloS/JaSeRgqkeDvqREPaL/gLmyOdzc dSzYDtmTsPW268uWdtqYMUV7o6BmkLMOvuL0If6JnRF6xcINiPYIXjyTu eKKQY9e1+XzHoyDqjcIl8MyDOJXtHVpIYXR7JS+SbYrZwBQnaHAdut3sB 1LGGxhvHUO8ERmz5wjYG7jYq9ZR8BmvP5jDBUa1gMQMIeGW2PIsKuUWoG w==; X-IronPort-AV: E=McAfee;i="6200,9189,10239"; a="226695382" X-IronPort-AV: E=Sophos;i="5.88,319,1635231600"; d="scan'208";a="226695382" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Jan 2022 18:01:09 -0800 X-IronPort-AV: E=Sophos;i="5.88,319,1635231600"; d="scan'208";a="535434840" Received: from unknown (HELO localhost.localdomain) ([10.239.13.19]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Jan 2022 18:01:07 -0800 From: Zhang Chen To: "Dr. David Alan Gilbert" , Juan Quintela , qemu-dev Subject: [PATCH V2 2/3] migration/migration.c: Avoid COLO boot in postcopy migration Date: Thu, 27 Jan 2022 09:49:56 +0800 Message-Id: <20220127014957.3262813-3-chen.zhang@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220127014957.3262813-1-chen.zhang@intel.com> References: <20220127014957.3262813-1-chen.zhang@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=192.55.52.136; envelope-from=chen.zhang@intel.com; helo=mga12.intel.com X-Spam_score_int: -45 X-Spam_score: -4.6 X-Spam_bar: ---- X-Spam_report: (-4.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.155, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Zhang Chen Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" COLO does not support postcopy migration and remove the Fixme. Signed-off-by: Zhang Chen Reviewed-by: Juan Quintela --- migration/migration.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/migration/migration.c b/migration/migration.c index 2afa77da03..3fac9c67ca 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -3230,7 +3230,11 @@ static void migration_completion(MigrationState *s) goto fail_invalidate; } - if (!migrate_colo_enabled()) { + if (migrate_colo_enabled() && s->state == MIGRATION_STATUS_ACTIVE) { + /* COLO dose not support postcopy */ + migrate_set_state(&s->state, MIGRATION_STATUS_ACTIVE, + MIGRATION_STATUS_COLO); + } else { migrate_set_state(&s->state, current_active_state, MIGRATION_STATUS_COMPLETED); } @@ -3621,10 +3625,6 @@ static void migration_iteration_finish(MigrationState *s) "COLO enabled", __func__); } migrate_start_colo_process(s); - /* - * Fixme: we will run VM in COLO no matter its old running state. - * After exited COLO, we will keep running. - */ /* Fallthrough */ case MIGRATION_STATUS_ACTIVE: /* -- 2.25.1