From patchwork Mon Jul 17 08:26:08 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Xu X-Patchwork-Id: 789308 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 3x9xLl2CFdz9sxR for ; Mon, 17 Jul 2017 18:30:23 +1000 (AEST) Received: from localhost ([::1]:48743 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dX1Q5-000151-4a for incoming@patchwork.ozlabs.org; Mon, 17 Jul 2017 04:30:21 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60700) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dX1N6-000764-Nt for qemu-devel@nongnu.org; Mon, 17 Jul 2017 04:27:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dX1N2-0002A8-1f for qemu-devel@nongnu.org; Mon, 17 Jul 2017 04:27:16 -0400 Received: from mx1.redhat.com ([209.132.183.28]:46088) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dX1N1-00029l-Sa for qemu-devel@nongnu.org; Mon, 17 Jul 2017 04:27:11 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E0B847CE0D; Mon, 17 Jul 2017 08:27:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com E0B847CE0D Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=peterx@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com E0B847CE0D Received: from pxdev.xzpeter.org.com (ovpn-12-53.pek2.redhat.com [10.72.12.53]) by smtp.corp.redhat.com (Postfix) with ESMTP id E5D467C475; Mon, 17 Jul 2017 08:27:06 +0000 (UTC) From: Peter Xu To: qemu-devel@nongnu.org Date: Mon, 17 Jul 2017 16:26:08 +0800 Message-Id: <1500279971-13875-9-git-send-email-peterx@redhat.com> In-Reply-To: <1500279971-13875-1-git-send-email-peterx@redhat.com> References: <1500279971-13875-1-git-send-email-peterx@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Mon, 17 Jul 2017 08:27:11 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v2 08/11] migration: remove check against colo support 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: Laurent Vivier , Eduardo Habkost , Juan Quintela , "Dr . David Alan Gilbert" , Peter Xu , Markus Armbruster , Paolo Bonzini , Hailiang Zhang Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Since commit a15215f3 ("build: remove --enable-colo/--disable-colo"), colo is always supported. We don't need any colo_supported() now since it is always true. Removing any extra code that depends on it. CC: Paolo Bonzini CC: Hailiang Zhang Signed-off-by: Peter Xu Reviewed-by: Juan Quintela Reviewed-by: Zhang Chen --- include/migration/colo.h | 1 - migration/colo.c | 5 ----- migration/migration.c | 11 ----------- 3 files changed, 17 deletions(-) diff --git a/include/migration/colo.h b/include/migration/colo.h index be6beba..ff9874e 100644 --- a/include/migration/colo.h +++ b/include/migration/colo.h @@ -15,7 +15,6 @@ #include "qemu-common.h" -bool colo_supported(void); void colo_info_init(void); void migrate_start_colo_process(MigrationState *s); diff --git a/migration/colo.c b/migration/colo.c index ef35f00..a425543 100644 --- a/migration/colo.c +++ b/migration/colo.c @@ -29,11 +29,6 @@ static bool vmstate_loading; #define COLO_BUFFER_BASE_SIZE (4 * 1024 * 1024) -bool colo_supported(void) -{ - return true; -} - bool migration_in_colo_state(void) { MigrationState *s = migrate_get_current(); diff --git a/migration/migration.c b/migration/migration.c index 5a7f22c..eb750c5 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -403,9 +403,6 @@ MigrationCapabilityStatusList *qmp_query_migrate_capabilities(Error **errp) continue; } #endif - if (i == MIGRATION_CAPABILITY_X_COLO && !colo_supported()) { - continue; - } if (head == NULL) { head = g_malloc0(sizeof(*caps)); caps = head; @@ -604,14 +601,6 @@ void qmp_migrate_set_capabilities(MigrationCapabilityStatusList *params, continue; } #endif - if (cap->value->capability == MIGRATION_CAPABILITY_X_COLO) { - if (!colo_supported()) { - error_setg(errp, "COLO is not currently supported, please" - " configure with --enable-colo option in order to" - " support COLO feature"); - continue; - } - } s->enabled_capabilities[cap->value->capability] = cap->value->state; }