From nobody Wed Apr 15 07:04:07 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=1775531819; cv=none; d=zohomail.com; s=zohoarc; b=SgPGR7EjzN/hhMLKA4vjhEo1h6EIpdEG9br2b/hvSxC+qokV1jdMxyicQw4J4UX7Lq66OMSdDd/lA/+3kcyniKB3oPFYOYBg4God0qbUaVPChCPZaOTBc4UFzZOjfFYa11t+YfwinqEYnfot7ZZ1wDCHBkW11lSUwrGDUQKItO4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1775531819; 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=eU4uds0xl/WV3NDo8Yw41Og2apsHyW+IKCaLH9J3PCc=; b=exxvi/xdBMceD9ruwGm+YqkUNsVWsBPbYNwChTNR63CTd/1nKMEkndZ8xd1B6QHngzzbaLHbmont59jTxVyjh7kobdxolzysFqmzf+N27CFOxGf8js0hSLFBiwWPj8uYxUxI7u1CtVXSWfWgysItAkFKIJQNKE1nQHsKpwpr540= 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 1775531819160220.53075972897784; Mon, 6 Apr 2026 20:16:59 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 993) id 1E1F441822; Mon, 6 Apr 2026 23:16:58 -0400 (EDT) Received: from [172.19.199.12] (lists.libvirt.org [8.43.85.245]) by lists.libvirt.org (Postfix) with ESMTP id B62C64190F; Mon, 6 Apr 2026 23:15:45 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 993) id F1ED53F302; Mon, 6 Apr 2026 23:15:39 -0400 (EDT) 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 021BD3F304 for ; Mon, 6 Apr 2026 23:15:36 -0400 (EDT) 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-122-Xb9c14KzPqC6LLL7YhyZAg-1; Mon, 06 Apr 2026 23:15:35 -0400 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (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 94F29195608F for ; Tue, 7 Apr 2026 03:15:34 +0000 (UTC) Received: from vhost3.router.laine.org (unknown [10.22.64.2]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 344BA300019F for ; Tue, 7 Apr 2026 03:15:34 +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=-4.8 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HELO_MISC_IP,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=1775531736; 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=eU4uds0xl/WV3NDo8Yw41Og2apsHyW+IKCaLH9J3PCc=; b=GgGO6uC78Uf+YtFnset81at+qCVtFPBywDvFkPiiA5K9Ig7lMEvdJW9jy6IWRXQJfTqaix F6w04yzl+gbYlzMzuPCTjWiHp6pXk7U6p8gd1qaeIeUpQF11CTZmnyzIUQeoWv6EJSbMiu SU1LC22mYX3T5d60rdUb+lD/Dl8cCso= X-MC-Unique: Xb9c14KzPqC6LLL7YhyZAg-1 X-Mimecast-MFC-AGG-ID: Xb9c14KzPqC6LLL7YhyZAg_1775531734 To: devel@lists.libvirt.org Subject: [PATCH 1/2] qemu: log error on attempts to change backend type of live network interface Date: Mon, 6 Apr 2026 23:15:31 -0400 Message-ID: <20260407031532.238518-2-laine@redhat.com> In-Reply-To: <20260407031532.238518-1-laine@redhat.com> References: <20260407031532.238518-1-laine@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: 3nMtkaN0GYg48-KoJuGRXTAMz5x_OGDjYF81Aznedfo_1775531734 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: CWX6IG4LX6DALJIIZF7BEM2OSSPCPYDG X-Message-ID-Hash: CWX6IG4LX6DALJIIZF7BEM2OSSPCPYDG X-MailFrom: laine@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: Laine Stump via Devel Reply-To: Laine Stump X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1775531821153158500 Content-Type: text/plain; charset="utf-8"; x-default="true" From: Laine Stump Somehow we've never checked for this, and nobody has ever tested for it or complained about it, but certainly attempting to change a user or vhostuser network device to/from a passt backend wouldn't work. Now we check for it and log an error. Signed-off-by: Laine Stump Reviewed-by: Peter Krempa --- src/qemu/qemu_hotplug.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index 9439948089..7ab28bed6d 100644 --- a/src/qemu/qemu_hotplug.c +++ b/src/qemu/qemu_hotplug.c @@ -3808,6 +3808,12 @@ qemuDomainChangeNet(virQEMUDriver *driver, goto cleanup; } =20 + if (olddev->backend.type !=3D newdev->backend.type) { + virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s", + _("cannot change backend type of network interface"= )); + goto cleanup; + } + /* Check individual attributes for changes that can't be done to a * live netdev. These checks *mostly* go in order of the * declarations in virDomainNetDef in order to assure nothing is --=20 2.53.0 From nobody Wed Apr 15 07:04:07 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=1775531864; cv=none; d=zohomail.com; s=zohoarc; b=f8xkQKyhYq1Jqw1q/o7f0ozYvTENEffgWhqtaqSQNrZCUUQWiYZOsW5XCI6l5VEiloPKrQMqLA2IVH1nStb6fieYb1zbc2QRIG6xtJS+f25nBoVaLfeOGAiLQFtqzxt8V0WIOZ1UiUGbTubh4X/DRUwGDLZL3/ztU6ez+1S9UC4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1775531864; 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=afe5//I6StmSpw41xphtTjplJ+vhpaO1pjVTl/guE+g=; b=M31GbiBFoyB2xdGmezJ3GI3Ft9t/lIKDoDQkq2XCrv8yTlSF8+AeJoNvX4aRxeQ7eU731wMMvDQwVxb+c0/ue+BCXaTq31P8j6chPtPkfMrpsTOfVI5/vHqDF6Uyi0yIOGMQXWvJHamNkJIjWSZF1ob/eRsevRbBGtPIMbTj7XY= 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 1775531864284253.00782630244157; Mon, 6 Apr 2026 20:17:44 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 993) id B78833F302; Mon, 6 Apr 2026 23:17:43 -0400 (EDT) Received: from [172.19.199.12] (lists.libvirt.org [8.43.85.245]) by lists.libvirt.org (Postfix) with ESMTP id 5E5874198A; Mon, 6 Apr 2026 23:15:46 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 993) id 296C43F2FF; Mon, 6 Apr 2026 23:15:40 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.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 028213F308 for ; Mon, 6 Apr 2026 23:15:37 -0400 (EDT) Received: from mx-prod-mc-05.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-279-v-hueOeGOBSmHtgp6DU5rw-1; Mon, 06 Apr 2026 23:15:36 -0400 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (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-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 3CBB21956080 for ; Tue, 7 Apr 2026 03:15:35 +0000 (UTC) Received: from vhost3.router.laine.org (unknown [10.22.64.2]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id D8220300019F for ; Tue, 7 Apr 2026 03:15:34 +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=-2.8 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HELO_MISC_IP,MAILING_LIST_MULTI,PDS_OTHER_BAD_TLD, 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=1775531737; 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=afe5//I6StmSpw41xphtTjplJ+vhpaO1pjVTl/guE+g=; b=Tmw7mVpvUTxOpofshYRPg3xx06nvfHetTgJiikx7AbBl/7f6FsAPwp4Ii1Tvsw+T6+TeSE yVsdVCpN+kEqb2yPh6UuM/1MQ0JXAvFxrW0J5cpHZdaThWDPG39bg6D5O4lWZb4xICgVeA xTKEisYo7zPj8Zy5+XpqDwHLWGvp+aE= X-MC-Unique: v-hueOeGOBSmHtgp6DU5rw-1 X-Mimecast-MFC-AGG-ID: v-hueOeGOBSmHtgp6DU5rw_1775531735 To: devel@lists.libvirt.org Subject: [PATCH 2/2] qemu: allow update-device of vhostuser network devices Date: Mon, 6 Apr 2026 23:15:32 -0400 Message-ID: <20260407031532.238518-3-laine@redhat.com> In-Reply-To: <20260407031532.238518-1-laine@redhat.com> References: <20260407031532.238518-1-laine@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: iAaptecL30NUzF4fBWqKZrH72IIwhDR5186_RvNe0W4_1775531735 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: FIXZE4QKBYBBBFCVZB6FEKME2JCQJWJB X-Message-ID-Hash: FIXZE4QKBYBBBFCVZB6FEKME2JCQJWJB X-MailFrom: laine@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: Laine Stump via Devel Reply-To: Laine Stump X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1775531868538154100 Content-Type: text/plain; charset="utf-8"; x-default="true" From: Laine Stump When support for vhostuser devices was added, it was just blanket-prevented from making any changes to a live device with update-device. This is problematic because the link state of a network device is modified with update-device. Most all of the parameters of a vhostuser network device are individually checked within qemuDomainChangeNet() anyway, so we don't need to just do a BRS (Big Red Switch) forbidding of any change. We do need to check for modifications to the socket parameters (path, type, reconnect) though, since those are vhostuser-specific (we're not already checking for them elsewhere) and they can't be changed on a live interface. Resolves https://redhat.atlassian.net/browse/RHEL-152533 Resolves: https://bugs.passt.top/show_bug.cgi?id=3D198 Signed-off-by: Laine Stump Reviewed-by: Peter Krempa --- src/qemu/qemu_hotplug.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index 7ab28bed6d..e33ef5e1e9 100644 --- a/src/qemu/qemu_hotplug.c +++ b/src/qemu/qemu_hotplug.c @@ -4129,6 +4129,24 @@ qemuDomainChangeNet(virQEMUDriver *driver, break; =20 case VIR_DOMAIN_NET_TYPE_VHOSTUSER: + /* the path the to vhostuser socket and its parameters + * can't be changed. In the case of a PASST backend using + * vhostuser, all of those parameters are internally + * generated anyway, so the user wouldn't be able to + * specify them in the updated XML. + */ + if (newdev->backend.type !=3D VIR_DOMAIN_NET_BACKEND_PASST && + (STRNEQ_NULLABLE(olddev->data.vhostuser->data.nix.path, ne= wdev->data.vhostuser->data.nix.path) || + olddev->data.vhostuser->data.nix.listen !=3D newdev->data= .vhostuser->data.nix.listen || + olddev->data.vhostuser->data.nix.reconnect.enabled !=3D n= ewdev->data.vhostuser->data.nix.reconnect.enabled || + olddev->data.vhostuser->data.nix.reconnect.timeout !=3D n= ewdev->data.vhostuser->data.nix.reconnect.timeout)) { + virReportError(VIR_ERR_OPERATION_UNSUPPORTED, + _("unable to change socket config on '%1$s'= network type"), + virDomainNetTypeToString(newdev->type)); + goto cleanup; + } + break; + case VIR_DOMAIN_NET_TYPE_HOSTDEV: case VIR_DOMAIN_NET_TYPE_VDPA: case VIR_DOMAIN_NET_TYPE_NULL: --=20 2.53.0