69 lines
2.6 KiB
Diff
69 lines
2.6 KiB
Diff
From ee175567f79c3c9359ed209973172e88cc8c9c31 Mon Sep 17 00:00:00 2001
|
|
Message-ID: <ee175567f79c3c9359ed209973172e88cc8c9c31.1773242419.git.jdenemar@redhat.com>
|
|
From: Jiri Denemark <jdenemar@redhat.com>
|
|
Date: Wed, 11 Mar 2026 12:13:22 +0100
|
|
Subject: [PATCH] virsh: Add --expand-cpu-features option for domcapabilities
|
|
|
|
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
|
|
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
|
|
(cherry picked from commit 57e5bb55cef5e97eea14fcecef7114e804576d6c)
|
|
|
|
https://issues.redhat.com/browse/RHEL-154551
|
|
|
|
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
|
|
---
|
|
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 b75e00beb6..e445672c2a 100644
|
|
--- a/docs/manpages/virsh.rst
|
|
+++ b/docs/manpages/virsh.rst
|
|
@@ -584,6 +584,7 @@ domcapabilities
|
|
domcapabilities [virttype] [emulatorbin] [arch] [machine]
|
|
[--xpath EXPRESSION] [--wrap]
|
|
[--disable-deprecated-features]
|
|
+ [--expand-cpu-features]
|
|
|
|
|
|
Print an XML document describing the domain capabilities for the
|
|
@@ -630,6 +631,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.
|
|
|
|
+The **--expand-cpu-features** option will cause the host-model CPU definition
|
|
+to contain all CPU features supported on the host including those implicitly
|
|
+enabled by the selected CPU model.
|
|
+
|
|
|
|
pool-capabilities
|
|
-----------------
|
|
diff --git a/tools/virsh-host.c b/tools/virsh-host.c
|
|
index 9a2b689620..c692d0ea5b 100644
|
|
--- a/tools/virsh-host.c
|
|
+++ b/tools/virsh-host.c
|
|
@@ -118,6 +118,10 @@ static const vshCmdOptDef opts_domcapabilities[] = {
|
|
.type = VSH_OT_BOOL,
|
|
.help = N_("report host CPU model with deprecated features disabled"),
|
|
},
|
|
+ {.name = "expand-cpu-features",
|
|
+ .type = VSH_OT_BOOL,
|
|
+ .help = N_("show all features in host CPU model"),
|
|
+ },
|
|
{.name = NULL}
|
|
};
|
|
|
|
@@ -137,6 +141,9 @@ cmdDomCapabilities(vshControl *ctl, const vshCmd *cmd)
|
|
if (vshCommandOptBool(cmd, "disable-deprecated-features"))
|
|
flags |= VIR_CONNECT_GET_DOMAIN_CAPABILITIES_DISABLE_DEPRECATED_FEATURES;
|
|
|
|
+ if (vshCommandOptBool(cmd, "expand-cpu-features"))
|
|
+ flags |= 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 ||
|
|
--
|
|
2.53.0
|