From nobody Mon Feb 9 11:28:42 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 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=1558352294; cv=none; d=zoho.com; s=zohoarc; b=S6nYzAp0PmnBUF8Deu24X3qyTpzKL2zbG4iiJreyrAn+bIZ+UlaG1NfqgrUTJbGrXCY7GeOoJJCQJUknTqfwTNLAydDvIl+Gn9wNnUlg5RlzZhdaBciyyJpKbLDPLcBFxjmX0kTeBbuAW6WUcUYNiSB3kbsXSTbk+bxIMi5JlYA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1558352294; h=Content-Type:Content-Transfer-Encoding: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:ARC-Authentication-Results; bh=hb+DFMwVG1wDVVy6ZECIjthZtisV+L/Hy9EEHWBrjPs=; b=BQVkDae2mlcntnIVe8RBxEtH278U5DVrMGOrdrUx7CnCFKkY+WJeexOTn6Ryk4RRh76nA3iDKV3/GTHTxMo29tarYwu/ZVeDTTcQUdqLDDPvsq09oTIli4paDheX3PO//OH6LInPOHp2NtsUM2KDH0UvIFQE5kVAEgbCU8vNTcQ= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1558352294276752.7252286909804; Mon, 20 May 2019 04:38:14 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 300EC8830C; Mon, 20 May 2019 11:38:13 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 06D815D6A6; Mon, 20 May 2019 11:38:13 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id AF14B5EC71; Mon, 20 May 2019 11:38:12 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x4KBc6ZN019672 for ; Mon, 20 May 2019 07:38:06 -0400 Received: by smtp.corp.redhat.com (Postfix) id 011EE5DD7B; Mon, 20 May 2019 11:38:06 +0000 (UTC) Received: from kinshicho.redhat.com (ovpn-204-17.brq.redhat.com [10.40.204.17]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5A8835D9D1 for ; Mon, 20 May 2019 11:38:05 +0000 (UTC) From: Andrea Bolognani To: libvir-list@redhat.com Date: Mon, 20 May 2019 13:37:51 +0200 Message-Id: <20190520113753.12345-7-abologna@redhat.com> In-Reply-To: <20190520113753.12345-1-abologna@redhat.com> References: <20190520113753.12345-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 6/8] conf: Add IOMMU support to virDomainDeviceInfoIterate() X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Mon, 20 May 2019 11:38:13 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Now that we can safely iterate over devices that don't have an associated virDomainDeviceInfo, supporting IOMMU devices is no longer a problem. Signed-off-by: Andrea Bolognani --- src/conf/domain_conf.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 16820424be..eda424dbef 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -4252,6 +4252,13 @@ virDomainDeviceInfoIterateInternal(virDomainDefPtr d= ef, return rc; } =20 + if (def->iommu) { + device.type =3D VIR_DOMAIN_DEVICE_IOMMU; + device.data.iommu =3D def->iommu; + if ((rc =3D cb(def, &device, NULL, opaque)) !=3D 0) + return rc; + } + /* Coverity is not very happy with this - all dead_error_condition */ #if !STATIC_ANALYSIS /* This switch statement is here to trigger compiler warning when addi= ng --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list