From nobody Sun Feb 8 18:33:15 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1676375526; cv=none; d=zohomail.com; s=zohoarc; b=EB/gaRurG1krj2nCy8nRQWkDGySdUgnf8VNEI7UvKvNvALQuQMWoSizm5xAW+WjBRTI8uxUq+YFIlcIYNiCsPf0yER63I6K0MphDsa2nT1gIlqBvrH2qdQkKFgMKLzlLrmK0D1MTK0dPYVAcke+SAZTQufcijFjJwWgxAENNjiI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1676375526; h=Content-Type: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=0hM631/fI8CcDfZboKHrXCjjp0T/Vab2DlMll3CJvdk=; b=HIsnmgy2zPSDAUkeJo6gE6nnJ1yKhcqOfmRdN7/IL0nOJarXtp6jQF0tRL+5+q5eMFyk+GD7VZqnP1cGRuh6U9VO4ZUAE1uQH7sfFVBnXCRFmCehwk7AC7O26HN0LNhfWIXnaFeijxdLdOTP9R4T9PF7+wmyvyyL1eOsH4WLuqk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1676375526494256.18508810042533; Tue, 14 Feb 2023 03:52:06 -0800 (PST) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-287-0pm2Mqu2NpG1l8MO7xW5Bg-1; Tue, 14 Feb 2023 06:51:31 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id A929B80D0E2; Tue, 14 Feb 2023 11:51:28 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9253835454; Tue, 14 Feb 2023 11:51:28 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 778571946588; Tue, 14 Feb 2023 11:51:28 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id B1EFB1946588 for ; Tue, 14 Feb 2023 11:51:26 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id A44591415108; Tue, 14 Feb 2023 11:51:26 +0000 (UTC) Received: from maggie.redhat.com (unknown [10.43.2.39]) by smtp.corp.redhat.com (Postfix) with ESMTP id 14BC3140EBF6; Tue, 14 Feb 2023 11:51:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1676375525; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=0hM631/fI8CcDfZboKHrXCjjp0T/Vab2DlMll3CJvdk=; b=C9dugJdACwlC02FAmJRFz3Ycm3vnclDlFwBZq4o/imTNv2IOYCI2vP70rGK2as+1+M4U1I njLA/5SBZWpJsjcMT+F1pd8DSyV8trY+bY6TZerduT5H+F+aUNTiR5ueNMF8aeO+Wvqyq0 X7n6RGP4VlQKPCaHEWe71VlghGcgF2k= X-MC-Unique: 0pm2Mqu2NpG1l8MO7xW5Bg-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH 2/4] qemu_extdevice: Make qemuExtDevicesHasDevice() check def->nets Date: Tue, 14 Feb 2023 12:51:20 +0100 Message-Id: <446dd5c17d7c3aa302f30253edc33fa8788100fa.1676374699.git.mprivozn@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.7 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: sbrivio@redhat.com, passt-dev@passt.top Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1676375527904100001 Content-Type: text/plain; charset="utf-8"; x-default="true" We can have external helper processes running for domain too (e.g. slirp or passt). But this is not reflected in qemuExtDevicesHasDevice() which simply ignores these. Signed-off-by: Michal Privoznik Reviewed-by: Laine Stump --- src/qemu/qemu_extdevice.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/qemu/qemu_extdevice.c b/src/qemu/qemu_extdevice.c index fdefe59215..47e97f3565 100644 --- a/src/qemu/qemu_extdevice.c +++ b/src/qemu/qemu_extdevice.c @@ -296,6 +296,17 @@ qemuExtDevicesHasDevice(virDomainDef *def) return true; } =20 + for (i =3D 0; i < def->nnets; i++) { + virDomainNetDef *net =3D def->nets[i]; + + if (QEMU_DOMAIN_NETWORK_PRIVATE(net)->slirp) + return true; + + if (net->type =3D=3D VIR_DOMAIN_NET_TYPE_USER && + net->backend.type =3D=3D VIR_DOMAIN_NET_BACKEND_PASST) + return true; + } + for (i =3D 0; i < def->ntpms; i++) { if (def->tpms[i]->type =3D=3D VIR_DOMAIN_TPM_TYPE_EMULATOR) return true; --=20 2.39.1