From nobody Sun May 19 20:12:53 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=yandex-team.ru ARC-Seal: i=1; a=rsa-sha256; t=1681944903; cv=none; d=zohomail.com; s=zohoarc; b=jZgNWZXIVwFIEmZQdNnfg6Wv221oVNU7FG6mUHTU/w91HIZOhLWrJGHrhRSaPfcDKhfsi6VhDT+yPfCGNW79sejML6DPv/aZHVVZaM1rq3IO0vaelIWwEXcDbYURb9YPRSAUO8p6adpBluhsSBcW4gzVQ0iDTx2rYV1AG8s1yGY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1681944903; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=2QbL62ar8hr3Pxj1MPCR0t5BWHaDry3w6MECxL1DLrY=; b=PGRldWPGRnnwGqWGSKUxDEcnTypiHdrhp/BOTV8CGQ7Ak1m8eF4C5McWMCwmFNBPsg2OqN3FDOjFGdRYfnS0iKcdlw3Mi/e5v1tsWhPF2gvNTspSAPE67pH98RP5vFK453N7PtAZz2LM080t+GZ9X7ZMPP94Dkh2eJx9LpYIZR0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1681944903410813.5684580014333; Wed, 19 Apr 2023 15:55:03 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ppGgG-0003JY-QQ; Wed, 19 Apr 2023 18:53:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ppGgB-0003Gh-U3; Wed, 19 Apr 2023 18:53:36 -0400 Received: from forwardcorp1b.mail.yandex.net ([178.154.239.136]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ppGg8-0000Th-CT; Wed, 19 Apr 2023 18:53:35 -0400 Received: from mail-nwsmtp-smtp-corp-main-44.iva.yp-c.yandex.net (mail-nwsmtp-smtp-corp-main-44.iva.yp-c.yandex.net [IPv6:2a02:6b8:c0c:7f29:0:640:9a2b:0]) by forwardcorp1b.mail.yandex.net (Yandex) with ESMTP id 287CE6106D; Thu, 20 Apr 2023 01:53:08 +0300 (MSK) Received: from vsementsov-nix.yandex.net (unknown [2a02:6b8:b081:b583::1:16]) by mail-nwsmtp-smtp-corp-main-44.iva.yp-c.yandex.net (smtpcorp/Yandex) with ESMTPSA id YqmhHB1OqSw0-rRfFRyRk; Thu, 20 Apr 2023 01:53:07 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex-team.ru; s=default; t=1681944787; bh=2QbL62ar8hr3Pxj1MPCR0t5BWHaDry3w6MECxL1DLrY=; h=Message-Id:Date:In-Reply-To:Cc:Subject:References:To:From; b=Vr7jeRp+YOcu9gFc/Bi6iX3xyZiQxVFnjB20vFSqXoxaz6ApaUQjzayOt1nEkb11I sWEL7rTzHf0z2FgWmBDOjgOetlkqBCdEfZKveQuEux0edA6Byz6o1xxYhMOuped+O3 tq2Ve117L4vKur6VC6eP3/vF7t8XsQyAPuiA2WHY= Authentication-Results: mail-nwsmtp-smtp-corp-main-44.iva.yp-c.yandex.net; dkim=pass header.i=@yandex-team.ru From: Vladimir Sementsov-Ogievskiy To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, michael.roth@amd.com, armbru@redhat.com, eblake@redhat.com, jasowang@redhat.com, quintela@redhat.com, zhanghailiang@xfusion.com, philmd@linaro.org, thuth@redhat.com, berrange@redhat.com, marcandre.lureau@redhat.com, pbonzini@redhat.com, dave@treblig.org, hreitz@redhat.com, kwolf@redhat.com, chen.zhang@intel.com, lizhijian@fujitsu.com, Vladimir Sementsov-Ogievskiy Subject: [PATCH v2 1/4] block/meson.build: prefer positive condition for replication Date: Thu, 20 Apr 2023 01:52:29 +0300 Message-Id: <20230419225232.508121-2-vsementsov@yandex-team.ru> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230419225232.508121-1-vsementsov@yandex-team.ru> References: <20230419225232.508121-1-vsementsov@yandex-team.ru> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=178.154.239.136; envelope-from=vsementsov@yandex-team.ru; helo=forwardcorp1b.mail.yandex.net X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @yandex-team.ru) X-ZM-MESSAGEID: 1681944905379100003 Content-Type: text/plain; charset="utf-8" Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Juan Quintela Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- block/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/meson.build b/block/meson.build index 382bec0e7d..b9a72e219b 100644 --- a/block/meson.build +++ b/block/meson.build @@ -84,7 +84,7 @@ block_ss.add(when: 'CONFIG_WIN32', if_true: files('file-w= in32.c', 'win32-aio.c') block_ss.add(when: 'CONFIG_POSIX', if_true: [files('file-posix.c'), coref,= iokit]) block_ss.add(when: libiscsi, if_true: files('iscsi-opts.c')) block_ss.add(when: 'CONFIG_LINUX', if_true: files('nvme.c')) -if not get_option('replication').disabled() +if get_option('replication').allowed() block_ss.add(files('replication.c')) endif block_ss.add(when: libaio, if_true: files('linux-aio.c')) --=20 2.34.1 From nobody Sun May 19 20:12:53 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=yandex-team.ru ARC-Seal: i=1; a=rsa-sha256; t=1681944844; cv=none; d=zohomail.com; s=zohoarc; b=iCSGMpHj9qeVPnh8yg7INUJfBUjn22Sxr3tmvC5kblurNei2fD2rKXrcPvdzmkUKUGjT1ZB4Nl9TCpVeZXHLq1SvU/oD8FP9kVXKlmneS92zmweKjOtJ0EoLcNIMmGhataE6mybYvbab/DO80W1zfHBeH7Y2hp9IwZs2fYB5tnc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1681944844; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=JQmWq7xRi20jM5fMRrEVfefVE2yr+lPdXI1RXezDFkQ=; b=CGySgd3/qJqjR2ZYJOyJI6+gQ2T/QjnBuKq1i/e3sqMwbmxj6gUnu38nbZaFfhXCAuaWecoJQr5fG66p4FdbmSZY4m38mnbM7l0ri5yb6jO8m2Dgl3tl5kqhGWEi9lGQzgBwRkPLzwI9vdypmdwd5Hh/ddbCTOaeKv8R2M55mS0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1681944844721578.0340178252712; Wed, 19 Apr 2023 15:54:04 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ppGgF-0003IQ-8t; Wed, 19 Apr 2023 18:53:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ppGgA-0003GV-K0; Wed, 19 Apr 2023 18:53:35 -0400 Received: from forwardcorp1c.mail.yandex.net ([2a02:6b8:c03:500:1:45:d181:df01]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ppGg8-0000Tm-C4; Wed, 19 Apr 2023 18:53:33 -0400 Received: from mail-nwsmtp-smtp-corp-main-44.iva.yp-c.yandex.net (mail-nwsmtp-smtp-corp-main-44.iva.yp-c.yandex.net [IPv6:2a02:6b8:c0c:7f29:0:640:9a2b:0]) by forwardcorp1c.mail.yandex.net (Yandex) with ESMTP id EDBA45FB60; Thu, 20 Apr 2023 01:53:08 +0300 (MSK) Received: from vsementsov-nix.yandex.net (unknown [2a02:6b8:b081:b583::1:16]) by mail-nwsmtp-smtp-corp-main-44.iva.yp-c.yandex.net (smtpcorp/Yandex) with ESMTPSA id YqmhHB1OqSw0-96mDfDsc; Thu, 20 Apr 2023 01:53:08 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex-team.ru; s=default; t=1681944788; bh=JQmWq7xRi20jM5fMRrEVfefVE2yr+lPdXI1RXezDFkQ=; h=Message-Id:Date:In-Reply-To:Cc:Subject:References:To:From; b=CKd54WB2XgNyNuoO8zv7jv0TEv3N3VdjYXZLW7CyIzVJcd0vFCTDy/RxBboR2m5ni 01FDPsY7Zm8Cc9foSxeopvgAiWvG69VT2OseQINI9v1pNpEpRyCIseILG2uZO/QGHS 0m6whOc/wvDTI+WUe/nzALKjW0XL+M7GptBiFAtg= Authentication-Results: mail-nwsmtp-smtp-corp-main-44.iva.yp-c.yandex.net; dkim=pass header.i=@yandex-team.ru From: Vladimir Sementsov-Ogievskiy To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, michael.roth@amd.com, armbru@redhat.com, eblake@redhat.com, jasowang@redhat.com, quintela@redhat.com, zhanghailiang@xfusion.com, philmd@linaro.org, thuth@redhat.com, berrange@redhat.com, marcandre.lureau@redhat.com, pbonzini@redhat.com, dave@treblig.org, hreitz@redhat.com, kwolf@redhat.com, chen.zhang@intel.com, lizhijian@fujitsu.com, Vladimir Sementsov-Ogievskiy Subject: [PATCH v2 2/4] scripts/qapi: allow optional experimental enum values Date: Thu, 20 Apr 2023 01:52:30 +0300 Message-Id: <20230419225232.508121-3-vsementsov@yandex-team.ru> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230419225232.508121-1-vsementsov@yandex-team.ru> References: <20230419225232.508121-1-vsementsov@yandex-team.ru> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a02:6b8:c03:500:1:45:d181:df01; envelope-from=vsementsov@yandex-team.ru; helo=forwardcorp1c.mail.yandex.net X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @yandex-team.ru) X-ZM-MESSAGEID: 1681944845361100003 Content-Type: text/plain; charset="utf-8" To be used in the next commit. Signed-off-by: Vladimir Sementsov-Ogievskiy --- scripts/qapi/types.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/qapi/types.py b/scripts/qapi/types.py index c39d054d2c..18f8734047 100644 --- a/scripts/qapi/types.py +++ b/scripts/qapi/types.py @@ -61,10 +61,12 @@ def gen_enum_lookup(name: str, =20 special_features =3D gen_special_features(memb.features) if special_features !=3D '0': + feats +=3D memb.ifcond.gen_if() feats +=3D mcgen(''' [%(index)s] =3D %(special_features)s, ''', index=3Dindex, special_features=3Dspecial_featu= res) + feats +=3D memb.ifcond.gen_endif() =20 if feats: ret +=3D mcgen(''' --=20 2.34.1 From nobody Sun May 19 20:12:53 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=yandex-team.ru ARC-Seal: i=1; a=rsa-sha256; t=1681944879; cv=none; d=zohomail.com; s=zohoarc; b=V6nLEM9bmLEohLspP1kU2JXbLA7phkXQwfPGw0MIGQLvuVafWtU5ucUIQFXeuLNmybkFMf8/2nnDPJvOS7hkZpqtYlYCQ75gGB0FtYBX8t8L5NbifVv8eE69sJsV/xHffqnMW02kjr/KHEm+I+QclFkB+nSe9VIYgwX1GTZHjcA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1681944879; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=y60uoNZdW2RuiVo/2ebvkMePUsWYRtLzbmn/ZZbScvM=; b=QYSbr3wnR/d22QyU0RrrNRjQDc1lurQ9Wx1IePpAqmrR2AeBVH/Yid2KA6n0tkcE8150Pz8W2MrWHsI/gAipCw+RkLF6plPy7dU0T6/2V6Dd4LVcp7BuXJ08q1q6JY0g0KAgUXLwwxdbWADOwsZfwBW8+/tt4GYxgUPVsqSQWj0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1681944879331451.3839501248086; Wed, 19 Apr 2023 15:54:39 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ppGgH-0003Jf-AV; Wed, 19 Apr 2023 18:53:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ppGgD-0003HA-Iu; Wed, 19 Apr 2023 18:53:37 -0400 Received: from forwardcorp1c.mail.yandex.net ([2a02:6b8:c03:500:1:45:d181:df01]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ppGg8-0000U5-Cg; Wed, 19 Apr 2023 18:53:37 -0400 Received: from mail-nwsmtp-smtp-corp-main-44.iva.yp-c.yandex.net (mail-nwsmtp-smtp-corp-main-44.iva.yp-c.yandex.net [IPv6:2a02:6b8:c0c:7f29:0:640:9a2b:0]) by forwardcorp1c.mail.yandex.net (Yandex) with ESMTP id F37045FB61; Thu, 20 Apr 2023 01:53:09 +0300 (MSK) Received: from vsementsov-nix.yandex.net (unknown [2a02:6b8:b081:b583::1:16]) by mail-nwsmtp-smtp-corp-main-44.iva.yp-c.yandex.net (smtpcorp/Yandex) with ESMTPSA id YqmhHB1OqSw0-V95IDmpa; Thu, 20 Apr 2023 01:53:09 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex-team.ru; s=default; t=1681944789; bh=y60uoNZdW2RuiVo/2ebvkMePUsWYRtLzbmn/ZZbScvM=; h=Message-Id:Date:In-Reply-To:Cc:Subject:References:To:From; b=WplVTQy9toA+RjWW+V4joeUxVWCXDbD70tfW7Hk8gIuSxr6oJfuehObmwFnJdY2g0 WxotemKIkBpDEdzBszShZN0MUMA7oYePAV6uzccegr4+ytEQkIXBc7AoaOUYM1BDsk MNAqOelcHroUTYb8yMczvekTG0GdJR8Fn8+Pg3fs= Authentication-Results: mail-nwsmtp-smtp-corp-main-44.iva.yp-c.yandex.net; dkim=pass header.i=@yandex-team.ru From: Vladimir Sementsov-Ogievskiy To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, michael.roth@amd.com, armbru@redhat.com, eblake@redhat.com, jasowang@redhat.com, quintela@redhat.com, zhanghailiang@xfusion.com, philmd@linaro.org, thuth@redhat.com, berrange@redhat.com, marcandre.lureau@redhat.com, pbonzini@redhat.com, dave@treblig.org, hreitz@redhat.com, kwolf@redhat.com, chen.zhang@intel.com, lizhijian@fujitsu.com, Vladimir Sementsov-Ogievskiy Subject: [PATCH v2 3/4] build: move COLO under CONFIG_REPLICATION Date: Thu, 20 Apr 2023 01:52:31 +0300 Message-Id: <20230419225232.508121-4-vsementsov@yandex-team.ru> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230419225232.508121-1-vsementsov@yandex-team.ru> References: <20230419225232.508121-1-vsementsov@yandex-team.ru> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a02:6b8:c03:500:1:45:d181:df01; envelope-from=vsementsov@yandex-team.ru; helo=forwardcorp1c.mail.yandex.net X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @yandex-team.ru) X-ZM-MESSAGEID: 1681944880221100001 Content-Type: text/plain; charset="utf-8" We don't allow to use x-colo capability when replication is not configured. So, no reason to build COLO when replication is disabled, it's unusable in this case. Signed-off-by: Vladimir Sementsov-Ogievskiy Acked-by: Dr. David Alan Gilbert --- hmp-commands.hx | 2 ++ migration/colo.c | 6 +++++ migration/meson.build | 6 +++-- migration/migration-hmp-cmds.c | 2 ++ migration/migration.c | 19 +++----------- net/meson.build | 5 +++- qapi/migration.json | 12 ++++++--- stubs/colo.c | 47 ++++++++++++++++++++++++++++++++++ stubs/meson.build | 1 + 9 files changed, 78 insertions(+), 22 deletions(-) create mode 100644 stubs/colo.c diff --git a/hmp-commands.hx b/hmp-commands.hx index bb85ee1d26..fbd0932232 100644 --- a/hmp-commands.hx +++ b/hmp-commands.hx @@ -1035,6 +1035,7 @@ SRST migration (or once already in postcopy). ERST =20 +#ifdef CONFIG_REPLICATION { .name =3D "x_colo_lost_heartbeat", .args_type =3D "", @@ -1043,6 +1044,7 @@ ERST "a failover or takeover is needed.", .cmd =3D hmp_x_colo_lost_heartbeat, }, +#endif =20 SRST ``x_colo_lost_heartbeat`` diff --git a/migration/colo.c b/migration/colo.c index 0716e64689..089c491d70 100644 --- a/migration/colo.c +++ b/migration/colo.c @@ -196,6 +196,12 @@ COLOMode get_colo_mode(void) } } =20 +bool migrate_colo_enabled(void) +{ + MigrationState *s =3D migrate_get_current(); + return s->enabled_capabilities[MIGRATION_CAPABILITY_X_COLO]; +} + void colo_do_failover(void) { /* Make sure VM stopped while failover happened. */ diff --git a/migration/meson.build b/migration/meson.build index 0d1bb9f96e..3fccf79f12 100644 --- a/migration/meson.build +++ b/migration/meson.build @@ -13,8 +13,6 @@ softmmu_ss.add(files( 'block-dirty-bitmap.c', 'channel.c', 'channel-block.c', - 'colo-failover.c', - 'colo.c', 'exec.c', 'fd.c', 'global_state.c', @@ -29,6 +27,10 @@ softmmu_ss.add(files( 'threadinfo.c', ), gnutls) =20 +if get_option('replication').allowed() + softmmu_ss.add(files('colo-failover.c', 'colo.c')) +endif + softmmu_ss.add(when: rdma, if_true: files('rdma.c')) if get_option('live_block_migration').allowed() softmmu_ss.add(files('block.c')) diff --git a/migration/migration-hmp-cmds.c b/migration/migration-hmp-cmds.c index 72519ea99f..4601c48f41 100644 --- a/migration/migration-hmp-cmds.c +++ b/migration/migration-hmp-cmds.c @@ -640,6 +640,7 @@ void hmp_migrate_start_postcopy(Monitor *mon, const QDi= ct *qdict) hmp_handle_error(mon, err); } =20 +#ifdef CONFIG_REPLICATION void hmp_x_colo_lost_heartbeat(Monitor *mon, const QDict *qdict) { Error *err =3D NULL; @@ -647,6 +648,7 @@ void hmp_x_colo_lost_heartbeat(Monitor *mon, const QDic= t *qdict) qmp_x_colo_lost_heartbeat(&err); hmp_handle_error(mon, err); } +#endif =20 typedef struct HMPMigrationStatus { QEMUTimer *timer; diff --git a/migration/migration.c b/migration/migration.c index bda4789193..2382958364 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -165,7 +165,9 @@ INITIALIZE_MIGRATE_CAPS_SET(check_caps_background_snaps= hot, MIGRATION_CAPABILITY_RDMA_PIN_ALL, MIGRATION_CAPABILITY_COMPRESS, MIGRATION_CAPABILITY_XBZRLE, +#ifdef CONFIG_REPLICATION MIGRATION_CAPABILITY_X_COLO, +#endif MIGRATION_CAPABILITY_VALIDATE_UUID, MIGRATION_CAPABILITY_ZERO_COPY_SEND); =20 @@ -1329,15 +1331,6 @@ 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]) { /* This check is reasonably expensive, so only when it's being * set the first time, also it's only the destination that needs @@ -3577,12 +3570,6 @@ fail: MIGRATION_STATUS_FAILED); } =20 -bool migrate_colo_enabled(void) -{ - MigrationState *s =3D migrate_get_current(); - return s->enabled_capabilities[MIGRATION_CAPABILITY_X_COLO]; -} - typedef enum MigThrError { /* No error detected */ MIG_THR_ERR_NONE =3D 0, @@ -4537,7 +4524,9 @@ static Property migration_properties[] =3D { DEFINE_PROP_MIG_CAP("x-postcopy-ram", MIGRATION_CAPABILITY_POSTCOPY_RA= M), DEFINE_PROP_MIG_CAP("x-postcopy-preempt", MIGRATION_CAPABILITY_POSTCOPY_PREEMPT), +#ifdef CONFIG_REPLICATION DEFINE_PROP_MIG_CAP("x-colo", MIGRATION_CAPABILITY_X_COLO), +#endif DEFINE_PROP_MIG_CAP("x-release-ram", MIGRATION_CAPABILITY_RELEASE_RAM), DEFINE_PROP_MIG_CAP("x-block", MIGRATION_CAPABILITY_BLOCK), DEFINE_PROP_MIG_CAP("x-return-path", MIGRATION_CAPABILITY_RETURN_PATH), diff --git a/net/meson.build b/net/meson.build index 87afca3e93..38d50b8c96 100644 --- a/net/meson.build +++ b/net/meson.build @@ -1,7 +1,6 @@ softmmu_ss.add(files( 'announce.c', 'checksum.c', - 'colo-compare.c', 'colo.c', 'dump.c', 'eth.c', @@ -19,6 +18,10 @@ softmmu_ss.add(files( 'util.c', )) =20 +if get_option('replication').allowed() + softmmu_ss.add(files('colo-compare.c')) +endif + softmmu_ss.add(when: 'CONFIG_TCG', if_true: files('filter-replay.c')) =20 if have_l2tpv3 diff --git a/qapi/migration.json b/qapi/migration.json index c84fa10e86..93863fa88c 100644 --- a/qapi/migration.json +++ b/qapi/migration.json @@ -486,7 +486,8 @@ { 'enum': 'MigrationCapability', 'data': ['xbzrle', 'rdma-pin-all', 'auto-converge', 'zero-blocks', 'compress', 'events', 'postcopy-ram', - { 'name': 'x-colo', 'features': [ 'unstable' ] }, + { 'name': 'x-colo', 'features': [ 'unstable' ], + 'if': 'CONFIG_REPLICATION' }, 'release-ram', 'block', 'return-path', 'pause-before-switchover', 'multifd', 'dirty-bitmaps', 'postcopy-blocktime', 'late-block-activate', @@ -1409,7 +1410,8 @@ # ## { 'command': 'x-colo-lost-heartbeat', - 'features': [ 'unstable' ] } + 'features': [ 'unstable' ], + 'if': 'CONFIG_REPLICATION' } =20 ## # @migrate_cancel: @@ -1685,7 +1687,8 @@ ## { 'struct': 'COLOStatus', 'data': { 'mode': 'COLOMode', 'last-mode': 'COLOMode', - 'reason': 'COLOExitReason' } } + 'reason': 'COLOExitReason' }, + 'if': 'CONFIG_REPLICATION' } =20 ## # @query-colo-status: @@ -1702,7 +1705,8 @@ # Since: 3.1 ## { 'command': 'query-colo-status', - 'returns': 'COLOStatus' } + 'returns': 'COLOStatus', + 'if': 'CONFIG_REPLICATION' } =20 ## # @migrate-recover: diff --git a/stubs/colo.c b/stubs/colo.c new file mode 100644 index 0000000000..45c8ac0cc6 --- /dev/null +++ b/stubs/colo.c @@ -0,0 +1,47 @@ +#include "qemu/osdep.h" +#include "qemu/notify.h" +#include "net/colo-compare.h" +#include "migration/colo.h" +#include "migration/migration.h" +#include "qapi/error.h" +#include "qapi/qapi-commands-migration.h" + +void colo_compare_cleanup(void) +{ + abort(); +} + +void colo_shutdown(void) +{ + abort(); +} + +void *colo_process_incoming_thread(void *opaque) +{ + abort(); +} + +void colo_checkpoint_notify(void *opaque) +{ + abort(); +} + +void migrate_start_colo_process(MigrationState *s) +{ + abort(); +} + +bool migration_in_colo_state(void) +{ + return false; +} + +bool migration_incoming_in_colo_state(void) +{ + return false; +} + +bool migrate_colo_enabled(void) +{ + return false; +} diff --git a/stubs/meson.build b/stubs/meson.build index b2b5956d97..8412cad15f 100644 --- a/stubs/meson.build +++ b/stubs/meson.build @@ -45,6 +45,7 @@ stub_ss.add(files('target-get-monitor-def.c')) stub_ss.add(files('target-monitor-defs.c')) stub_ss.add(files('trace-control.c')) stub_ss.add(files('uuid.c')) +stub_ss.add(files('colo.c')) stub_ss.add(files('vmstate.c')) stub_ss.add(files('vm-stop.c')) stub_ss.add(files('win32-kbd-hook.c')) --=20 2.34.1 From nobody Sun May 19 20:12:53 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=yandex-team.ru ARC-Seal: i=1; a=rsa-sha256; t=1681944844; cv=none; d=zohomail.com; s=zohoarc; b=ET1uoCWVxb5nwT1Om3iibcMZao0CD0MGhu8gwyq4Sl80nHiOlRNo404i9EzU49LZmDmxb7ir8sigqtetQB/wJr3RPYYjcOyE6HPQ/YBQ2Pe72FKicGkuBFhcoHMboH8QE2QKIl30vcwqftNSCnEPhhLcCKhPYUmr4cLEStK+JI0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1681944844; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=oqisxFBeF9FaJ15anyP33//Lgz7jyDHpwXuXFg8+nwA=; b=M7Y+xZl1EzLpVbtm0XeSYaS3BpPaezp50reV2QI/E53916jTJisNFwu4dARFsyNP6ikLnS/o95qoIw3eX2ssSj5CGh53PYYLxGkinjQJS0QIRP5nSzs0z0FEi9TKh7o+PdVGR7iAcT3eeLJK58+P2JbMfyFvHo8bPVm5GXxdsNA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1681944844430831.5070142570708; Wed, 19 Apr 2023 15:54:04 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ppGgF-0003IN-85; Wed, 19 Apr 2023 18:53:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ppGgC-0003Gk-46; Wed, 19 Apr 2023 18:53:36 -0400 Received: from forwardcorp1b.mail.yandex.net ([2a02:6b8:c02:900:1:45:d181:df01]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ppGg8-0000Wn-CJ; Wed, 19 Apr 2023 18:53:35 -0400 Received: from mail-nwsmtp-smtp-corp-main-44.iva.yp-c.yandex.net (mail-nwsmtp-smtp-corp-main-44.iva.yp-c.yandex.net [IPv6:2a02:6b8:c0c:7f29:0:640:9a2b:0]) by forwardcorp1b.mail.yandex.net (Yandex) with ESMTP id DDC0560730; Thu, 20 Apr 2023 01:53:10 +0300 (MSK) Received: from vsementsov-nix.yandex.net (unknown [2a02:6b8:b081:b583::1:16]) by mail-nwsmtp-smtp-corp-main-44.iva.yp-c.yandex.net (smtpcorp/Yandex) with ESMTPSA id YqmhHB1OqSw0-o2pVyVbY; Thu, 20 Apr 2023 01:53:10 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex-team.ru; s=default; t=1681944790; bh=oqisxFBeF9FaJ15anyP33//Lgz7jyDHpwXuXFg8+nwA=; h=Message-Id:Date:In-Reply-To:Cc:Subject:References:To:From; b=pPqMxRlWsaoT/MzjtTxQXOilFOGfIpaB0ZDgZ6zPFA5rS2cMojoYr5GEHsyTxSpFZ 4SSdPE4tm2itaeykmBRw8jivpwTqC1vMlCvbUoRVBmgBODMELZmkBtli2JQ4OWxnfl 3TVAdqgVTRagYRnaLG6+mikqffAxwyn138+Ywf30= Authentication-Results: mail-nwsmtp-smtp-corp-main-44.iva.yp-c.yandex.net; dkim=pass header.i=@yandex-team.ru From: Vladimir Sementsov-Ogievskiy To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, michael.roth@amd.com, armbru@redhat.com, eblake@redhat.com, jasowang@redhat.com, quintela@redhat.com, zhanghailiang@xfusion.com, philmd@linaro.org, thuth@redhat.com, berrange@redhat.com, marcandre.lureau@redhat.com, pbonzini@redhat.com, dave@treblig.org, hreitz@redhat.com, kwolf@redhat.com, chen.zhang@intel.com, lizhijian@fujitsu.com, Vladimir Sementsov-Ogievskiy Subject: [PATCH v2 4/4] configure: add --disable-colo-filters option Date: Thu, 20 Apr 2023 01:52:32 +0300 Message-Id: <20230419225232.508121-5-vsementsov@yandex-team.ru> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230419225232.508121-1-vsementsov@yandex-team.ru> References: <20230419225232.508121-1-vsementsov@yandex-team.ru> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a02:6b8:c02:900:1:45:d181:df01; envelope-from=vsementsov@yandex-team.ru; helo=forwardcorp1b.mail.yandex.net X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @yandex-team.ru) X-ZM-MESSAGEID: 1681944845429100004 Content-Type: text/plain; charset="utf-8" Add option to not build COLO Proxy subsystem if it is not needed. Signed-off-by: Vladimir Sementsov-Ogievskiy --- meson.build | 1 + meson_options.txt | 2 ++ net/meson.build | 11 ++++++++--- scripts/meson-buildoptions.sh | 3 +++ 4 files changed, 14 insertions(+), 3 deletions(-) diff --git a/meson.build b/meson.build index c44d05a13f..5b2fdfbd3a 100644 --- a/meson.build +++ b/meson.build @@ -1962,6 +1962,7 @@ config_host_data.set('CONFIG_GPROF', get_option('gpro= f')) config_host_data.set('CONFIG_LIVE_BLOCK_MIGRATION', get_option('live_block= _migration').allowed()) config_host_data.set('CONFIG_QOM_CAST_DEBUG', get_option('qom_cast_debug')) config_host_data.set('CONFIG_REPLICATION', get_option('replication').allow= ed()) +config_host_data.set('CONFIG_COLO_FILTERS', get_option('colo_filters').all= owed()) =20 # has_header config_host_data.set('CONFIG_EPOLL', cc.has_header('sys/epoll.h')) diff --git a/meson_options.txt b/meson_options.txt index fc9447d267..ffe81317cb 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -289,6 +289,8 @@ option('live_block_migration', type: 'feature', value: = 'auto', description: 'block migration in the main migration stream') option('replication', type: 'feature', value: 'auto', description: 'replication support') +option('colo_filters', type: 'feature', value: 'auto', + description: 'colo_filters support') option('bochs', type: 'feature', value: 'auto', description: 'bochs image format support') option('cloop', type: 'feature', value: 'auto', diff --git a/net/meson.build b/net/meson.build index 38d50b8c96..7e54744aea 100644 --- a/net/meson.build +++ b/net/meson.build @@ -1,12 +1,9 @@ softmmu_ss.add(files( 'announce.c', 'checksum.c', - 'colo.c', 'dump.c', 'eth.c', 'filter-buffer.c', - 'filter-mirror.c', - 'filter-rewriter.c', 'filter.c', 'hub.c', 'net-hmp-cmds.c', @@ -22,6 +19,14 @@ if get_option('replication').allowed() softmmu_ss.add(files('colo-compare.c')) endif =20 +if get_option('replication').allowed() or get_option('colo_filters').allow= ed() + softmmu_ss.add(files('colo.c')) +endif + +if get_option('colo_filters').allowed() + softmmu_ss.add(files('filter-mirror.c', 'filter-rewriter.c')) +endif + softmmu_ss.add(when: 'CONFIG_TCG', if_true: files('filter-replay.c')) =20 if have_l2tpv3 diff --git a/scripts/meson-buildoptions.sh b/scripts/meson-buildoptions.sh index 009fab1515..cf9d23369f 100644 --- a/scripts/meson-buildoptions.sh +++ b/scripts/meson-buildoptions.sh @@ -83,6 +83,7 @@ meson_options_help() { printf "%s\n" ' capstone Whether and how to find the capstone li= brary' printf "%s\n" ' cloop cloop image format support' printf "%s\n" ' cocoa Cocoa user interface (macOS only)' + printf "%s\n" ' colo-filters colo_filters support' printf "%s\n" ' coreaudio CoreAudio sound support' printf "%s\n" ' crypto-afalg Linux AF_ALG crypto backend driver' printf "%s\n" ' curl CURL block device driver' @@ -236,6 +237,8 @@ _meson_option_parse() { --disable-cloop) printf "%s" -Dcloop=3Ddisabled ;; --enable-cocoa) printf "%s" -Dcocoa=3Denabled ;; --disable-cocoa) printf "%s" -Dcocoa=3Ddisabled ;; + --enable-colo-filters) printf "%s" -Dcolo_filters=3Denabled ;; + --disable-colo-filters) printf "%s" -Dcolo_filters=3Ddisabled ;; --enable-coreaudio) printf "%s" -Dcoreaudio=3Denabled ;; --disable-coreaudio) printf "%s" -Dcoreaudio=3Ddisabled ;; --enable-coroutine-pool) printf "%s" -Dcoroutine_pool=3Dtrue ;; --=20 2.34.1