From nobody Tue Mar 3 04:55:51 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=1771245903; cv=none; d=zohomail.com; s=zohoarc; b=TurEXZf6JlQnnNdPsFn1xypkQ+29NCOMDgpd563sXm+0R52wS7Myjz4eQb94N1XlvXRzv6Pild5KhmIG9dIbCxko4sRly/iJfg3aCN8jOhCn+yxqi+Ii17JE5sru5k1yZ1cIZFjcym3DJ5NqhHUA2zD0m9k8E3cJtGZLDO+Qid0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1771245903; 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=kIWkcMSOLnN+PZvko0ucRRBVh381kJ5PvsFhhJYp/ss=; b=bu77Bx4ToYlMUhw8+ncIb2HQKeC7+MN0/TOCvuNVVmopIx64rPcxbT4dKQqTZujBhO8n8+rT3rEJD0CnlFkGzcnRbGR1ng5+eCGJ87Iiq4X5muQsqgVFNPO/IoaFzHnr99hitzCG0odYAfPbx/NJAK4tBKZUtxZoFFPj2VUKK4s= 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 17712459032561018.1786736764457; Mon, 16 Feb 2026 04:45:03 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 993) id AE74541800; Mon, 16 Feb 2026 07:45:02 -0500 (EST) Received: from [172.19.199.9] (lists.libvirt.org [8.43.85.245]) by lists.libvirt.org (Postfix) with ESMTP id 3477941CFD; Mon, 16 Feb 2026 07:34:23 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 993) id 2BA3E3F8C6; Mon, 16 Feb 2026 07:34:14 -0500 (EST) 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 5B83E419AC for ; Mon, 16 Feb 2026 07:28:42 -0500 (EST) 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-180-jurcVJexNjGbx_PXmtDqZA-1; Mon, 16 Feb 2026 07:28:40 -0500 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 B71261955D8F for ; Mon, 16 Feb 2026 12:28:39 +0000 (UTC) Received: from antique-laptop.rosnicka.net (unknown [10.45.242.10]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 0A3FE30001A5 for ; Mon, 16 Feb 2026 12:28:38 +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=-5.0 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,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=1771244922; 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=kIWkcMSOLnN+PZvko0ucRRBVh381kJ5PvsFhhJYp/ss=; b=WG4mcvKdiVfcMknkXrQyQIlKPCNkVJqSygT/no0dYoGaqbfkF3+ciWbjbu3BLCev2C8Z1u iz/TMzqQyVgCZVi93kYFmBa9wIyZAEQGn12QHH6riHcajjae+HGT5La+QAsQ/wobHQC4Ie 2k+bfLXP6oJYNmSZSa/4cXHIhqui6bs= X-MC-Unique: jurcVJexNjGbx_PXmtDqZA-1 X-Mimecast-MFC-AGG-ID: jurcVJexNjGbx_PXmtDqZA_1771244919 To: devel@lists.libvirt.org Subject: [libvirt PATCH 19/24] qemu: Save IOMMUFD state into status XML Date: Mon, 16 Feb 2026 13:28:11 +0100 Message-ID: In-Reply-To: References: 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: ebDazvaVyhotS_fl1ikMFmN7v6SjPSRRzxm9ra3XcZc_1771244919 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: GF7XSA7XV62TLKP56BBGFWKNNCRJZHZC X-Message-ID-Hash: GF7XSA7XV62TLKP56BBGFWKNNCRJZHZC X-MailFrom: phrdina@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: Pavel Hrdina via Devel Reply-To: Pavel Hrdina X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1771245906203154100 Content-Type: text/plain; charset="utf-8"; x-default="true" We need to track if iommufd object was added to the VM when we add hotplug support. Signed-off-by: Pavel Hrdina --- src/qemu/qemu_command.c | 2 ++ src/qemu/qemu_domain.c | 6 ++++++ src/qemu/qemu_domain.h | 1 + 3 files changed, 9 insertions(+) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 724f0cd8eb..cdf2f91ece 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -5366,6 +5366,8 @@ qemuBuildIOMMUFDCommandLine(virCommand *cmd, if (qemuBuildObjectCommandlineFromJSON(cmd, props) < 0) return -1; =20 + priv->iommufdState =3D true; + return 0; } =20 diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index ada9d3431c..ccbfc8bac7 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -1976,6 +1976,7 @@ qemuDomainObjPrivateDataClear(qemuDomainObjPrivate *p= riv) priv->migrationRecoverSetup =3D false; =20 g_clear_pointer(&priv->iommufd, qemuFDPassDirectFree); + priv->iommufdState =3D false; =20 g_clear_pointer(&priv->memoryBackingDir, g_free); } @@ -2844,6 +2845,9 @@ qemuDomainObjPrivateXMLFormat(virBuffer *buf, priv->preMigrationMemlock); } =20 + if (priv->iommufdState) + virBufferAddLit(buf, "\n"); + return 0; } =20 @@ -3582,6 +3586,8 @@ qemuDomainObjPrivateXMLParse(xmlXPathContextPtr ctxt, return -1; } =20 + priv->iommufdState =3D virXPathBoolean("boolean(./iommufd)", ctxt) =3D= =3D 1; + return 0; } =20 diff --git a/src/qemu/qemu_domain.h b/src/qemu/qemu_domain.h index fa7d4ab40f..5755d2adb0 100644 --- a/src/qemu/qemu_domain.h +++ b/src/qemu/qemu_domain.h @@ -265,6 +265,7 @@ struct _qemuDomainObjPrivate { GHashTable *fds; =20 qemuFDPassDirect *iommufd; + bool iommufdState; /* true if --object iommufd was added */ =20 char *memoryBackingDir; }; --=20 2.53.0