From nobody Fri Dec 19 15:49:10 2025 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=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 1740121632670329.97102439238347; Thu, 20 Feb 2025 23:07:12 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 996) id E63DD2254; Fri, 21 Feb 2025 02:07:11 -0500 (EST) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id BC4EC1DB9; Fri, 21 Feb 2025 02:06:50 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 996) id 537BB1DAE; Fri, 21 Feb 2025 02:06:47 -0500 (EST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.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 CDB8B1DA3 for ; Fri, 21 Feb 2025 02:06:46 -0500 (EST) Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-317-Yl_ssfvBMQuASZ88vq7Qvg-1; Fri, 21 Feb 2025 02:06:44 -0500 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (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-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 2468119783B2 for ; Fri, 21 Feb 2025 07:06:44 +0000 (UTC) Received: from vhost3.router.laine.org (unknown [10.22.88.37]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id A6E471800359 for ; Fri, 21 Feb 2025 07:06:43 +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=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1740121606; 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; bh=TQt938eo2sp4JQEw0gFNLEie3UB/ZtebsH9nU+SEKug=; b=bX0u1sTM5YB6D3gMJe5+KyuJUiY6ZIvPab2DDT4kjM8DSO/mYthgLMoAE21yAhX28skADG grNjwG5iUQRIcvyE4ugTBhL9GoqTnJ6ME/R+bmsCkHIFyhpQuyA/mVDFuKsGxFJ9WXwA5y Aj5josaSCE+f5jBzYMOhqU8v7tldPSo= X-MC-Unique: Yl_ssfvBMQuASZ88vq7Qvg-1 X-Mimecast-MFC-AGG-ID: Yl_ssfvBMQuASZ88vq7Qvg_1740121604 From: Laine Stump To: devel@lists.libvirt.org Subject: [PATCH] qemu: forbid a few unsupported things for vhost-user/passt interfaces Date: Fri, 21 Feb 2025 02:06:42 -0500 Message-ID: <20250221070642.4278-1-laine@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: RfhakuERwQm6w-8fyJI-NfchB9bVGRJOfe5-1dPatJw_1740121604 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: HIQFTYQI2FWBNSZSB5TJ2Z53CGSAXGK6 X-Message-ID-Hash: HIQFTYQI2FWBNSZSB5TJ2Z53CGSAXGK6 X-MailFrom: laine@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: X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1740121635559019000 Content-Type: text/plain; charset="utf-8"; x-default="true" passt in vhost-user mode doesn't support using multiple queues. The path of the socket is auto-generated by libvirt for vhost-user/passt; it can't be set by the user The passt end of a vhost-user socket is always the server, and the qemu end is always a client. Signed-off-by: Laine Stump Reviewed-by: Michal Privoznik --- src/qemu/qemu_validate.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c index 3e3e368da3..53affcdcff 100644 --- a/src/qemu/qemu_validate.c +++ b/src/qemu/qemu_validate.c @@ -1824,6 +1824,22 @@ qemuValidateDomainDeviceDefNetwork(const virDomainNe= tDef *net, net->backend.type =3D=3D VIR_DOMAIN_NET_BACKEND_PASST) { if (qemuValidateDomainDefVhostUserRequireSharedMemory(def, "interf= ace type=3D\"vhostuser\" backend type=3D\"passt\"") < 0) return -1; + + if (net->driver.virtio.queues > 0) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("interface type=3D\"vhostuser\" backend type= =3D\"passt\" does not support multiple queues")); + return -1; + } + if (net->data.vhostuser->data.nix.path) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("'path' attribute cannot be set for interface= type=3D\"vhostuser\" backend type=3D\"passt\"")); + return -1; + } + if (net->data.vhostuser->data.nix.listen) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("mode=3D\"server\" is not supported for inter= face type=3D\"vhostuser\" backend type=3D\"passt\"")); + return -1; + } } =20 if (net->type =3D=3D VIR_DOMAIN_NET_TYPE_VDPA) { --=20 2.48.1