From nobody Mon Feb 9 12:15:26 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.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 216.205.24.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=1633712256; cv=none; d=zohomail.com; s=zohoarc; b=brHD87dMHa03sm1wtg/PFG9ZQCAyaAqYUCu2vWm6RU6VmT5uO06nNfQNg8WbyEQCfnHBNVupwCjqWHlXO+m7CnuU1m8uN6OM0vLtjCRleJvv88oXlzx/XrAadChoW33GBG6thLAsE4ularxWGf1wsEt3EuG0zAMn3glFFLFRY9I= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1633712256; 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; bh=OHS7Rd+T90PxA2ARo16jHP/mS98j4Jf3Q8ql3Fmsb0A=; b=KL8x9U6+Dut+m9wOTuZwzvtszNf7Suyoh+F+KGFqMIotuw9DA4d9GMsMSRS6HzboPtoi79MUwDdYz3rkJzP3FBunJt4JUBR50DOlRUN/MzvHMoDV8Ai87zt1CLluYor9wlVTgegCtDS4M/kEtGlwh18Ey4SIDtYJ2eUJ2aV/WXY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.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 [216.205.24.124]) by mx.zohomail.com with SMTPS id 1633712256809773.8914282749128; Fri, 8 Oct 2021 09:57:36 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-157-z01qSqcjNsWDdDCT5rnwVA-1; Fri, 08 Oct 2021 12:52:32 -0400 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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id AE0161966320; Fri, 8 Oct 2021 16:52:26 +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 8FF305F4E3; Fri, 8 Oct 2021 16:52:26 +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 5E00F4EA40; Fri, 8 Oct 2021 16:52:26 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 198GqKPS013309 for ; Fri, 8 Oct 2021 12:52:20 -0400 Received: by smtp.corp.redhat.com (Postfix) id 359B75F4EE; Fri, 8 Oct 2021 16:52:20 +0000 (UTC) Received: from harajuku.usersys.redhat.com (unknown [10.40.195.77]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 851025F4E3 for ; Fri, 8 Oct 2021 16:52:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1633712255; h=from:from:sender:sender: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:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=OHS7Rd+T90PxA2ARo16jHP/mS98j4Jf3Q8ql3Fmsb0A=; b=DSRYI+0ZodxS2zWyOHuHJ5+h/Wq8iEE4jOjzBel3e+8D+zitUlSJ1cv//oPTHbgHDMc55t 5NJ+rRMHRSeX/z0ott9/TEE5gVN6pJoYKBYS/JFlQETr5BW7AI5nhwk6nD4/pWaKYA7ivh x41gcrVujowIsZuvCMpj7OFlFh1WoHA= X-MC-Unique: z01qSqcjNsWDdDCT5rnwVA-1 From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH 05/21] conf: Add IOMMU support to virDomainDeviceDefCopy() Date: Fri, 8 Oct 2021 18:51:40 +0200 Message-Id: <20211008165156.405216-6-abologna@redhat.com> In-Reply-To: <20211008165156.405216-1-abologna@redhat.com> References: <20211008165156.405216-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com 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: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com 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: 1633712258312100001 Content-Type: text/plain; charset="utf-8" There doesn't seem to be a reason for IOMMUs not to be handled by this function. Signed-off-by: Andrea Bolognani --- src/conf/domain_conf.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index df51d59e0d..60f2b1129f 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -29588,6 +29588,10 @@ virDomainDeviceDefCopy(virDomainDeviceDef *src, virDomainShmemDefFormat(&buf, src->data.shmem, flags); rc =3D 0; break; + case VIR_DOMAIN_DEVICE_IOMMU: + virDomainIOMMUDefFormat(&buf, src->data.iommu); + rc =3D 0; + break; case VIR_DOMAIN_DEVICE_VSOCK: virDomainVsockDefFormat(&buf, src->data.vsock); rc =3D 0; @@ -29600,7 +29604,6 @@ virDomainDeviceDefCopy(virDomainDeviceDef *src, case VIR_DOMAIN_DEVICE_SMARTCARD: case VIR_DOMAIN_DEVICE_MEMBALLOON: case VIR_DOMAIN_DEVICE_NVRAM: - case VIR_DOMAIN_DEVICE_IOMMU: case VIR_DOMAIN_DEVICE_LAST: virReportError(VIR_ERR_INTERNAL_ERROR, _("Copying definition of '%d' type " --=20 2.31.1