]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
Introduce VIR_CONNECT_GET_DOMAIN_CAPABILITIES_SUPPORTED_CPU_FEATURES flag
authorJiri Denemark <jdenemar@redhat.com>
Fri, 29 May 2026 10:52:39 +0000 (12:52 +0200)
committerJiri Denemark <jdenemar@redhat.com>
Tue, 2 Jun 2026 11:45:26 +0000 (13:45 +0200)
Some CPU features may be enabled explicitly, but should not
automatically become part of a host-model CPU. Users can now request
such features to be shown in the host-model CPU in domain capabilities
by VIR_CONNECT_GET_DOMAIN_CAPABILITIES_SUPPORTED_CPU_FEATURES flag.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
include/libvirt/libvirt-domain.h
src/libvirt-domain.c

index 8f07ef215654da0e4945f12006b003d1c3dbf789..0a237bf88093158636c62e8d4e9d36c1775e07b5 100644 (file)
@@ -1549,6 +1549,9 @@ typedef enum {
     VIR_CONNECT_GET_DOMAIN_CAPABILITIES_DISABLE_DEPRECATED_FEATURES = (1 << 0),
     /* Report all host model CPU features. (Since: 12.2.0) */
     VIR_CONNECT_GET_DOMAIN_CAPABILITIES_EXPAND_CPU_FEATURES = (1 << 1),
+    /* Report all CPU features supported on the host, even those that will not
+     * be enabled by host-model CPU mode. (Since: 12.5.0) */
+    VIR_CONNECT_GET_DOMAIN_CAPABILITIES_SUPPORTED_CPU_FEATURES = (1 << 2),
 } virConnectGetDomainCapabilitiesFlags;
 
 char * virConnectGetDomainCapabilities(virConnectPtr conn,
index 425a73e75ab39a560216efd6a7cc8dcee646fea1..f8acce096d5904be333a329aae6d94056de46577 100644 (file)
@@ -12357,6 +12357,14 @@ virDomainSetUserPassword(virDomainPtr dom,
  * host-model CPU mode. Without this flag features that are part of the CPU
  * model itself will not be listed.
  *
+ * Adding VIR_CONNECT_GET_DOMAIN_CAPABILITIES_SUPPORTED_CPU_FEATURES to @flags
+ * tells libvirt to update the host-model CPU definition with features that are
+ * supported on the host, but will not be enabled by default when starting a
+ * domain with host-model CPU. Use both
+ * VIR_CONNECT_GET_DOMAIN_CAPABILITIES_SUPPORTED_CPU_FEATURES and
+ * VIR_CONNECT_GET_DOMAIN_CAPABILITIES_EXPAND_CPU_FEATURES flags to get a
+ * complete list of features that can be enabled on the host.
+ *
  * Returns NULL in case of error or an XML string
  * defining the capabilities.
  *