From nobody Mon Feb 9 16:54:04 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1770402975; cv=none; d=zohomail.com; s=zohoarc; b=kqwVokhdoXIeDqlbxNP/K2kWBRAftUSboC3ds0QNIW7gNqSKO1gbJvBqPm+V9LiiIt+KtcNIqhZ0DsvNr5DbXAUbODSKvVQge/WsJDnja5aEJu4IznvQi5u+fCEtG2vBxtouEDZldUwXSI3bUKqbrDYnuLCSGXF+UP3zqXi2y60= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1770402975; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Owner:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id:Cc; bh=Ewdlclu/JFd0WoFs+kJIzQHkml7SiiI6zjKr1JpVLoM=; b=SMyGBBbybp05aLCqIUgPikTJ4rF2VXPPDYw5AOuMcOClmAnGyTy8N3AEGHCoQnpJYzadrm2R5uMO8wCtRDhX6tOByLHHlhCij+3ZatmSyIWMIqPpenYz5gNDYVExb0zp51KAO0jG6XYZOHXcU2qtmb6VyXhF8lt+AJ3RuPhUpqA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1770402975357494.8039120427561; Fri, 6 Feb 2026 10:36:15 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 993) id 7CB4741AA5; Fri, 6 Feb 2026 13:36:14 -0500 (EST) Received: from [172.19.199.6] (lists.libvirt.org [8.43.85.245]) by lists.libvirt.org (Postfix) with ESMTP id 76B1B41E4A; Fri, 6 Feb 2026 13:33:42 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 993) id B48EB3FACE; Fri, 6 Feb 2026 13:33:30 -0500 (EST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (3072 bits) server-digest SHA256) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 6142241AAD for ; Fri, 6 Feb 2026 13:28:14 -0500 (EST) Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-578-5aS_dw6OPYmBx6fAJDsgRw-1; Fri, 06 Feb 2026 13:28:12 -0500 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (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 mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id D6CF61800464 for ; Fri, 6 Feb 2026 18:28:11 +0000 (UTC) Received: from speedmetal.lan (unknown [10.45.242.3]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 29ECC1800465 for ; Fri, 6 Feb 2026 18:28:10 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_PASS autolearn=unavailable autolearn_force=no version=4.0.1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1770402494; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Ewdlclu/JFd0WoFs+kJIzQHkml7SiiI6zjKr1JpVLoM=; b=IDEd2l/mpxRUAYVS5Xs1cJmRUDZPLTPXuvCAGQDD4/ll2FIjWUDR09ALOYTXggbC7V83lc YkXWCZb68JFB9qJ1muiOnyCtSHb5LTRyEEmFvMYZhQr9kkfMFvNpFatRrm/yl2HdbPiDJq JcqXxS4ZMRVAJ+zhGaCFEtyhQQylnlA= X-MC-Unique: 5aS_dw6OPYmBx6fAJDsgRw-1 X-Mimecast-MFC-AGG-ID: 5aS_dw6OPYmBx6fAJDsgRw_1770402492 To: devel@lists.libvirt.org Subject: [PATCH 2/5] qemu: capabilities: Introduce QEMU_CAPS_NETDEV_TAP_FD_VHOSTFD_PLURAL Date: Fri, 6 Feb 2026 19:28:04 +0100 Message-ID: <3cba03ce9ef3928fe61d36a658103a020e58861b.1770397360.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: apFQgApw6lSuCmQUgScyyNeIy9cHIFkYpIFVKIwZimc_1770402492 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: 4KWJTHJ3STBYCX3ZDVPEGUACKYWOUZLJ X-Message-ID-Hash: 4KWJTHJ3STBYCX3ZDVPEGUACKYWOUZLJ X-MailFrom: pkrempa@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-devel.lists.libvirt.org-0; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Peter Krempa via Devel Reply-To: Peter Krempa X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1770402978116158500 Content-Type: text/plain; charset="utf-8" From: Peter Krempa qemu is going to deprecate the 'fd' and 'vhostfd' options of 'tap' netdev. While the current guidance is to use the plural 'fds' and 'vhostfds' even when one FD is used, this doesn't apply cleanly on older versions. Add capability QEMU_CAPS_NETDEV_TAP_FD_VHOSTFD_PLURAL which is detected if 'vhostfd' is deprecated or completely missing to switch to the new behaviour only conditionally. Currently there's no caps dump showing this because it'd at the same time break test validation due to use of deprecated fields. Signed-off-by: Peter Krempa --- src/qemu/qemu_capabilities.c | 8 ++++++++ src/qemu/qemu_capabilities.h | 1 + 2 files changed, 9 insertions(+) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index f456e8a378..bf73b083b3 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -755,6 +755,7 @@ VIR_ENUM_IMPL(virQEMUCaps, "disk-timed-stats", /* QEMU_CAPS_DISK_TIMED_STATS */ "query-accelerators", /* QEMU_CAPS_QUERY_ACCELERATORS */ "mshv", /* QEMU_CAPS_MSHV */ + "netdev.tap.use.fd.vhostfd.plural", /* QEMU_CAPS_NETDEV_TAP_= FD_VHOSTFD_PLURAL */ ); @@ -5874,6 +5875,13 @@ virQEMUCapsProbeQMPSchemaCapabilities(virQEMUCaps *q= emuCaps, virQEMUQAPISchemaPathExists("block-stream/arg-type/backing-mask-pr= otocol", schema)) virQEMUCapsSet(qemuCaps, QEMU_CAPS_BLOCKJOB_BACKING_MASK_PROTOCOL); + /* QEMU-11.0 deprecated use of 'fd' and 'vhostfd' for TAP netdevs but = the + * replacement ('fds', 'vhostfds' for one FD) doesn't reliably work in + * all versions which support the attributes. Detect deprecation or ab= sence. */ + if (virQEMUQAPISchemaPathExists("netdev_add/arg-type/+tap/vhostfd/$dep= recated", schema) || + !virQEMUQAPISchemaPathExists("netdev_add/arg-type/+tap/vhostfd", s= chema)) + virQEMUCapsSet(qemuCaps, QEMU_CAPS_NETDEV_TAP_FD_VHOSTFD_PLURAL); + return 0; } diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index f180844e66..22318c769c 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -730,6 +730,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for = syntax-check */ QEMU_CAPS_DISK_TIMED_STATS, /* timed stats support ('stats-intervals' = property of disk frontends) */ QEMU_CAPS_QUERY_ACCELERATORS, /* query-accelerators command */ QEMU_CAPS_MSHV, /* -accel mshv */ + QEMU_CAPS_NETDEV_TAP_FD_VHOSTFD_PLURAL, /* use 'fds' and 'vhostfds' al= so for 1 fd 'tap' in -netdev */ QEMU_CAPS_LAST /* this must always be the last item */ } virQEMUCapsFlags; --=20 2.53.0