[PATCH 0/4] Add support for expanding CPU features in domain capabilities

Jiri Denemark via Devel posted 4 patches 1 week, 5 days ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/cover.1773228421.git.jdenemar@redhat.com
docs/formatdomaincaps.rst        | 4 ++++
docs/manpages/virsh.rst          | 5 +++++
include/libvirt/libvirt-domain.h | 2 ++
src/libvirt-domain.c             | 5 +++++
src/qemu/qemu_driver.c           | 9 ++++++++-
tools/virsh-host.c               | 7 +++++++
6 files changed, 31 insertions(+), 1 deletion(-)
[PATCH 0/4] Add support for expanding CPU features in domain capabilities
Posted by Jiri Denemark via Devel 1 week, 5 days ago
Consistently with all other CPU definitions, domain capabilities report
host-model CPU as a base model and additional list of features. Getting
all features supported on a host is possible by passing the host-model
CPU definition to hypervisor-cpu-baseline with --features option. But
while this is very easy in virsh (domain capabilities can by directly
piped to hypervisor-cpu-baseline), doing this via API is more
complicated. The relevant part of the domain XML needs to be copied into
a new XML document, formatted and passed to
virConnectBaselineHypervisorCPU.

This series adds the ability to expand CPU features directly in the
domain capabilities XML without having to call another API.

Jiri Denemark (4):
  Introduce EXPAND_CPU_FEATURES flag for domain capabilities
  qemu: Implement
    VIR_CONNECT_GET_DOMAIN_CAPABILITIES_EXPAND_CPU_FEATURES
  virsh: Add --expand-cpu-features option for domcapabilities
  docs: Clarify host-model description in domain capabilities

 docs/formatdomaincaps.rst        | 4 ++++
 docs/manpages/virsh.rst          | 5 +++++
 include/libvirt/libvirt-domain.h | 2 ++
 src/libvirt-domain.c             | 5 +++++
 src/qemu/qemu_driver.c           | 9 ++++++++-
 tools/virsh-host.c               | 7 +++++++
 6 files changed, 31 insertions(+), 1 deletion(-)

-- 
2.53.0
Re: [PATCH 0/4] Add support for expanding CPU features in domain capabilities
Posted by Peter Krempa via Devel 1 week, 5 days ago
On Wed, Mar 11, 2026 at 12:39:17 +0100, Jiri Denemark via Devel wrote:
> Consistently with all other CPU definitions, domain capabilities report
> host-model CPU as a base model and additional list of features. Getting
> all features supported on a host is possible by passing the host-model
> CPU definition to hypervisor-cpu-baseline with --features option. But
> while this is very easy in virsh (domain capabilities can by directly
> piped to hypervisor-cpu-baseline), doing this via API is more
> complicated. The relevant part of the domain XML needs to be copied into
> a new XML document, formatted and passed to
> virConnectBaselineHypervisorCPU.
> 
> This series adds the ability to expand CPU features directly in the
> domain capabilities XML without having to call another API.
> 
> Jiri Denemark (4):
>   Introduce EXPAND_CPU_FEATURES flag for domain capabilities
>   qemu: Implement
>     VIR_CONNECT_GET_DOMAIN_CAPABILITIES_EXPAND_CPU_FEATURES
>   virsh: Add --expand-cpu-features option for domcapabilities
>   docs: Clarify host-model description in domain capabilities

Reviewed-by: Peter Krempa <pkrempa@redhat.com>