From nobody Tue Mar 24 00:58:10 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 --- 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