From nobody Mon Mar 23 23:23:29 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=1773229245; cv=none; d=zohomail.com; s=zohoarc; b=Sw1jHOr43QzNj7LsaqutHz7SgHApzpI+oauOcf7IAizPRNYSdWFkxl2wnSQj7Fn+LlzUALEedH80t0ysajHyJgwaP9bVQaIf53TAWEltDDZ1BjtD5IfVYM3AOSChChiBjH6tU5AG1FyOYO0SgNGZu/IpY3Nzo3tVQykVnFjv6HE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1773229245; 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=BiuPSmr4gQLFYh4zeMeFU4TPCgpKrk12a6ww2uTqi60=; b=eK/Uz/dgrzPNXBVTpTMeQERgrk0TGPHBsV3QoNrru0oKh6Vo9PGN+xMQm26MtNyyxJvVUMFg/46jE5sYaEyzkx5L9KlWpKalOAxLem1qh1YV56n4VFcRgp0X7jiQjKO7IqYNvZyPIW+T8Ny7ho5GqTcXDqzdvRp+fDcqZSzvzCY= 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 177322924550612.340465573312827; Wed, 11 Mar 2026 04:40:45 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 993) id 6E6C2419CA; Wed, 11 Mar 2026 07:40:44 -0400 (EDT) Received: from [172.19.199.12] (lists.libvirt.org [8.43.85.245]) by lists.libvirt.org (Postfix) with ESMTP id CB4B141AC3; Wed, 11 Mar 2026 07:39:32 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 993) id 73E6D3F316; Wed, 11 Mar 2026 07:39:28 -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 03A6D3F308 for ; Wed, 11 Mar 2026 07:39:27 -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-552-TBuebN9kMvGOFX4dODTuxA-1; Wed, 11 Mar 2026 07:39:26 -0400 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (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 B7A4E19560AA for ; Wed, 11 Mar 2026 11:39:25 +0000 (UTC) Received: from orkuz (unknown [10.43.3.115]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 51366180035F for ; Wed, 11 Mar 2026 11:39:25 +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.6 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HELO_MISC_IP,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=1773229167; 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=BiuPSmr4gQLFYh4zeMeFU4TPCgpKrk12a6ww2uTqi60=; b=NF87bjTgugQ/5vl8G3Z+YBl/iRYvf71pJE32tHFU8+JiPB+DIcMVtW35Gx4QNCmRWJrlf7 iogas92+qhAgzKvC0CcqJvGtqMxz6nJAx9LpBBIEsjxOWvjqSX9WiRuX6ogdZ1GFIEu5Ll t9+3chziAuBgu39exZJN2dGQiDWQM9w= X-MC-Unique: TBuebN9kMvGOFX4dODTuxA-1 X-Mimecast-MFC-AGG-ID: TBuebN9kMvGOFX4dODTuxA_1773229165 To: devel@lists.libvirt.org Subject: [PATCH 1/4] Introduce EXPAND_CPU_FEATURES flag for domain capabilities Date: Wed, 11 Mar 2026 12:39:18 +0100 Message-ID: <710b10f1e2f047c562e9bf3cf44b9f48c602ba52.1773228421.git.jdenemar@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: Njr5NucVTjIpFLY7vfI73gT_itDcvih9VhJX9d5Cqx4_1773229165 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: K7N7J2I2ZFPLPZOQONY735ZAJQQXVIC4 X-Message-ID-Hash: K7N7J2I2ZFPLPZOQONY735ZAJQQXVIC4 X-MailFrom: jdenemar@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: Jiri Denemark via Devel Reply-To: Jiri Denemark X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1773229247394158500 Content-Type: text/plain; charset="utf-8" From: Jiri Denemark The new VIR_CONNECT_GET_DOMAIN_CAPABILITIES_EXPAND_CPU_FEATURES flag for virConnectGetDomainCapabilities can be used to request the host-model CPU definition to include all supported features (normally only extra features relative to the selected CPU model are listed). Signed-off-by: Jiri Denemark Reviewed-by: Peter Krempa --- include/libvirt/libvirt-domain.h | 2 ++ src/libvirt-domain.c | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/include/libvirt/libvirt-domain.h b/include/libvirt/libvirt-dom= ain.h index d82406fe05..ccc2c87ea8 100644 --- a/include/libvirt/libvirt-domain.h +++ b/include/libvirt/libvirt-domain.h @@ -1517,6 +1517,8 @@ int virDomainMigrateStartPostCopy(virDomainPtr domain, typedef enum { /* Report host model with deprecated features disabled. (Since: 11.0.0= ) */ VIR_CONNECT_GET_DOMAIN_CAPABILITIES_DISABLE_DEPRECATED_FEATURES =3D (1= << 0), + /* Report all host model CPU features. (Since: 12.2.0) */ + VIR_CONNECT_GET_DOMAIN_CAPABILITIES_EXPAND_CPU_FEATURES =3D (1 << 1), } virConnectGetDomainCapabilitiesFlags; =20 char * virConnectGetDomainCapabilities(virConnectPtr conn, diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c index a1f6efde20..6b8783d57f 100644 --- a/src/libvirt-domain.c +++ b/src/libvirt-domain.c @@ -12330,6 +12330,11 @@ virDomainSetUserPassword(virDomainPtr dom, * instance, if host, libvirt and qemu is capable of VFIO * passthrough and so on. * + * If @flags includes VIR_CONNECT_GET_DOMAIN_CAPABILITIES_EXPAND_CPU_FEATU= RES, + * libvirt will explicitly list all CPU features (in host-model CPU defini= tion) + * that are supported on the host. Without this flag features that are par= t of + * the CPU model itself will not be listed. + * * Returns NULL in case of error or an XML string * defining the capabilities. * --=20 2.53.0 From nobody Mon Mar 23 23:23:29 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=1773229321; cv=none; d=zohomail.com; s=zohoarc; b=iZFWw1qxSBuh0hBD+JMBfPTQL54ZrsYPCDXjR82nuwAgW5pb5434cinaPCoVy17OoHTJW8aFOfOVhek52Gb4Xi/4fmA9rqm+eudMNNNtSUp8XW4W/AydcJD2ocp7QY+vQ2XkXjILPyBgvSEk8YxKyG/Pmn6+7XeQ/4s8qd82jKc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1773229321; 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=nbzBJ3d3qDutGCmUoyZCLdMwiFSyXxaoBr3zah6jx5s=; b=OfQvUQwUk2kA3eWDCcbVcVkW91m9WsAGHlQKXGNqB9Iv/NwAkCXAxO5EnOxYAo+Wtt38dD3bT71e0HQb0fN/Z+aDurFi8uF4cooegziWyRhs2ReJtTmFjHBNKSghYOnbfD7gtRZbHTw+R/kLNJW4VKeIXP/Cbf7H9kolI+vUhLU= 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 177322932101595.45465805384617; Wed, 11 Mar 2026 04:42:01 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 993) id 0759D41945; Wed, 11 Mar 2026 07:42:00 -0400 (EDT) Received: from [172.19.199.12] (lists.libvirt.org [8.43.85.245]) by lists.libvirt.org (Postfix) with ESMTP id 71E4441AC6; Wed, 11 Mar 2026 07:40:49 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 993) id 496F5418D6; Wed, 11 Mar 2026 07:40:46 -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 9E13D418A0 for ; Wed, 11 Mar 2026 07:39:35 -0400 (EDT) Received: from mx-prod-mc-06.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-379-c64SFuZ-Pbaq-JIXx5psxQ-1; Wed, 11 Mar 2026 07:39:28 -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-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 98B8D1800365 for ; Wed, 11 Mar 2026 11:39:27 +0000 (UTC) Received: from orkuz (unknown [10.43.3.115]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 312B019560A6 for ; Wed, 11 Mar 2026 11:39:26 +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.6 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HELO_MISC_IP,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=1773229175; 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=nbzBJ3d3qDutGCmUoyZCLdMwiFSyXxaoBr3zah6jx5s=; b=C+1WkGYyV+SPFakPFQPEFUs7HshFaWoqq7V7UTSxJwEtTGg6zWPk6sWeEBxtjVTsYs4yeo OqzNdLURBBXqN9pMxb5Ip9ifOyuFlKaQuW6MOo1Eg60K8J5P06riN4pH8Bej+VaAR29iQx d2PMK9yl8ytmcitS3ipCEFtpnN9TJV0= X-MC-Unique: c64SFuZ-Pbaq-JIXx5psxQ-1 X-Mimecast-MFC-AGG-ID: c64SFuZ-Pbaq-JIXx5psxQ_1773229167 To: devel@lists.libvirt.org Subject: [PATCH 2/4] qemu: Implement VIR_CONNECT_GET_DOMAIN_CAPABILITIES_EXPAND_CPU_FEATURES Date: Wed, 11 Mar 2026 12:39:19 +0100 Message-ID: <28d5d3db764f35ee6428f471bc06a71a88769cae.1773228421.git.jdenemar@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: z9WwPYz7uzFD5gm7BmJF0Pekux4WUMohnkVlqJH83P0_1773229167 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: P65PS6MG2QR7XFHZEMJP7GUNCDTRUQKI X-Message-ID-Hash: P65PS6MG2QR7XFHZEMJP7GUNCDTRUQKI X-MailFrom: jdenemar@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: Jiri Denemark via Devel Reply-To: Jiri Denemark X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1773229323416158500 Content-Type: text/plain; charset="utf-8" From: Jiri Denemark Signed-off-by: Jiri Denemark Reviewed-by: Peter Krempa --- src/qemu/qemu_driver.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 7d33477636..8b148b33b4 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -16748,7 +16748,8 @@ qemuConnectGetDomainCapabilities(virConnectPtr conn, virDomainVirtType virttype; g_autoptr(virDomainCaps) domCaps =3D NULL; =20 - virCheckFlags(VIR_CONNECT_GET_DOMAIN_CAPABILITIES_DISABLE_DEPRECATED_F= EATURES, + virCheckFlags(VIR_CONNECT_GET_DOMAIN_CAPABILITIES_DISABLE_DEPRECATED_F= EATURES | + VIR_CONNECT_GET_DOMAIN_CAPABILITIES_EXPAND_CPU_FEATURES, NULL); =20 if (virConnectGetDomainCapabilitiesEnsureACL(conn) < 0) @@ -16774,6 +16775,12 @@ qemuConnectGetDomainCapabilities(virConnectPtr con= n, VIR_CPU_FEATURE_DISABLE); } =20 + if (flags & VIR_CONNECT_GET_DOMAIN_CAPABILITIES_EXPAND_CPU_FEATURES) { + virCPUDef *cpu =3D domCaps->cpu.hostModel; + if (cpu && virCPUExpandFeatures(arch, cpu) < 0) + return NULL; + } + return virDomainCapsFormat(domCaps); } =20 --=20 2.53.0 From nobody Mon Mar 23 23:23:29 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=1773229288; cv=none; d=zohomail.com; s=zohoarc; b=B4lhbB55ewKG4I+cp9v+nLqnAhXnECZhpaHGvwe09TKFT9inJ8smxo8W9NK6Ldvtuwg2Kjxxpy9DdtApnnUd7fH7y47Q1Ya/yB0E5sILOI7+jdcIA4srjC3keNKMlgiD9SGwW82s5kR4NWf3Op3wEU6Uz1vDU5KpK73jqgZ9wgo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1773229288; 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=lSmWDJzAfYAQ7GhXRLUSavEUVJnBZlNUSJcSgfiI0iU=; b=Zk6KtlLNMA3drR5VjYXXtcDX8S60odGtGyC+Z4HF4VXTdbbBDciZDB+plwEieju9H1wMMsYahzeknaFivrRZD1Cm4M3BAxSf+wHmp2NyR531qPA8XvrqVSK/S2z3avdVidBh2CohV90HxTJgQI1BRt7/b7MGKqSra/ah61+qMKU= 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 1773229288446169.00748076557022; Wed, 11 Mar 2026 04:41:28 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 993) id DF39F3FA60; Wed, 11 Mar 2026 07:41:27 -0400 (EDT) Received: from [172.19.199.12] (lists.libvirt.org [8.43.85.245]) by lists.libvirt.org (Postfix) with ESMTP id C321441AD5; Wed, 11 Mar 2026 07:40:09 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 993) id 535B04189F; Wed, 11 Mar 2026 07:40:06 -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 8BEA041967 for ; Wed, 11 Mar 2026 07:39:31 -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-453-t93kr3t5NcGE41es-KnnyA-1; Wed, 11 Mar 2026 07:39:30 -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 49A7518002D0 for ; Wed, 11 Mar 2026 11:39:29 +0000 (UTC) Received: from orkuz (unknown [10.43.3.115]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id D5DD719560A6 for ; Wed, 11 Mar 2026 11:39:28 +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.6 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HELO_MISC_IP,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=1773229171; 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=lSmWDJzAfYAQ7GhXRLUSavEUVJnBZlNUSJcSgfiI0iU=; b=DhdvGs5UdIkqT8Ycp0+w4EOMIZ35CYaoc0GMiNtcM3Hufhxk2QemmMWsFGGXqm+TlzVlnW EVDRBBMYk7j372kSUVNBma5EtMK24CGTzZ9q3/Q94eZAQKjJt/WnT5mXho1rRznbeb6b7s oDnLGhI3B1DrsRMA3Xp0uwqcaVApIMI= X-MC-Unique: t93kr3t5NcGE41es-KnnyA-1 X-Mimecast-MFC-AGG-ID: t93kr3t5NcGE41es-KnnyA_1773229169 To: devel@lists.libvirt.org Subject: [PATCH 3/4] virsh: Add --expand-cpu-features option for domcapabilities Date: Wed, 11 Mar 2026 12:39:20 +0100 Message-ID: <162180a3f63138ed615eac8ace3692e45c7f5444.1773228421.git.jdenemar@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: Tzde9iYdWYXb7NBPUsoesK6_V2KCIxcwFoqB2xF_2K8_1773229169 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: WMNMFXFYYKGJFMTDHSJB7Z6TMGIVLB2D X-Message-ID-Hash: WMNMFXFYYKGJFMTDHSJB7Z6TMGIVLB2D X-MailFrom: jdenemar@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: Jiri Denemark via Devel Reply-To: Jiri Denemark X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1773229291362154100 Content-Type: text/plain; charset="utf-8" From: Jiri Denemark Signed-off-by: Jiri Denemark Reviewed-by: Peter Krempa --- docs/manpages/virsh.rst | 5 +++++ tools/virsh-host.c | 7 +++++++ 2 files changed, 12 insertions(+) diff --git a/docs/manpages/virsh.rst b/docs/manpages/virsh.rst index b3e9289894..591c47a7ce 100644 --- a/docs/manpages/virsh.rst +++ b/docs/manpages/virsh.rst @@ -592,6 +592,7 @@ domcapabilities domcapabilities [virttype] [emulatorbin] [arch] [machine] [--xpath EXPRESSION] [--wrap] [--disable-deprecated-features] + [--expand-cpu-features] =20 =20 Print an XML document describing the domain capabilities for the @@ -638,6 +639,10 @@ of host-model CPU XML, updating the features list with= any features flagged as deprecated for the CPU model by the hypervisor. These features will be paired with the "disable" policy. =20 +The **--expand-cpu-features** option will cause the host-model CPU definit= ion +to contain all CPU features supported on the host including those implicit= ly +enabled by the selected CPU model. + =20 pool-capabilities ----------------- diff --git a/tools/virsh-host.c b/tools/virsh-host.c index e918cfa4ca..dd98917fa8 100644 --- a/tools/virsh-host.c +++ b/tools/virsh-host.c @@ -118,6 +118,10 @@ static const vshCmdOptDef opts_domcapabilities[] =3D { .type =3D VSH_OT_BOOL, .help =3D N_("report host CPU model with deprecated features disabled= "), }, + {.name =3D "expand-cpu-features", + .type =3D VSH_OT_BOOL, + .help =3D N_("show all features in host CPU model"), + }, {.name =3D NULL} }; =20 @@ -137,6 +141,9 @@ cmdDomCapabilities(vshControl *ctl, const vshCmd *cmd) if (vshCommandOptBool(cmd, "disable-deprecated-features")) flags |=3D VIR_CONNECT_GET_DOMAIN_CAPABILITIES_DISABLE_DEPRECATED_= FEATURES; =20 + if (vshCommandOptBool(cmd, "expand-cpu-features")) + flags |=3D VIR_CONNECT_GET_DOMAIN_CAPABILITIES_EXPAND_CPU_FEATURES; + if (vshCommandOptString(ctl, cmd, "virttype", &virttype) < 0 || vshCommandOptString(ctl, cmd, "emulatorbin", &emulatorbin) < 0 || vshCommandOptString(ctl, cmd, "arch", &arch) < 0 || --=20 2.53.0 From nobody Mon Mar 23 23:23:29 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=1773229351; cv=none; d=zohomail.com; s=zohoarc; b=JtpjpzZzxOKMW83f1bvjfy6CLAiY54Av9V6/3ZHtPSKbHqRL0gC7RuIAy4FRLxRlZj7Tc1rZS47YmrY4CwWMMiXYL0ZXcjh/kPjxndAUCB41msZOnOCXEUz6McgQnEOl/HZVoRrX0w4jQ4vPU3PzyoARxjfgvqXkBAQsYfsgvuo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1773229351; 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=368RFlTor7kACBQItqt1rH4ASstRLJGn0mCjgHsl+6U=; b=EvMUlYaI029zQl1yHp3wkiADPe+9ZRDnNh+JWdzUFSOi0aT2kaafmxe7WK7FqwPJ2Ui1dfy4tPzqnaVZXnuyE3hq/THhNEtLbB2DeiaAnGs/DzKKh2KyoYbDHakkKoH4Z2xYN8WI+42cJ3W3VE4YUiRg3TltVknowY61sWo57Y0= 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 1773229351885408.946489792169; Wed, 11 Mar 2026 04:42:31 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 993) id 3D84C3F96A; Wed, 11 Mar 2026 07:42:31 -0400 (EDT) Received: from [172.19.199.12] (lists.libvirt.org [8.43.85.245]) by lists.libvirt.org (Postfix) with ESMTP id 180D341B3A; Wed, 11 Mar 2026 07:40:52 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 993) id 5F5AE418D6; Wed, 11 Mar 2026 07:40:46 -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 6E2C141AC5 for ; Wed, 11 Mar 2026 07:39:33 -0400 (EDT) Received: from mx-prod-mc-03.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-636-a04O4jT1MOe6UpQjq4BPmg-1; Wed, 11 Mar 2026 07:39:31 -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-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 1D0651955D71 for ; Wed, 11 Mar 2026 11:39:31 +0000 (UTC) Received: from orkuz (unknown [10.43.3.115]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 933101955F2D for ; Wed, 11 Mar 2026 11:39: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=-2.6 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HELO_MISC_IP,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=1773229173; 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=368RFlTor7kACBQItqt1rH4ASstRLJGn0mCjgHsl+6U=; b=VqlyTwV0k2xWHuZQMYhxl4p4XAz7lNJIvrhQZcZq9pnki8jEZ59ecq7T4yPTgDJvTS4hx1 jG63MGLWkhDFMsDwe1bV2skDFDyaJxHHes2mZ8RTeY7l3S5sx+/NJRv21dtPbo/2zTRg26 v3KDROkloIbKQgJ17vMXoHyoFfQrJsM= X-MC-Unique: a04O4jT1MOe6UpQjq4BPmg-1 X-Mimecast-MFC-AGG-ID: a04O4jT1MOe6UpQjq4BPmg_1773229171 To: devel@lists.libvirt.org Subject: [PATCH 4/4] docs: Clarify host-model description in domain capabilities Date: Wed, 11 Mar 2026 12:39:21 +0100 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: aMv_bN76QiPrOZBAi_KZJGpSPLNWjTLDEfbnzxcTjQU_1773229171 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: TPHLWZBN3GDR53S7LE2ZZN2C4AWYFHIQ X-Message-ID-Hash: TPHLWZBN3GDR53S7LE2ZZN2C4AWYFHIQ X-MailFrom: jdenemar@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: Jiri Denemark via Devel Reply-To: Jiri Denemark X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1773229354481154100 Content-Type: text/plain; charset="utf-8" From: Jiri Denemark Signed-off-by: Jiri Denemark Reviewed-by: Peter Krempa --- docs/formatdomaincaps.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/formatdomaincaps.rst b/docs/formatdomaincaps.rst index 5a1d3f2670..ed935c704d 100644 --- a/docs/formatdomaincaps.rst +++ b/docs/formatdomaincaps.rst @@ -316,6 +316,10 @@ more details about it: reports physical address size of the host CPU if this value is availabl= e and applicable for the requested domain type. This is useful for computing baseline CPU definition which should be compatible with several hosts. + Consistently with all other CPU definitions used by libvirt, features + implicitly enabled by the selected CPU model (in ``model`` sub element)= are + not listed. Use ``--expand-cpu-features`` virsh option or the equivalen= t API + flag to request all supported features to be listed in the CPU definiti= on. ``custom`` The ``mode`` element contains a list of supported CPU models, each desc= ribed by a dedicated ``model`` element. The ``usable`` attribute specifies wh= ether --=20 2.53.0