From nobody Wed Jun 24 21:40:04 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 38.145.34.151 as permitted sender) client-ip=38.145.34.151; 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 38.145.34.151 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=1781185020; cv=none; d=zohomail.com; s=zohoarc; b=faPnBjBMfzZbH6uueOlr+0CSkwh59hmhSCrTCs+D6YBnW2PwbDvZBPIW6OtP020jELf8SxBCOHr7ueyOnLZLdsdn9WHsDeptZJhS/kse2RT9MemJgIqGdU02ZQoqdITlHY/TucMopX7A0FVsDeaaZ/vHfqMVT50D0E2iXgXl9Uw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1781185020; 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=tCiBPLjYrBCTQQCVAn1AiGFximK8+lFcuFXqksv6DL4=; b=lQFNSRwM0ufNcTS5uGua+NQbX4/x+/WA6EYEoi/4Zotab43clDMoDK/83Rtvd4mfE7a+lIB5Kcxs782SL9Zvu/bbFDUQ1XDs/73dbLXjCuVP2dN9YNrN4PxH2ANYChGHQMBckEO3Z5QOExG1SFL7iodgewTsYJOTSklIXorqBgo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 38.145.34.151 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 [38.145.34.151]) by mx.zohomail.com with SMTPS id 1781185020339170.61264194510352; Thu, 11 Jun 2026 06:37:00 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 993) id 527C641E48; Thu, 11 Jun 2026 09:36:58 -0400 (EDT) Received: from [172.19.199.4] (unknown [10.16.107.18]) by lists.libvirt.org (Postfix) with ESMTP id 48EC741CF1; Thu, 11 Jun 2026 09:32:51 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 993) id 25D63419CF; Thu, 11 Jun 2026 09:32:36 -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 32A22419F4 for ; Thu, 11 Jun 2026 09:32:34 -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-648-lGICZfC-MYWCCfMcgjA3PQ-1; Thu, 11 Jun 2026 09:32:32 -0400 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (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 5C1B3195DE10 for ; Thu, 11 Jun 2026 13:32:31 +0000 (UTC) Received: from speedmetal.openshiftapps.com (unknown [10.44.22.17]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 54DEA1954B16 for ; Thu, 11 Jun 2026 13:32:30 +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=0.6 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL,RCVD_IN_SBL_CSS,SPF_HELO_PASS autolearn=no autolearn_force=no version=4.0.1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1781184753; 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=tCiBPLjYrBCTQQCVAn1AiGFximK8+lFcuFXqksv6DL4=; b=iS8t65lllOwv28uaCn4t7BD1H7QI87tazBDi6jjqQwUz2EwwO+kvFfyYHTtTkuiEWHR4Ck TWICM+hrHuifa73IrSqCeFe+JF52rfuM4iwvcZqhHmLogFsYQsWwmcpGTem1/HQBBVgArf Sbsa9AINKB0DlezWHHaKRKCPmEMPVFU= X-MC-Unique: lGICZfC-MYWCCfMcgjA3PQ-1 X-Mimecast-MFC-AGG-ID: lGICZfC-MYWCCfMcgjA3PQ_1781184751 To: devel@lists.libvirt.org Subject: [PATCH 01/20] qemu: capabilities: Apply 'capability_filters' configration option on all capabilities Date: Thu, 11 Jun 2026 15:32:03 +0200 Message-ID: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: qSZQ5eIchjGpOuyGjVGEHiSVoA0ATKDeoJ-Si2qCAV0_1781184751 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: MLYKW5UL5QMLN7QXCHJJ2KG63XQCZLPG X-Message-ID-Hash: MLYKW5UL5QMLN7QXCHJJ2KG63XQCZLPG X-MailFrom: pkrempa@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: Peter Krempa via Devel Reply-To: Peter Krempa X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1781185021904158500 Content-Type: text/plain; charset="utf-8" From: Peter Krempa The 'capability_filters' allows admins to globally disable some qemu capabilities via the config file. Until now it was applied only directly when starting the VM, but that is too late as the capability is still present when e.g. the post-parse code is picking defaults. Rework the code so that 'capability_filters' is applied directly after probing qemu so all existing capabilities will lack the filtered out ones. Signed-off-by: Peter Krempa Reviewed-by: Michal Privoznik --- src/qemu/qemu_capabilities.c | 21 ++++++++++++++++++--- src/qemu/qemu_capabilities.h | 3 ++- src/qemu/qemu_capspriv.h | 3 ++- src/qemu/qemu_driver.c | 23 ++++++++++++++++++++++- src/qemu/qemu_process.c | 19 +++---------------- tests/qemucapsprobe.c | 3 ++- tests/testutilsqemu.c | 3 ++- 7 files changed, 51 insertions(+), 24 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 1c89c0a1de..961fbfc336 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -4551,6 +4551,11 @@ struct _virQEMUCapsCachePriv { /* cache whether /dev/kvm is usable as runUid:runGuid */ virTristateBool kvmUsable; time_t kvmCtime; + + /* qemu.conf allows masking out supported capabilities via + * 'capabilities_filter' configuration. 'maskedCaps' if non-NULL + * maps out which bits are to be removed */ + virBitmap *maskedCaps; }; typedef struct _virQEMUCapsCachePriv virQEMUCapsCachePriv; @@ -4564,6 +4569,7 @@ virQEMUCapsCachePrivFree(void *privData) g_free(priv->kernelVersion); virCPUDataFree(priv->cpuData); g_free(priv->hostCPUSignature); + virBitmapFree(priv->maskedCaps); g_free(priv); } @@ -6123,7 +6129,8 @@ virQEMUCapsNewForBinaryInternal(virArch hostArch, const char *hostCPUSignature, unsigned int microcodeVersion, const char *kernelVersion, - virCPUData* cpuData) + virCPUData* cpuData, + virBitmap *maskedCaps) { g_autoptr(virQEMUCaps) qemuCaps =3D virQEMUCapsNewBinary(binary); struct stat sb; @@ -6162,6 +6169,10 @@ virQEMUCapsNewForBinaryInternal(virArch hostArch, qemuCaps->libvirtCtime =3D virGetSelfLastChanged(); qemuCaps->libvirtVersion =3D LIBVIR_VERSION_NUMBER; + /* If we have capabilities masked out via qemu.conf apply them here */ + if (maskedCaps) + virBitmapSubtract(qemuCaps->flags, maskedCaps); + if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_KVM)) virQEMUCapsInitHostCPUModel(qemuCaps, hostArch, VIR_DOMAIN_VIRT_KV= M); if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_HVF)) @@ -6202,7 +6213,8 @@ virQEMUCapsNewData(const char *binary, priv->hostCPUSignature, virHostCPUGetMicrocodeVersion(p= riv->hostArch), priv->kernelVersion, - priv->cpuData); + priv->cpuData, + priv->maskedCaps); } @@ -6241,7 +6253,8 @@ virFileCache * virQEMUCapsCacheNew(const char *libDir, const char *cacheDir, uid_t runUid, - gid_t runGid) + gid_t runGid, + virBitmap *maskedCaps) { g_autofree char *capsCacheDir =3D NULL; virFileCache *cache =3D NULL; @@ -6271,9 +6284,11 @@ virQEMUCapsCacheNew(const char *libDir, priv->kernelVersion =3D g_strdup_printf("%s %s", uts.release, uts.= version); priv->cpuData =3D virCPUDataGetHost(); + priv->maskedCaps =3D maskedCaps; return cache; error: + virBitmapFree(maskedCaps); virObjectUnref(cache); return NULL; } diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index b027d37bf3..71ae8514d5 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -868,7 +868,8 @@ char * virQEMUCapsGetDefaultEmulator(virArch hostarch, virFileCache *virQEMUCapsCacheNew(const char *libDir, const char *cacheDir, uid_t uid, - gid_t gid); + gid_t gid, + virBitmap *maskedCaps); virQEMUCaps *virQEMUCapsCacheLookup(virFileCache *cache, const char *binary); virQEMUCaps *virQEMUCapsCacheLookupCopy(virFileCache *cache, diff --git a/src/qemu/qemu_capspriv.h b/src/qemu/qemu_capspriv.h index 55286d7d29..9dca15d09b 100644 --- a/src/qemu/qemu_capspriv.h +++ b/src/qemu/qemu_capspriv.h @@ -36,7 +36,8 @@ virQEMUCapsNewForBinaryInternal(virArch hostArch, const char *hostCPUSignature, unsigned int microcodeVersion, const char *kernelVersion, - virCPUData* cpuData); + virCPUData* cpuData, + virBitmap *maskedCaps); int virQEMUCapsLoadCache(virArch hostArch, virQEMUCaps *qemuCaps, diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 544955ecf9..b4cc09c81a 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -539,6 +539,7 @@ qemuStateInitialize(bool privileged, const char *defsecmodel =3D NULL; g_autoptr(virIdentity) identity =3D virIdentityGetCurrent(); virDomainDriverAutoStartConfig autostartCfg; + g_autoptr(virBitmap) maskedCaps =3D NULL; qemu_driver =3D g_new0(virQEMUDriver, 1); @@ -848,10 +849,30 @@ qemuStateInitialize(bool privileged, run_gid =3D cfg->group; } + if (cfg->capabilityfilters) { + int tmp; + char **next; + + maskedCaps =3D virBitmapNew(0); + + for (next =3D cfg->capabilityfilters; *next; next++) { + if ((tmp =3D virQEMUCapsTypeFromString(*next)) < 0) { + virReportError(VIR_ERR_CONF_SYNTAX, + _("invalid capability_filters capability '%= 1$s'"), + *next); + return -1; + } + + virBitmapSetBitExpand(maskedCaps, tmp); + } + } + + qemu_driver->qemuCapsCache =3D virQEMUCapsCacheNew(cfg->libDir, cfg->cacheDir, run_uid, - run_gid); + run_gid, + g_steal_pointer(&mask= edCaps)); if (!qemu_driver->qemuCapsCache) goto error; diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 530cd442a5..019f1a0c21 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -5915,25 +5915,12 @@ static int qemuProcessStartUpdateCustomCaps(virDomainObj *vm) { qemuDomainObjPrivate *priv =3D vm->privateData; - g_autoptr(virQEMUDriverConfig) cfg =3D virQEMUDriverGetConfig(priv->dr= iver); qemuDomainXmlNsDef *nsdef =3D vm->def->namespaceData; - char **next; - int tmp; - - if (cfg->capabilityfilters) { - for (next =3D cfg->capabilityfilters; *next; next++) { - if ((tmp =3D virQEMUCapsTypeFromString(*next)) < 0) { - virReportError(VIR_ERR_INTERNAL_ERROR, - _("invalid capability_filters capability '%= 1$s'"), - *next); - return -1; - } - - virQEMUCapsClear(priv->qemuCaps, tmp); - } - } if (nsdef) { + char **next; + int tmp; + for (next =3D nsdef->capsadd; next && *next; next++) { if ((tmp =3D virQEMUCapsTypeFromString(*next)) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, diff --git a/tests/qemucapsprobe.c b/tests/qemucapsprobe.c index cd117170ab..8ce5c10dec 100644 --- a/tests/qemucapsprobe.c +++ b/tests/qemucapsprobe.c @@ -79,7 +79,8 @@ main(int argc, char **argv) return EXIT_FAILURE; if (!(caps =3D virQEMUCapsNewForBinaryInternal(VIR_ARCH_NONE, argv[1],= "/tmp", - -1, -1, NULL, 0, NULL, NU= LL))) + -1, -1, NULL, 0, NULL, NU= LL, + NULL))) return EXIT_FAILURE; host =3D virArchFromHost(); diff --git a/tests/testutilsqemu.c b/tests/testutilsqemu.c index 11097dbb3e..e5e3342b53 100644 --- a/tests/testutilsqemu.c +++ b/tests/testutilsqemu.c @@ -373,7 +373,8 @@ int qemuTestDriverInit(virQEMUDriver *driver) /* Using /dev/null for libDir and cacheDir automatically produces erro= rs * upon attempt to use any of them */ - driver->qemuCapsCache =3D virQEMUCapsCacheNew("/dev/null", "/dev/null"= , 0, 0); + driver->qemuCapsCache =3D virQEMUCapsCacheNew("/dev/null", "/dev/null", + 0, 0, NULL); if (!driver->qemuCapsCache) goto error; --=20 2.54.0 From nobody Wed Jun 24 21:40:04 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 38.145.34.151 as permitted sender) client-ip=38.145.34.151; 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 38.145.34.151 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=1781185087; cv=none; d=zohomail.com; s=zohoarc; b=WFnJyhDXW5R4xIbOBm45M9dNLXzSi6OiK82eVD71Lgmwm2a+TxalyoxohpzqrDcac9HVZobjz9r9KyJIGeUh7yhBbhTGGv6Enhgl+y6VxkI79iDj5c93ciNGsOTWMU0LJ6hSV337TL8eLVctzdEJ3bSjILozDHz9bFNZXk73woY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1781185087; 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=Ixf5e5P8aUsVmy/eDZaeO3j23MhCL1reL2wzrwtB7so=; b=EFZzRvxyXDmx8s/Gyw/RvxU3Oh0kNyg6sA2PMAgKH60/Z7cOhN4rViCcSOVj1pYHHUyWHX5f8qBSwaroI4vS5Fb7uyylyunJXoimfzh0k5GvgZYIbEdsGQXN9xgAdYZ2w06FFPbbRnXrz5TDTe2pLbx/LxmUledPt3IQOiBq3Rw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 38.145.34.151 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 [38.145.34.151]) by mx.zohomail.com with SMTPS id 1781185087823929.9932685415821; Thu, 11 Jun 2026 06:38:07 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 993) id 6C82543F2C; Thu, 11 Jun 2026 09:38:06 -0400 (EDT) Received: from [172.19.199.4] (unknown [10.16.107.18]) by lists.libvirt.org (Postfix) with ESMTP id 19BF241D35; Thu, 11 Jun 2026 09:32:56 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 993) id BE940419F5; Thu, 11 Jun 2026 09:32:37 -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 38CD4419C8 for ; Thu, 11 Jun 2026 09:32: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-20-jv6PIr4qOgW-AIsM6rRYBw-1; Thu, 11 Jun 2026 09:32:34 -0400 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (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 D3400195E926 for ; Thu, 11 Jun 2026 13:32:32 +0000 (UTC) Received: from speedmetal.openshiftapps.com (unknown [10.44.22.17]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id E4AA91954B0F for ; Thu, 11 Jun 2026 13:32:31 +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=0.6 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL,RCVD_IN_SBL_CSS,SPF_HELO_PASS autolearn=no autolearn_force=no version=4.0.1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1781184756; 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=Ixf5e5P8aUsVmy/eDZaeO3j23MhCL1reL2wzrwtB7so=; b=DG8aDPnONzH94RQtzEBJ5piaLQB03E5l3NBJOSTSQBAfsCW+jAiEVutey3sPWu2prFmAol gLgrmQfT2UV00NdCcca5UP6Tlcn5QhLYAtsGu26g0NWuKYVEf5pM+rR1q40xDIwnZGu65q sYA2wMWonGJHljpPELnlR4oYal/ptVg= X-MC-Unique: jv6PIr4qOgW-AIsM6rRYBw-1 X-Mimecast-MFC-AGG-ID: jv6PIr4qOgW-AIsM6rRYBw_1781184753 To: devel@lists.libvirt.org Subject: [PATCH 02/20] qemu: capabilities: Export 'virQEMUCapsNewCopy' outside of 'qemu_capspriv' Date: Thu, 11 Jun 2026 15:32:04 +0200 Message-ID: <2f44bd9aa5c7c4b48150adbb24489724f3a70db9.1781184454.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: Kz9Few51no60wcexIfgh8lmbTDNsMjUENurnn4jZ8XY_1781184753 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: 3RRJNOPV4YD6U2PL2NDUV3QAODF6EFGU X-Message-ID-Hash: 3RRJNOPV4YD6U2PL2NDUV3QAODF6EFGU X-MailFrom: pkrempa@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: Peter Krempa via Devel Reply-To: Peter Krempa X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1781185090573158500 Content-Type: text/plain; charset="utf-8" From: Peter Krempa Upcoming patch will add a function which will need to optionally copy passed capabilities for modification. Export 'virQEMUCapsNewCopy' outside of tests. Signed-off-by: Peter Krempa Reviewed-by: Michal Privoznik --- src/qemu/qemu_capabilities.c | 3 ++- src/qemu/qemu_capabilities.h | 2 ++ src/qemu/qemu_capspriv.h | 2 -- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 961fbfc336..3810d3f5f8 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -2095,7 +2095,8 @@ virQEMUCapsAccelCopy(virQEMUCapsAccel *dst, } -virQEMUCaps *virQEMUCapsNewCopy(virQEMUCaps *qemuCaps) +virQEMUCaps * +virQEMUCapsNewCopy(virQEMUCaps *qemuCaps) { g_autoptr(virQEMUCaps) ret =3D virQEMUCapsNewBinary(qemuCaps->binary); size_t i; diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index 71ae8514d5..3014f3dc5e 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -883,6 +883,8 @@ virQEMUCaps *virQEMUCapsCacheLookupDefault(virFileCache= *cache, virDomainVirtType *retVirttyp= e, const char **retMachine); +virQEMUCaps *virQEMUCapsNewCopy(virQEMUCaps *qemuCaps); + virCaps *virQEMUCapsInit(virFileCache *cache); int virQEMUCapsGetDefaultVersion(virCaps *caps, diff --git a/src/qemu/qemu_capspriv.h b/src/qemu/qemu_capspriv.h index 9dca15d09b..3dfff2e3d8 100644 --- a/src/qemu/qemu_capspriv.h +++ b/src/qemu/qemu_capspriv.h @@ -25,8 +25,6 @@ #pragma once -virQEMUCaps *virQEMUCapsNewCopy(virQEMUCaps *qemuCaps); - virQEMUCaps * virQEMUCapsNewForBinaryInternal(virArch hostArch, const char *binary, --=20 2.54.0 From nobody Wed Jun 24 21:40:04 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 38.145.34.151 as permitted sender) client-ip=38.145.34.151; 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 38.145.34.151 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=1781185214; cv=none; d=zohomail.com; s=zohoarc; b=WSxjx1iGNNgCTs1o7gu8bDeQuxDku9U0nUbnKb68DHsaq4DUPwlbe1tnETTpIax6Kr7b97+M07UGNk9VQPaOcJbS9y2bKLiz7sL36BdTgz3pUP2x9auZ2Th8U8ZY6pabFfVCKxXeB4AHnqpstPkw9n6Miv/bR6J/rlJIF6n/slY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1781185214; 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=CiY754gFOoNHzPEGviqfcLRNnXZ7uucWVeONGIzqT8Q=; b=SQQD/JuHQT9leqbuf09L2DOSydLrUoxgCTGfB+AqSrmwJb0gZqha4dY/U+3pOShc56D6FlTCGiRAsWBLpHfylOCYlMEaqogOHN3r8M7+88xR/sBaz4K7XXryCGgAE9wa95hVW1DXpdtrjIn0TlwDxY/v++gSPV18Vd3FxN4sWkY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 38.145.34.151 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 [38.145.34.151]) by mx.zohomail.com with SMTPS id 1781185214078296.84344419465583; Thu, 11 Jun 2026 06:40:14 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 993) id BB15B41D40; Thu, 11 Jun 2026 09:40:12 -0400 (EDT) Received: from [172.19.199.4] (unknown [10.16.107.18]) by lists.libvirt.org (Postfix) with ESMTP id 6235A41D7D; Thu, 11 Jun 2026 09:33:03 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 993) id DC7EE419C8; Thu, 11 Jun 2026 09:32:38 -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 B07E3419D7 for ; Thu, 11 Jun 2026 09:32:37 -0400 (EDT) Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-597-79a_rUC8OEaFbOvA6h6lrg-1; Thu, 11 Jun 2026 09:32:36 -0400 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (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-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id D808018A1EED for ; Thu, 11 Jun 2026 13:32:34 +0000 (UTC) Received: from speedmetal.openshiftapps.com (unknown [10.44.22.17]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id A084C1954B09 for ; Thu, 11 Jun 2026 13:32:33 +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.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_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=1781184757; 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=CiY754gFOoNHzPEGviqfcLRNnXZ7uucWVeONGIzqT8Q=; b=c+1uC2O/4d9XotGjqnxTkjdxG1MkKloi9NbtleTzlwNr46g6vKw7lPXTAKi9nyB4oRRQiP 2mIhh2JxR28up7RCIsJHPyH75SIZesHWpMoKnXH7aDYudz4GXhvitO3oFqaEIjw/hAqhCX SUOIVo1mok9AX7Chrbf/jcNx4Zds1uo= X-MC-Unique: 79a_rUC8OEaFbOvA6h6lrg-1 X-Mimecast-MFC-AGG-ID: 79a_rUC8OEaFbOvA6h6lrg_1781184755 To: devel@lists.libvirt.org Subject: [PATCH 03/20] qemu: Allow reuse of 'qemuProcessStartUpdateCustomCaps' Date: Thu, 11 Jun 2026 15:32:05 +0200 Message-ID: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: DdH9U-EmaGJDfXaUxK1ERjWXvVSKwZvTrfKJTFeK7to_1781184755 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: 327PCSLZ5LYA4QPTMSKYUETG6SIIAMIC X-Message-ID-Hash: 327PCSLZ5LYA4QPTMSKYUETG6SIIAMIC X-MailFrom: pkrempa@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: Peter Krempa via Devel Reply-To: Peter Krempa X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1781185216149158500 Content-Type: text/plain; charset="utf-8" From: Peter Krempa Move and rename the function to 'qemuDomainUpdateCustomCapabilities' and modify the arguments so that it will be possible to reuse it also in the post-parse and validation code which ought to base decisions on the same logic as VM startup would. Since copying of the qemu capabilities object is very expensive (I've observed an almost 4x slowdown of qemuxmlconftest) 'qemuDomainUpdateCustomCapabilities' copies the capabilities only when necessary. Signed-off-by: Peter Krempa Reviewed-by: Michal Privoznik --- src/qemu/qemu_domain.c | 79 +++++++++++++++++++++++++++++++++++++++++ src/qemu/qemu_domain.h | 6 ++++ src/qemu/qemu_process.c | 42 +--------------------- 3 files changed, 86 insertions(+), 41 deletions(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 2f1d220966..e87ea8bdc0 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -11754,3 +11754,82 @@ qemuDomainMachineSupportsFloppy(const char *machin= e, return true; } + + +/** + * qemuDomainUpdateCustomCapabilities: + * @def: domain definition + * @qemuCaps: qemu capabilities + * @qemuCapsCopy: if non-NULL filled filled with a valid virQEMUCaps point= er (see below) + * + * Updates @qemuCaps based on the qemu namespace XML config for modifying + * capabilities: + * + * + * + * + * + * + * + * + * If @qemuCapsCopy is NULL, @qemuCaps is directly modified. + * + * If @qemuCapsCopy is non-NULL, it's always filled with a virQEMUCaps in= stance + * that the caller needs to unref. The following applies: + * - no caps modification needed: @qemuCaps is ref'd and filled into @qe= muCapsCopy + * - caps modifications are needed: @qemuCaps is copied into @qemuCapsCo= py and + * modifications happen on the copy + * + * Returns 0 on success (including when no modification was needed), -1 on + * error and reports libvirt errors. + */ +int +qemuDomainUpdateCustomCapabilities(const virDomainDef *def, + virQEMUCaps *qemuCaps, + virQEMUCaps **qemuCapsCopy) +{ + qemuDomainXmlNsDef *nsdef =3D def->namespaceData; + char **next; + int tmp; + + if (!nsdef || + (!nsdef->capsadd && !nsdef->capsdel)) { + + if (qemuCapsCopy) + *qemuCapsCopy =3D virObjectRef(qemuCaps); + + return 0; + } + + if (qemuCapsCopy) { + *qemuCapsCopy =3D virQEMUCapsNewCopy(qemuCaps); + + qemuCaps =3D *qemuCapsCopy; + } + + for (next =3D nsdef->capsadd; next && *next; next++) { + if ((tmp =3D virQEMUCapsTypeFromString(*next)) < 0) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("invalid qemu namespace capability '%1$s'"), + *next); + return -1; + } + + virQEMUCapsSet(qemuCaps, tmp); + } + + for (next =3D nsdef->capsdel; next && *next; next++) { + if ((tmp =3D virQEMUCapsTypeFromString(*next)) < 0) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("invalid qemu namespace capability '%1$s'"), + *next); + return -1; + } + + virQEMUCapsClear(qemuCaps, tmp); + } + + virQEMUCapsInitProcessCapsInterlock(qemuCaps); + + return 0; +} diff --git a/src/qemu/qemu_domain.h b/src/qemu/qemu_domain.h index 24e62dd2e7..f1654d8a19 100644 --- a/src/qemu/qemu_domain.h +++ b/src/qemu/qemu_domain.h @@ -1192,3 +1192,9 @@ qemuDomainMachineSupportsFloppy(const char *machine, virObject * qemuDomainHostdevPrivateNew(void); + +int +qemuDomainUpdateCustomCapabilities(const virDomainDef *def, + virQEMUCaps *qemuCaps, + virQEMUCaps **qemuCapsCopy) + ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT; diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 019f1a0c21..cbe5cb33d3 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -5911,43 +5911,6 @@ qemuProcessStartValidate(virQEMUDriver *driver, } -static int -qemuProcessStartUpdateCustomCaps(virDomainObj *vm) -{ - qemuDomainObjPrivate *priv =3D vm->privateData; - qemuDomainXmlNsDef *nsdef =3D vm->def->namespaceData; - - if (nsdef) { - char **next; - int tmp; - - for (next =3D nsdef->capsadd; next && *next; next++) { - if ((tmp =3D virQEMUCapsTypeFromString(*next)) < 0) { - virReportError(VIR_ERR_INTERNAL_ERROR, - _("invalid qemu namespace capability '%1$s'= "), - *next); - return -1; - } - - virQEMUCapsSet(priv->qemuCaps, tmp); - } - - for (next =3D nsdef->capsdel; next && *next; next++) { - if ((tmp =3D virQEMUCapsTypeFromString(*next)) < 0) { - virReportError(VIR_ERR_INTERNAL_ERROR, - _("invalid qemu namespace capability '%1$s'= "), - *next); - return -1; - } - - virQEMUCapsClear(priv->qemuCaps, tmp); - } - } - - return 0; -} - - /** * qemuProcessPrepareQEMUCaps: * @vm: domain object @@ -5971,12 +5934,9 @@ qemuProcessPrepareQEMUCaps(virDomainObj *vm, return -1; /* Update qemu capabilities according to lists passed in via namespace= */ - if (qemuProcessStartUpdateCustomCaps(vm) < 0) + if (qemuDomainUpdateCustomCapabilities(vm->def, priv->qemuCaps, NULL) = < 0) return -1; - /* re-process capability lockouts since we might have removed capabili= ties */ - virQEMUCapsInitProcessCapsInterlock(priv->qemuCaps); - return 0; } --=20 2.54.0 From nobody Wed Jun 24 21:40:04 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 38.145.34.151 as permitted sender) client-ip=38.145.34.151; 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 38.145.34.151 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=1781185277; cv=none; d=zohomail.com; s=zohoarc; b=SqVAxMJv4zp/Pgru6N5CDB5ftYCPm61VOXLB+jo8I3ft9BzRxezT0arvoss7vc7TS5rX7oxFCiC/HmwR0TJOM9cOFNvPpsNQ1Xj+zOCefKa8FTomyF1YqpJYD0yA/NtYXKiulaXeL+ahzn14VCi6NqyG+ytDDZlH7fZhysEtla0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1781185277; 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=lwLCJm62XDxCeVu8wCnam5MGU35c5nRr90E9BZFxF48=; b=nmJEOxCOhliGcekPR7+nB+WWZ4JRHZd8M/OR+br/AgZYSSJapzPqv1qqxdiO2BiuXRioj3EJobuj70h8FWoMjZ8O7TD0Bvd4bC7OrggMZDcS/uvpi+H62uTGyzRQljB2XpChwxNmgTDee+zaZKddEH+hZ/jyl3w32UNi7s2w7S8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 38.145.34.151 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 [38.145.34.151]) by mx.zohomail.com with SMTPS id 1781185277689612.758420375861; Thu, 11 Jun 2026 06:41:17 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 993) id 5849241D7D; Thu, 11 Jun 2026 09:41:16 -0400 (EDT) Received: from [172.19.199.4] (unknown [10.16.107.18]) by lists.libvirt.org (Postfix) with ESMTP id AF06F41DC6; Thu, 11 Jun 2026 09:33:08 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 993) id E778441BE2; Thu, 11 Jun 2026 09:32:42 -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 42BF2419CF for ; Thu, 11 Jun 2026 09:32:39 -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-661--k7aamo1NEKD_hgaiOYuzw-1; Thu, 11 Jun 2026 09:32:37 -0400 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (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 71BDD195F15B for ; Thu, 11 Jun 2026 13:32:36 +0000 (UTC) Received: from speedmetal.openshiftapps.com (unknown [10.44.22.17]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 517571954B11 for ; Thu, 11 Jun 2026 13:32:35 +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=0.6 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,RCVD_IN_SBL_CSS,SPF_HELO_PASS autolearn=no autolearn_force=no version=4.0.1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1781184759; 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=lwLCJm62XDxCeVu8wCnam5MGU35c5nRr90E9BZFxF48=; b=M2G5f9PI03PjHbLsaOHX3kPht5QQQttnezNifsad0yTQni64Z7wZA/t+TsQL90f7o/2FDI jlAFPZmeVZsUNYku6qjT1LbL2fMMI2YotocIbicAlGdlcIjiBbTTdFSh5QaR10R6/AnHyd Dr6irRMqSWkVrLKfzlE50EHNc4DcvBs= X-MC-Unique: -k7aamo1NEKD_hgaiOYuzw-1 X-Mimecast-MFC-AGG-ID: -k7aamo1NEKD_hgaiOYuzw_1781184756 To: devel@lists.libvirt.org Subject: [PATCH 04/20] qemu: validate: Validate VM config with qemuCaps influenced by Date: Thu, 11 Jun 2026 15:32:06 +0200 Message-ID: <6dd30e7d8453d3ac8b6f73eff90708fd2008ecd6.1781184454.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: X98f3DtZ_meWwQYpbEukf_rBgl2twGDRGV6NDAVO0y4_1781184756 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: AVKLP7UNVGTEFE7M3BS3NAE3B4KR4HO4 X-Message-ID-Hash: AVKLP7UNVGTEFE7M3BS3NAE3B4KR4HO4 X-MailFrom: pkrempa@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: Peter Krempa via Devel Reply-To: Peter Krempa X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1781185278158158500 Content-Type: text/plain; charset="utf-8" From: Peter Krempa The user configuration of added/removed qemu capabilities via the qemu namespace element was applied only right before generating a commandline, but the validation code didn't see these. Modify the validation entry points so that they apply this optionally. Signed-off-by: Peter Krempa Reviewed-by: Michal Privoznik --- src/qemu/qemu_validate.c | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c index 82ef761fb8..7c0ea402c3 100644 --- a/src/qemu/qemu_validate.c +++ b/src/qemu/qemu_validate.c @@ -1295,18 +1295,21 @@ qemuValidateDomainDef(const virDomainDef *def, void *parseOpaque) { virQEMUDriver *driver =3D opaque; + virQEMUCaps *qemuCapsIn =3D parseOpaque; g_autoptr(virQEMUCaps) qemuCapsLocal =3D NULL; - virQEMUCaps *qemuCaps =3D parseOpaque; + g_autoptr(virQEMUCaps) qemuCaps =3D NULL; size_t i; - if (!qemuCaps) { + if (!qemuCapsIn) { if (!(qemuCapsLocal =3D virQEMUCapsCacheLookup(driver->qemuCapsCac= he, def->emulator))) return -1; - - qemuCaps =3D qemuCapsLocal; + qemuCapsIn =3D qemuCapsLocal; } + if (qemuDomainUpdateCustomCapabilities(def, qemuCapsIn, &qemuCaps) < 0) + return -1; + if (def->os.type !=3D VIR_DOMAIN_OSTYPE_HVM) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("Emulator '%1$s' does not support os type '%2$s'"= ), @@ -6047,17 +6050,20 @@ qemuValidateDomainDeviceDef(const virDomainDeviceDe= f *dev, void *parseOpaque) { virQEMUDriver *driver =3D opaque; + virQEMUCaps *qemuCapsIn =3D parseOpaque; g_autoptr(virQEMUCaps) qemuCapsLocal =3D NULL; - virQEMUCaps *qemuCaps =3D parseOpaque; + g_autoptr(virQEMUCaps) qemuCaps =3D NULL; - if (!qemuCaps) { + if (!qemuCapsIn) { if (!(qemuCapsLocal =3D virQEMUCapsCacheLookup(driver->qemuCapsCac= he, def->emulator))) return -1; - - qemuCaps =3D qemuCapsLocal; + qemuCapsIn =3D qemuCapsLocal; } + if (qemuDomainUpdateCustomCapabilities(def, qemuCapsIn, &qemuCaps) < 0) + return -1; + if (qemuValidateDomainDeviceInfo(dev, def, qemuCaps) < 0) return -1; --=20 2.54.0 From nobody Wed Jun 24 21:40:04 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 38.145.34.151 as permitted sender) client-ip=38.145.34.151; 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 38.145.34.151 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=1781185334; cv=none; d=zohomail.com; s=zohoarc; b=NzbGzjByiFUsaeRm0mgJD1A7F2nCdopPvwF3LqVpT+vFMkp7XbyqwNafwivRLYi/56BibKkG5A5+LeuhoIf9xbZUUMfLwFrTcHdnht8yZ8XvnSRjXu4cHqzPmA/EHrIFuvRSrDrvWZ3Veri8vQNZRa/ShCMj4bCm3I8MemEthss= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1781185334; 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=Jp0aRlZWnqZ0SilBnEQRWP/qrZdpNptwpx84Jh4aonM=; b=Bp+XVwpwicyClJH0XL8T+Vl72h4s3JiOjRPWaGj/h/S/pCX8Loths4Xffm7s4WyTVt6T2cCgO6IynFBPVlAwOf2miu1eDKlM02PfhLl6LMh5hF8/dJTcWJF94jphBBrtK630NglRd9Zti09doGlplFQqZrxQ1nJG+CLCL/GJVJk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 38.145.34.151 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 [38.145.34.151]) by mx.zohomail.com with SMTPS id 1781185334322690.6338533979576; Thu, 11 Jun 2026 06:42:14 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 993) id 003B341D58; Thu, 11 Jun 2026 09:42:12 -0400 (EDT) Received: from [172.19.199.4] (unknown [10.16.107.18]) by lists.libvirt.org (Postfix) with ESMTP id A8E0A41E06; Thu, 11 Jun 2026 09:33:13 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 993) id 2D75741D88; Thu, 11 Jun 2026 09:33:04 -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 F0B5F41B94 for ; Thu, 11 Jun 2026 09:32:40 -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-176-JfV3PLKxOLC0Rd_5MBX8BA-1; Thu, 11 Jun 2026 09:32:39 -0400 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (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 459EB195DE57 for ; Thu, 11 Jun 2026 13:32:38 +0000 (UTC) Received: from speedmetal.openshiftapps.com (unknown [10.44.22.17]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id EDE6B1954210 for ; Thu, 11 Jun 2026 13:32:36 +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=0.6 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL,RCVD_IN_SBL_CSS,SPF_HELO_PASS autolearn=no autolearn_force=no version=4.0.1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1781184760; 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=Jp0aRlZWnqZ0SilBnEQRWP/qrZdpNptwpx84Jh4aonM=; b=RJYysRyPFxIj9bWUMI4c10SeRLYaxFNXbdOTVll2CokoboNk6Q1QoNUF4AZVLYY+U8aR8Y e6qQwCroJBD5t5GifxZBaLgI5ojawpmtaYlzGCelbbTQM602Y6nTtXX9cJ5/kOShOqdXay R0haHAyx6Q0NhWvaSlq2ho4TveKI+Cw= X-MC-Unique: JfV3PLKxOLC0Rd_5MBX8BA-1 X-Mimecast-MFC-AGG-ID: JfV3PLKxOLC0Rd_5MBX8BA_1781184758 To: devel@lists.libvirt.org Subject: [PATCH 05/20] qemu: postparse: Process VM config with qemuCaps influenced by Date: Thu, 11 Jun 2026 15:32:07 +0200 Message-ID: <5e4b43428cbbca955d3206533c72280a4426c479.1781184454.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: rIiN7bL1iwfHejE7YOvY1g7bbP0Dwrcf3Eor7psvLZo_1781184758 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: JDCAIC2D3RLC6FTNXJZ6FN6AB5FSUHYJ X-Message-ID-Hash: JDCAIC2D3RLC6FTNXJZ6FN6AB5FSUHYJ X-MailFrom: pkrempa@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: Peter Krempa via Devel Reply-To: Peter Krempa X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1781185336625158500 Content-Type: text/plain; charset="utf-8" From: Peter Krempa The user configuration of added/removed qemu capabilities via the qemu namespace element was applied only right before generating a commandline, but the post parse code code didn't see these. Apply the capability modification prior to running post parse code so that defaults are properly picked based on the configuration. Signed-off-by: Peter Krempa Reviewed-by: Michal Privoznik --- src/qemu/qemu_postparse.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_postparse.c b/src/qemu/qemu_postparse.c index 79e02e34ac..e4ff902ae1 100644 --- a/src/qemu/qemu_postparse.c +++ b/src/qemu/qemu_postparse.c @@ -1919,9 +1919,16 @@ qemuDomainPostParseDataAlloc(const virDomainDef *def, void **parseOpaque) { virQEMUDriver *driver =3D opaque; + g_autoptr(virQEMUCaps) qemuCapsLocal =3D NULL; - if (!(*parseOpaque =3D virQEMUCapsCacheLookup(driver->qemuCapsCache, - def->emulator))) + *parseOpaque =3D NULL; + + if (!(qemuCapsLocal =3D virQEMUCapsCacheLookup(driver->qemuCapsCache, + def->emulator))) + return 1; + + if (qemuDomainUpdateCustomCapabilities(def, qemuCapsLocal, + (virQEMUCaps **) parseOpaque) <= 0) return 1; return 0; --=20 2.54.0 From nobody Wed Jun 24 21:40:04 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 38.145.34.151 as permitted sender) client-ip=38.145.34.151; 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 38.145.34.151 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=1781185394; cv=none; d=zohomail.com; s=zohoarc; b=LXDeAVlNy5FXgJnmqoqSdv3VEUEltN0IuaYDW0zh+eus2efEcY0EodU/GftBBicw2kxKxGlkotUCLpBNuTmCkKfCUCwGjVqbeI9dm894ZU0G4EZNryojjEfiWssCfL0ujMHjPMw5F3rXAOzHJn2j6jlI4yxIAmTP7JMGDfIl+og= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1781185394; 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=QyY+9z9dxIyXkR2VNCoztEvxSaJR+jZMZug5Z3Bj3Gk=; b=D36+dVZeCkJhaMlhmMKExVSPgovTdKXqK2pAUpRVnJdqd8HxM8GJFNkVQwcO4d0bMiRB7eJGTKuqk/bpgFaqsxt7qR5VUXqBULCLlQij53o5Xbsvu+gzM6z/xndlGsSpgSC8IFEKbVlVbCl63GCUoKUjeIJlpqHOHRLl4bZ2OKc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 38.145.34.151 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 [38.145.34.151]) by mx.zohomail.com with SMTPS id 1781185394027388.9437205004497; Thu, 11 Jun 2026 06:43:14 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 993) id B9F3141C47; Thu, 11 Jun 2026 09:43:12 -0400 (EDT) Received: from [172.19.199.4] (unknown [10.16.107.18]) by lists.libvirt.org (Postfix) with ESMTP id 6132441E44; Thu, 11 Jun 2026 09:33:24 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 993) id A8A0D41ACC; Thu, 11 Jun 2026 09:33:15 -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 022EE41ACC for ; Thu, 11 Jun 2026 09:32:42 -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-669-gVjFUwYdOdWYptVWqd4Ppw-1; Thu, 11 Jun 2026 09:32:40 -0400 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (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 4C390195DE4F for ; Thu, 11 Jun 2026 13:32:39 +0000 (UTC) Received: from speedmetal.openshiftapps.com (unknown [10.44.22.17]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 5A2E11954B0D for ; Thu, 11 Jun 2026 13:32: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=0.6 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,RCVD_IN_SBL_CSS,SPF_HELO_PASS autolearn=no autolearn_force=no version=4.0.1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1781184762; 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=QyY+9z9dxIyXkR2VNCoztEvxSaJR+jZMZug5Z3Bj3Gk=; b=gW48+cCoIYqI9WKwF/v4rzAbNsPzyGWJUWn08mQs35pxOn7bOwrYhmD1NWaP1nd+B/nVH0 dLbPwxEaM2CJ6WGOPoZgxtZethp68OfqXVR1aHWBP89Zn3nGkKZsR7ec5Et7gAFgaUA14O rIyff7CWDvm9FLSJ2F+lTrYuJPTckwY= X-MC-Unique: gVjFUwYdOdWYptVWqd4Ppw-1 X-Mimecast-MFC-AGG-ID: gVjFUwYdOdWYptVWqd4Ppw_1781184759 To: devel@lists.libvirt.org Subject: [PATCH 06/20] virQEMUCapsCacheLookupDefault: Fix error message when no emulators are installed Date: Thu, 11 Jun 2026 15:32:08 +0200 Message-ID: <4846555005d54213cf8c411aba58ba8ff45194f6.1781184454.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: jDmFYrNW3HbQrdqKZFkIalg7BOiH8qBWZO5VjRYl-YI_1781184759 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: QUTY3KIIV5WCVKZGINXBCM6UCNIGBFWU X-Message-ID-Hash: QUTY3KIIV5WCVKZGINXBCM6UCNIGBFWU X-MailFrom: pkrempa@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: Peter Krempa via Devel Reply-To: Peter Krempa X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1781185395314158500 Content-Type: text/plain; charset="utf-8" From: Peter Krempa When querying capabilities for the default emulator with no other arguments (e.g. 'virsh domcapabilities) fix error whithout emulator installed an error is reported but the error would mention '(null)' architecture: # virsh domcapabilities error: failed to get emulator capabilities error: unsupported configuration: unable to find any emulator to serve '(= null)' architecture This happens as the error formatting takes 'archStr' which is NULL for the default architecture instead of using 'arch' which is populated by the host's architecture and converting it back. Signed-off-by: Peter Krempa Reviewed-by: Michal Privoznik --- src/qemu/qemu_capabilities.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 3810d3f5f8..a28f87ad2b 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -6385,7 +6385,7 @@ virQEMUCapsCacheLookupDefault(virFileCache *cache, if (!binary) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("unable to find any emulator to serve '%1$s' arch= itecture"), - archStr); + virArchToString(arch)); return NULL; } --=20 2.54.0 From nobody Wed Jun 24 21:40:04 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 38.145.34.151 as permitted sender) client-ip=38.145.34.151; 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 38.145.34.151 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=1781185465; cv=none; d=zohomail.com; s=zohoarc; b=MlNH9WyElIzQco3C7VMWbAuVER8a8cDeJMVkAtssb2KOCRdbp5W71GLo5TQ+Jp1MZf1bym6bh9CtQ5h+0wHyN47hi8OGvKXA3B2M/J/C0P0feLod8wH5If7qAyPTlsqmK4rrB2nL+leKzV5mnKmsQh5mTr9OB3JWDGWPAg8CMr4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1781185465; 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=4318Ixy5EqOXy51MMhFAQ0gzRmhaT+rAYTSgnwG8yv4=; b=G1CuVB/sXhkM9hu/dTo8VW0xzAP/NEfzHEDXleiybtOK2Ph6oth7waZv0LcYGxE/zDVz4JEJ07XMCGywJhnbjDfEb46Re/V4Z23dtkmhsSPnU/JzBVK/KagqrvpPsUqM3lGeXiCEZs0vi0cDjuVkOKTHcxhnCU5n98km7dbCv6Y= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 38.145.34.151 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 [38.145.34.151]) by mx.zohomail.com with SMTPS id 1781185465201924.3431927537024; Thu, 11 Jun 2026 06:44:25 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 993) id AF53C41D66; Thu, 11 Jun 2026 09:44:23 -0400 (EDT) Received: from [172.19.199.4] (unknown [10.16.107.18]) by lists.libvirt.org (Postfix) with ESMTP id 97C2F423E2; Thu, 11 Jun 2026 09:33:32 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 993) id 2AC9D41E41; Thu, 11 Jun 2026 09:33:24 -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 B130A41C34 for ; Thu, 11 Jun 2026 09:32:43 -0400 (EDT) Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-533-mMpF7et_M-68irVYrqjN_A-1; Thu, 11 Jun 2026 09:32:41 -0400 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (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-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 8A2F9188EB4F for ; Thu, 11 Jun 2026 13:32:40 +0000 (UTC) Received: from speedmetal.openshiftapps.com (unknown [10.44.22.17]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id B176F1954B09 for ; Thu, 11 Jun 2026 13:32:39 +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.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_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=1781184763; 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=4318Ixy5EqOXy51MMhFAQ0gzRmhaT+rAYTSgnwG8yv4=; b=e1hE8lsmutay3aA4nC9Uxo76M9zVdpWi9Ju3VkLwh3cyzzPPBjBwhtHtvb3jeOAuo9zhu7 6ZFuiiDNyl4DE7bh8dTyfwyIslGBEN+rb9Im3K67+G4iVyBlUWC24PXxBfHhsVGKk603hd PQWz9ko+JODb/qkPm0YWO0TCSCHR4+A= X-MC-Unique: mMpF7et_M-68irVYrqjN_A-1 X-Mimecast-MFC-AGG-ID: mMpF7et_M-68irVYrqjN_A_1781184760 To: devel@lists.libvirt.org Subject: [PATCH 07/20] qemuxmlconfdata: un-symlink 'video-virtio-vga-gpu-gl' output Date: Thu, 11 Jun 2026 15:32:09 +0200 Message-ID: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: SchxkDLcE4TJl8UDj7C4i7cXJw_OABX0SqTcXXhfb4U_1781184760 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: J7JM4P57ITIPMSNSOJE52K4D2A67QI3R X-Message-ID-Hash: J7JM4P57ITIPMSNSOJE52K4D2A67QI3R X-MailFrom: pkrempa@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: Peter Krempa via Devel Reply-To: Peter Krempa X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1781185465862158501 Content-Type: text/plain; charset="utf-8" From: Peter Krempa Upcoming patches will add additional testing for various virtio-*-gl devices, including filling of the default model. The output file needs to not influnece the input for this test to work properly. Signed-off-by: Peter Krempa Reviewed-by: Michal Privoznik --- .../video-virtio-vga-gpu-gl.x86_64-latest.xml | 47 ++++++++++++++++++- 1 file changed, 46 insertions(+), 1 deletion(-) mode change 120000 =3D> 100644 tests/qemuxmlconfdata/video-virtio-vga-gpu-= gl.x86_64-latest.xml diff --git a/tests/qemuxmlconfdata/video-virtio-vga-gpu-gl.x86_64-latest.xm= l b/tests/qemuxmlconfdata/video-virtio-vga-gpu-gl.x86_64-latest.xml deleted file mode 120000 index 34e32ab8ba..0000000000 --- a/tests/qemuxmlconfdata/video-virtio-vga-gpu-gl.x86_64-latest.xml +++ /dev/null @@ -1 +0,0 @@ -video-virtio-vga-gpu-gl.xml \ No newline at end of file diff --git a/tests/qemuxmlconfdata/video-virtio-vga-gpu-gl.x86_64-latest.xm= l b/tests/qemuxmlconfdata/video-virtio-vga-gpu-gl.x86_64-latest.xml new file mode 100644 index 0000000000..991141c643 --- /dev/null +++ b/tests/qemuxmlconfdata/video-virtio-vga-gpu-gl.x86_64-latest.xml @@ -0,0 +1,46 @@ + + QEMUGuest1 + c7a5fdbd-edaf-9455-926a-d65c16db1809 + 1048576 + 1048576 + 1 + + hvm + + + + qemu64 + + + destroy + restart + destroy + + /usr/bin/qemu-system-x86_64 + +
+ + +
+ + + + +