From nobody Mon Feb 9 04:04:42 2026 Delivered-To: importer@patchew.org Received-SPF: none (zohomail.com: 8.43.85.245 is neither permitted nor denied by domain of lists.libvirt.org) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; spf=none (zohomail.com: 8.43.85.245 is neither permitted nor denied by domain of lists.libvirt.org) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1701798519321108.4324006058282; Tue, 5 Dec 2023 09:48:39 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 996) id 3892E181E; Tue, 5 Dec 2023 12:48:38 -0500 (EST) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id DE4B018E0; Tue, 5 Dec 2023 12:41:32 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 996) id 2B89C17AC; Tue, 5 Dec 2023 12:41:13 -0500 (EST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 123E617CC for ; Tue, 5 Dec 2023 12:41:12 -0500 (EST) Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-222-YjgfsXVQPjOg6snM5EjVtQ-1; Tue, 05 Dec 2023 12:41:10 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 293743C29A63 for ; Tue, 5 Dec 2023 17:41:10 +0000 (UTC) Received: from speedmetal.lan (unknown [10.45.242.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id A684CC15E6A for ; Tue, 5 Dec 2023 17:41:09 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.4 X-MC-Unique: YjgfsXVQPjOg6snM5EjVtQ-1 From: Peter Krempa To: devel@lists.libvirt.org Subject: [RFC PATCH 2/5] qemu: capabilities: Introduce QEMU_CAPS_BLOCKJOB_BACKING_MASK_PROTOCOL Date: Tue, 5 Dec 2023 18:41:03 +0100 Message-ID: <878ece21a1a296440bc451563b3062f13c9959b0.1701797977.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.8 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Message-ID-Hash: 5MTRCYZT663BIWBX5NUQWLNHIRVRBGMG X-Message-ID-Hash: 5MTRCYZT663BIWBX5NUQWLNHIRVRBGMG X-MailFrom: pkrempa@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1701798520034100001 The capability is asserted when both block-stream and block-commit QMP commands support the 'backing-mask-protocol' argument. The argument causes qemu to record 'raw' as the backing file format in case when a protocol node is used directly. This is needed to preserve compatibility of images after a block-commit or block-pull libvirt operation with older libvirt versions in case when we'll want to remove the unneded 'raw' format drivers from the block graph. Signed-off-by: Peter Krempa --- src/qemu/qemu_capabilities.c | 5 +++++ src/qemu/qemu_capabilities.h | 1 + tests/qemucapabilitiesdata/caps_8.2.0_x86_64.xml | 1 + 3 files changed, 7 insertions(+) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 83119e871a..ac07d3eb22 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -698,6 +698,7 @@ VIR_ENUM_IMPL(virQEMUCaps, /* 450 */ "run-with.async-teardown", /* QEMU_CAPS_RUN_WITH_ASYNC_TEARD= OWN */ "virtio-blk-vhost-vdpa", /* QEMU_CAPS_DEVICE_VIRTIO_BLK_VHOS= T_VDPA */ + "blockjob.backing-mask-protocol", /* QEMU_CAPS_BLOCKJOB_BACK= ING_MASK_PROTOCOL */ ); @@ -5467,6 +5468,10 @@ virQEMUCapsProbeQMPSchemaCapabilities(virQEMUCaps *q= emuCaps, virQEMUCapsSet(qemuCaps, cmd->flag); } + if (virQEMUQAPISchemaPathExists("block-commit/arg-type/backing-mask-pr= otocol", schema) && + virQEMUQAPISchemaPathExists("block-stream/arg-type/backing-mask-pr= otocol", schema)) + virQEMUCapsSet(qemuCaps, QEMU_CAPS_BLOCKJOB_BACKING_MASK_PROTOCOL); + return 0; } diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index 3c4f7f625b..60b37c772c 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -677,6 +677,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for = syntax-check */ /* 450 */ QEMU_CAPS_RUN_WITH_ASYNC_TEARDOWN, /* asynchronous teardown -run-with = async-teardown=3Don|off */ QEMU_CAPS_DEVICE_VIRTIO_BLK_VHOST_VDPA, /* virtio-blk-vhost-vdpa block= driver */ + QEMU_CAPS_BLOCKJOB_BACKING_MASK_PROTOCOL, /* backing-mask-protocol of = block-commit/block-stream */ QEMU_CAPS_LAST /* this must always be the last item */ } virQEMUCapsFlags; diff --git a/tests/qemucapabilitiesdata/caps_8.2.0_x86_64.xml b/tests/qemuc= apabilitiesdata/caps_8.2.0_x86_64.xml index 6318b407c9..fb8e643040 100644 --- a/tests/qemucapabilitiesdata/caps_8.2.0_x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_8.2.0_x86_64.xml @@ -199,6 +199,7 @@ + 8001092 43100246 v8.2.0-rc2-49-g65ad44546c --=20 2.43.0 _______________________________________________ Devel mailing list -- devel@lists.libvirt.org To unsubscribe send an email to devel-leave@lists.libvirt.org