]> git.ipfire.org Git - thirdparty/libvirt.git/log
thirdparty/libvirt.git
3 weeks agoselinux: Match remember/recall arguments for SavedStateLabel
Cole Robinson [Tue, 11 Nov 2025 14:10:03 +0000 (09:10 -0500)] 
selinux: Match remember/recall arguments for SavedStateLabel

virSecuritySELinuxSetSavedStateLabel uses remember=false, but
virSecuritySELinuxRestoreSavedStateLabel uses recall=true.

This doesn't cause problems in practice, just some redundant xattr
calls. But Set and Restore calls should be matched here.

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Cole Robinson <crobinso@redhat.com>
4 weeks agobhyve: s/provconn/privcon/
Michal Privoznik [Thu, 13 Nov 2025 08:06:43 +0000 (09:06 +0100)] 
bhyve: s/provconn/privcon/

Due to a typo, the bhyve driver doesn't compile. Fix it.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
4 weeks agoqemu: snapshot: Set umask for 'qemu-img' when creating external inactive snapshots CVE-2025-13193
Peter Krempa [Wed, 12 Nov 2025 16:52:05 +0000 (17:52 +0100)] 
qemu: snapshot: Set umask for 'qemu-img' when creating external inactive snapshots

External inactive snapshots are created by invoking 'qemu-img' which
creates the file. Currently qemu-img creates image with mode 644 based
on default umask as libvirt doesn't set any.

Having a world-readable image is obviously wrong so set the umask to
077 to have the file readable only by the owner.

Resolves: https://bugs.debian.org/1120119
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
4 weeks agoqemu: Check ACLs before parsing the whole domain XML CVE-2025-12748
Martin Kletzander [Thu, 6 Nov 2025 13:33:41 +0000 (14:33 +0100)] 
qemu: Check ACLs before parsing the whole domain XML

Utilise the new virDomainDefIDsParseString() for that.

This is one of the more complex ones since there is also a function that
reads relevant metadata from a save image XML.  In order _not_ to extract
the parsing out of the function (and make the function basically trivial
and all callers more complex) add a callback to the function which will
be used to check the ACLs.

Fixes: CVE-2025-12748
Reported-by: Святослав Терешин <s.tereshin@fobos-nt.ru>
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
4 weeks agoch: Check ACLs before parsing the whole domain XML
Martin Kletzander [Thu, 6 Nov 2025 15:23:30 +0000 (16:23 +0100)] 
ch: Check ACLs before parsing the whole domain XML

Utilise the new virDomainDefIDsParseString() for that.

This is one of the more complex ones since there is also a function that
reads relevant metadata from a save image XML.  In order not to extract
the parsing out of the function (and make the function basically trivial
and all callers more complex) add a callback to the function which will
be used to check the ACLs.  And since this function is called in APIs
that perform ACL checks both with and without flags, add two of them for
good measure.

Fixes: CVE-2025-12748
Reported-by: Святослав Терешин <s.tereshin@fobos-nt.ru>
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
4 weeks agovz: Check ACLs before parsing the whole domain XML
Martin Kletzander [Thu, 6 Nov 2025 15:03:26 +0000 (16:03 +0100)] 
vz: Check ACLs before parsing the whole domain XML

Utilise the new virDomainDefIDsParseString() for that.

Fixes: CVE-2025-12748
Reported-by: Святослав Терешин <s.tereshin@fobos-nt.ru>
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
4 weeks agolxc: Check ACLs before parsing the whole domain XML
Martin Kletzander [Thu, 6 Nov 2025 14:49:01 +0000 (15:49 +0100)] 
lxc: Check ACLs before parsing the whole domain XML

Utilise the new virDomainDefIDsParseString() for that.

Fixes: CVE-2025-12748
Reported-by: Святослав Терешин <s.tereshin@fobos-nt.ru>
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
4 weeks agolibxl: Check ACLs before parsing the whole domain XML
Martin Kletzander [Thu, 6 Nov 2025 14:43:57 +0000 (15:43 +0100)] 
libxl: Check ACLs before parsing the whole domain XML

Utilise the new virDomainDefIDsParseString() for that.

Fixes: CVE-2025-12748
Reported-by: Святослав Терешин <s.tereshin@fobos-nt.ru>
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
4 weeks agobhyve: Check ACLs before parsing the whole domain XML
Martin Kletzander [Thu, 6 Nov 2025 14:31:12 +0000 (15:31 +0100)] 
bhyve: Check ACLs before parsing the whole domain XML

Utilise the new virDomainDefIDsParseString() for that.

Fixes: CVE-2025-12748
Reported-by: Святослав Терешин <s.tereshin@fobos-nt.ru>
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
4 weeks agoconf: Add virDomainDefIDsParseString
Martin Kletzander [Thu, 6 Nov 2025 13:33:31 +0000 (14:33 +0100)] 
conf: Add virDomainDefIDsParseString

This function performs only parsing with the underlying
virDomainDefParseIDs() function to get needed metadata for any ACL
checks, but nothing else to avoid extraneous allocations and any
parser-induced DoS over ACL-forbidden connections.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
4 weeks agovirXMLFormatMetadata: Don't modify deprecated 'xmlIndentTreeOutput'
Peter Krempa [Mon, 10 Nov 2025 15:52:45 +0000 (16:52 +0100)] 
virXMLFormatMetadata: Don't modify deprecated 'xmlIndentTreeOutput'

'libxml2' deprecated the 'xmlIndentTreeOutput' thread-local variable as
well as the 'xmlThrDefIndentTreeOutput' function for setting the global
default, which we use in our code for formatting the metadata sub-XML.

'libxml2' also for now doesn't provide a way to set target indentation
level in 'xmlSaveCtxt' which would allow us to use the modern output
APIs, we can't replace our use of 'xmlDumpNode'. (See
https://gitlab.gnome.org/GNOME/libxml2/-/issues/989 )

Since the indentation is enabled by default in libxml2 and our most
commonly used code which calls xmlDumpNode lives in a standalone
process, where we don't override the setting, just removing the override
will result in identical behaviour.

For the use cases which do live in a process we don't fully control and
thus the default could have been overriden, the result would be that the
<metadata> element would be un-indented, but that is still valid XML.

Thus to fix the deprecated use just stop setting 'xmlIndentTreeOutput'.

Closes: https://gitlab.com/libvirt/libvirt/-/issues/816
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
4 weeks agovirVBoxSnapshotConfSaveVboxFile: Don't modify deprecated 'xmlIndentTreeOutput'
Peter Krempa [Mon, 10 Nov 2025 15:54:32 +0000 (16:54 +0100)] 
virVBoxSnapshotConfSaveVboxFile: Don't modify deprecated 'xmlIndentTreeOutput'

'xmlIndentTreeOutput' is now deprecated by libxml2.

The default value set by libxml2 is '1', and the vbox driver resides
only inside the standalone daemon where the value will not be changed by
us thus there's no observable change in behaviour.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
4 weeks agobhyve: domain: improve disks validation
Roman Bogorodskiy [Sun, 9 Nov 2025 10:10:54 +0000 (11:10 +0100)] 
bhyve: domain: improve disks validation

Do not allow to configure queues and queue size for non-NVMe disks.

Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
4 weeks agobhyve: domain: refactor bhyveDomainDeviceDefValidate()
Roman Bogorodskiy [Sun, 9 Nov 2025 09:47:51 +0000 (10:47 +0100)] 
bhyve: domain: refactor bhyveDomainDeviceDefValidate()

Refactor bhyveDomainDeviceDefValidate() to use switch/case instead of
series of ifs which makes it easier to follow.

Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
4 weeks agobhyve: support queue configuration for NVMe disks
Roman Bogorodskiy [Sat, 8 Nov 2025 08:12:50 +0000 (09:12 +0100)] 
bhyve: support queue configuration for NVMe disks

bhyve supports queue configuration for the NVMe disks:

  maxq        Max number of queues.
  qsz         Max elements in each queue.

Map that to the disk driver's "queues" and "queue_size" attributes
respectfully, so:

  <driver name='file' type='raw' queues='2' queue_size='256'/>

results in:

  -s N:0,nvme,/tmp/disk.img,maxq=2,qsz=256

Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
4 weeks agoconf: domain_validate: make disk queue configuration driver specific
Roman Bogorodskiy [Sun, 9 Nov 2025 09:10:54 +0000 (10:10 +0100)] 
conf: domain_validate: make disk queue configuration driver specific

Currently, virDomainDiskDefValidate() allows to configure disks' number
of queues and queue size for virtio disks only. However, the bhyve
driver allows to configure these for the NVMe disks, so make this
check driver-specific.

Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
4 weeks agodocs: drvbhyve: add guest-specific nodes section
Roman Bogorodskiy [Sat, 8 Nov 2025 14:22:48 +0000 (15:22 +0100)] 
docs: drvbhyve: add guest-specific nodes section

Add a section with guest-specific notes. Start with LPC slot address
information for the Windows guests.

Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
4 weeks agodocs: drvbhyve: improve the manpage link
Roman Bogorodskiy [Sat, 8 Nov 2025 13:46:26 +0000 (14:46 +0100)] 
docs: drvbhyve: improve the manpage link

When linking to the bhyve(8) manual page, do not set manpath
to a specific FreeBSD version so the latest actual version
is displayed.

Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
4 weeks agodocs: drvbhyve: document device passthrough
Roman Bogorodskiy [Sat, 8 Nov 2025 13:25:00 +0000 (14:25 +0100)] 
docs: drvbhyve: document device passthrough

Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
4 weeks agomeson: default to system crypto policies where available
Daniel P. Berrangé [Tue, 1 Jul 2025 16:45:26 +0000 (17:45 +0100)] 
meson: default to system crypto policies where available

In RHEL and Fedora, the built-in GNUTLS default priority is changed
from "NORMAL" to "@SYSTEM", but because libvirt sets an explicit
policy with gnutls we don't honour that. Instead we force "NORMAL"
unless the 'tls_priority' meson option is changed.

In RPM builds, meanwhile, we ask for "@LIBVIRT,SYSTEM" to make it
look for a libvirt specific profile first, falling back to "@SYSTEM"

This changes the meson option to default to "@LIBVIRT,SYSTEM" if the
crypto-policies config is present on the local machine and the meson
option -Dsystem=true is given.

This gives developers more appropriate default behaviour, matching
that seen in package builds.

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
4 weeks agoch: Sort driver sources and drop header files
Michal Privoznik [Fri, 24 Oct 2025 08:11:04 +0000 (10:11 +0200)] 
ch: Sort driver sources and drop header files

Firstly, there's no need to list header files in
ch_driver_sources (we don't do that anywhere else, and meson is
smart enough to figure them out). And secondly, the list of
source file is not sorted which means new source files are added
in random order.

Thus, drop header files from the list and sort it.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
4 weeks agoch: Assign device alias early
Michal Privoznik [Thu, 23 Oct 2025 13:53:20 +0000 (15:53 +0200)] 
ch: Assign device alias early

Assigning device should happen from ch_hotplug.c (just like it's
done for disks currently) not in ch_process.c. Move alias
assignment out of chProcessAddNetworkDevice(). And while at it,
mimic what's done with disks and have net hotplug handling done
from a function.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
4 weeks agoch: Set transient domain definition
Michal Privoznik [Fri, 24 Oct 2025 13:42:53 +0000 (15:42 +0200)] 
ch: Set transient domain definition

Libvirt's philosophy is that for a running domain there are two
(in general distinct) definitions: live definition (reflects the
running state) and inactive definition (used to seed the live
definition when domain is being created).  That's why we have
VIR_DOMAIN_AFFECT_LIVE and VIR_DOMAIN_AFFECT_CONFIG flags to APIs
that modify domain definitions.

Well, the CH driver doesn't do this distinction. Fix this by
making the domain definition transient when it's being created.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
4 weeks agoch: Use correct domain definition in chDomainGetXMLDesc()
Michal Privoznik [Thu, 6 Nov 2025 14:01:26 +0000 (15:01 +0100)] 
ch: Use correct domain definition in chDomainGetXMLDesc()

The chDomainGetXMLDesc() function claims to support
VIR_DOMAIN_XML_INACTIVE to obtain the persistent definition of a
running domain (in its call to virCheckFlags()) but in fact, it's
always passing vm->def to virDomainDefFormat().

So far, there's no harm done because CH driver never sets domain
def as transient. But that'll change.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
4 weeks agoch_process: Avoid memleak in chProcessAddNetworkDevice()
Michal Privoznik [Thu, 6 Nov 2025 14:03:42 +0000 (15:03 +0100)] 
ch_process: Avoid memleak in chProcessAddNetworkDevice()

The 'payload' variable inside of chProcessAddNetworkDevice() is
reused and thus the memory it points to just before its
repurpose is not freed. Avoid reusing g_autofree variables.

 128 bytes in 1 blocks are definitely lost in loss record 1,828 of 2,026
    at 0x491A120: realloc (vg_replace_malloc.c:1801)
    by 0x4FEC251: g_realloc (in /usr/lib64/libglib-2.0.so.0.8400.4)
    by 0x500BB7E: g_string_expand (in /usr/lib64/libglib-2.0.so.0.8400.4)
    by 0x500BBF0: g_string_sized_new (in /usr/lib64/libglib-2.0.so.0.8400.4)
    by 0x4A114C0: virBufferInitialize (virbuffer.c:121)
    by 0x4A11890: virBufferAdd (virbuffer.c:160)
    by 0x4A67344: virJSONValueToBuffer (virjson.c:1562)
    by 0x4A673DB: virJSONValueToString (virjson.c:1599)
    by 0xBC878AB: virCHMonitorBuildNetJson (ch_monitor.c:466)
    by 0xBC8D4A9: chProcessAddNetworkDevice (ch_process.c:688)
    by 0xBC8FCE2: chDomainAttachDeviceLive (ch_hotplug.c:78)
    by 0xBC900CA: chDomainAttachDeviceLiveAndUpdateConfig (ch_hotplug.c:174)

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
4 weeks agodomain_capabilities: Use virXMLFormatElement() in FORMAT_PROLOGUE and FORMAT_EPILOGUE...
Michal Privoznik [Tue, 4 Nov 2025 10:03:18 +0000 (11:03 +0100)] 
domain_capabilities: Use virXMLFormatElement() in FORMAT_PROLOGUE and FORMAT_EPILOGUE macros

Domain capabilities XML is formatted (mostly) using
FORMAT_PROLOGUE and FORMAT_EPILOGUE macros. These format opening
and closing stanzas for given element. The FORMAT_PROLOGUE macro
even tries to be clever and format element onto one line (if the
element isn't supported), but that's not enough. Fortunately, we
have virXMLFormatElement() which formats elements properly, so
let's switch macros into using that.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
4 weeks agodomain_capabilities: Check NULL in FORMAT_PROLOGUE
Michal Privoznik [Tue, 4 Nov 2025 12:35:30 +0000 (13:35 +0100)] 
domain_capabilities: Check NULL in FORMAT_PROLOGUE

In the virDomainCaps struct there are some pointers that might be
NULL (for instance 'sev', 'sgx', 'hyperv'). Teach FORMAT_PROLOGUE
macro to check for NULL argument so that format functions (like
virDomainCapsFeatureHypervFormat()) don't need to.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
4 weeks agodomain_capabilities: Rework virDomainCapsCPUFormat()
Michal Privoznik [Tue, 4 Nov 2025 11:23:58 +0000 (12:23 +0100)] 
domain_capabilities: Rework virDomainCapsCPUFormat()

Make the virDomainCapsCPUFormat() function use
virXMLFormatElement() family of functions.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
4 weeks agodomain_capabilities: Rework virDomainCapsCPUCustomFormat()
Michal Privoznik [Wed, 5 Nov 2025 09:43:09 +0000 (10:43 +0100)] 
domain_capabilities: Rework virDomainCapsCPUCustomFormat()

Make the virDomainCapsCPUCustomFormat() function use
virXMLFormatElement() family of functions.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
4 weeks agodomain_capabilities: Move indentation adjustment out of virDomainCapsCPUCustomFormat()
Michal Privoznik [Tue, 4 Nov 2025 11:25:20 +0000 (12:25 +0100)] 
domain_capabilities: Move indentation adjustment out of virDomainCapsCPUCustomFormat()

The aim of virDomainCapsCPUCustomFormat() is to format CPU models
into given buffer. But it starts by adjusting indentation. Move
this one level up into the caller so that another buffer can be
used. This also makes the pattern match in the caller
(virDomainCapsCPUFormat()) with the rest of CPU related domcaps
formatting.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
4 weeks agobhyve: auto-assign PCI addresses for hostdevs
Roman Bogorodskiy [Wed, 2 Apr 2025 11:20:11 +0000 (13:20 +0200)] 
bhyve: auto-assign PCI addresses for hostdevs

Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
4 weeks agobhyve: Tie the 'passthru' option to the 'hostdev' XML config
Alexander Shursha [Mon, 10 Mar 2025 09:05:05 +0000 (12:05 +0300)] 
bhyve: Tie the 'passthru' option to the 'hostdev' XML config

Signed-off-by: Alexander Shursha <kekek2@ya.ru>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
4 weeks agobhyve: Advertise hostdev support
Alexander Shursha [Mon, 10 Mar 2025 09:05:03 +0000 (12:05 +0300)] 
bhyve: Advertise hostdev support

Signed-off-by: Alexander Shursha <kekek2@ya.ru>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
4 weeks agobhyve: Support passing the 'passthru' command line option
Alexander Shursha [Mon, 10 Mar 2025 09:05:04 +0000 (12:05 +0300)] 
bhyve: Support passing the 'passthru' command line option

Bhyve supports PCI device passthrough using the following syntax:

  bhyve ... -s 4:0,passthru,5/2/0 ...

Where 5/2/0 is PCI address of the device in the host, and "4:0" is the
address in the guest.

Currently, user is responsible for reserving the device for passthrough,
i.e. by configuring pptdevs in loader.conf(5), or using devctl(8) to
detach the device.

Co-authored-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
Signed-off-by: Alexander Shursha <kekek2@ya.ru>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
4 weeks agobhyve: process: improve domain startup error handling
Roman Bogorodskiy [Tue, 28 Oct 2025 17:04:12 +0000 (18:04 +0100)] 
bhyve: process: improve domain startup error handling

After executing the bhyve binary, it might happen that it fails very
early due to configuration issues (missing/inaccessible files, incorrect
custom args), bugs, etc. In this case it'll look like the domain has
started normally, but quickly turned off.

Improve that by waiting for the domain's vmm entity to appear in
/dev/vmm.

Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
4 weeks agocpu_map: Add YongFeng-v3 CPU model
Jiri Denemark [Thu, 6 Nov 2025 09:57:47 +0000 (10:57 +0100)] 
cpu_map: Add YongFeng-v3 CPU model

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
4 weeks agocpu_map: Add YongFeng-v2 CPU model
Jiri Denemark [Thu, 6 Nov 2025 09:57:25 +0000 (10:57 +0100)] 
cpu_map: Add YongFeng-v2 CPU model

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
4 weeks agocpu_map: Add YongFeng CPU model
Jiri Denemark [Thu, 6 Nov 2025 09:56:27 +0000 (10:56 +0100)] 
cpu_map: Add YongFeng CPU model

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
4 weeks agocpu_map: Add features used by Zhaoxin YongFeng Processor
Jiri Denemark [Thu, 6 Nov 2025 09:06:53 +0000 (10:06 +0100)] 
cpu_map: Add features used by Zhaoxin YongFeng Processor

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
4 weeks agocpu_map: Add Zhaoxin CentaurHauls CPU vendor
Jiri Denemark [Thu, 6 Nov 2025 09:49:19 +0000 (10:49 +0100)] 
cpu_map: Add Zhaoxin CentaurHauls CPU vendor

Zhaoxin uses two distinct vendor IDs. This patch is adding one of them
used by Zhaoxin YongFeng Processor.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
4 weeks agocpu_map: Add EPYC-Turin CPU model
Jiri Denemark [Thu, 6 Nov 2025 08:33:16 +0000 (09:33 +0100)] 
cpu_map: Add EPYC-Turin CPU model

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
4 weeks agocpu_map: Add EPYC-Milan-v3 CPU model
Jiri Denemark [Thu, 6 Nov 2025 08:32:40 +0000 (09:32 +0100)] 
cpu_map: Add EPYC-Milan-v3 CPU model

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
4 weeks agocpu_map: Add EPYC-v5 CPU model
Jiri Denemark [Thu, 6 Nov 2025 08:30:18 +0000 (09:30 +0100)] 
cpu_map: Add EPYC-v5 CPU model

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
4 weeks agocpu_map: Add EPYC-Rome-v5 CPU model
Jiri Denemark [Thu, 6 Nov 2025 08:31:30 +0000 (09:31 +0100)] 
cpu_map: Add EPYC-Rome-v5 CPU model

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
4 weeks agocpu_map: Add EPYC-Genoa-v2 CPU model
Jiri Denemark [Thu, 6 Nov 2025 08:27:39 +0000 (09:27 +0100)] 
cpu_map: Add EPYC-Genoa-v2 CPU model

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
4 weeks agocpu_map: Add ClearwaterForest CPU model
Jiri Denemark [Wed, 5 Nov 2025 15:45:43 +0000 (16:45 +0100)] 
cpu_map: Add ClearwaterForest CPU model

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
4 weeks agocpu_map: Add GraniteRapids-v3 CPU model
Jiri Denemark [Thu, 6 Nov 2025 08:41:19 +0000 (09:41 +0100)] 
cpu_map: Add GraniteRapids-v3 CPU model

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
4 weeks agocpu_map: Add SapphireRapids-v4 CPU model
Jiri Denemark [Thu, 6 Nov 2025 08:40:38 +0000 (09:40 +0100)] 
cpu_map: Add SapphireRapids-v4 CPU model

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
4 weeks agocpu_map: Add SierraForest-v3 CPU model
Jiri Denemark [Wed, 5 Nov 2025 15:18:12 +0000 (16:18 +0100)] 
cpu_map: Add SierraForest-v3 CPU model

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
4 weeks agocpu_map: Add SierraForest-v2 CPU model
Jiri Denemark [Wed, 5 Nov 2025 15:16:35 +0000 (16:16 +0100)] 
cpu_map: Add SierraForest-v2 CPU model

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
4 weeks agocputest: Add data for AMD Ryzen 9 9950X 16-Core CPU
Jiri Denemark [Thu, 6 Nov 2025 13:13:34 +0000 (14:13 +0100)] 
cputest: Add data for AMD Ryzen 9 9950X 16-Core CPU

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
4 weeks agocputest: Add data for Intel(R) Xeon(R) 6788P CPU
Jiri Denemark [Thu, 6 Nov 2025 11:20:01 +0000 (12:20 +0100)] 
cputest: Add data for Intel(R) Xeon(R) 6788P CPU

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
4 weeks agocputest: Read more MSRs in cpu-data.py
Jiri Denemark [Thu, 6 Nov 2025 13:10:06 +0000 (14:10 +0100)] 
cputest: Read more MSRs in cpu-data.py

The features defined in our CPU map use quite a bit more than just the
two MSRs the script is currently trying to read. Let's read all of them
to get complete host CPU data.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
4 weeks agocputest: Ignore missing MSRs in cpu-data.py
Jiri Denemark [Thu, 6 Nov 2025 12:40:14 +0000 (13:40 +0100)] 
cputest: Ignore missing MSRs in cpu-data.py

The current code made sense when we were reading only one MSR, but since
we started reading more MSRs, the host CPU would have to support all of
them otherwise the function would just return an empty dict.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
4 weeks agosync_qemu_models_i386: Support adding models to an empty group
Jiri Denemark [Thu, 6 Nov 2025 09:55:10 +0000 (10:55 +0100)] 
sync_qemu_models_i386: Support adding models to an empty group

When adding a new CPU vendor, we create a new empty group in
src/cpu_map/index.xml and want to use the sync_qemu_models_i386.py
script to add models there.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
4 weeks agosync_qemu_models_i386: Handle unknown features in GraniteRapids-v2
Jiri Denemark [Wed, 5 Nov 2025 14:54:57 +0000 (15:54 +0100)] 
sync_qemu_models_i386: Handle unknown features in GraniteRapids-v2

The GraniteRapids-v2 uses quite a few CPU features unknown to this
script.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
4 weeks agosync_qemu_models_i386: Print current model for unknown features
Jiri Denemark [Wed, 5 Nov 2025 14:49:22 +0000 (15:49 +0100)] 
sync_qemu_models_i386: Print current model for unknown features

This way one can just grep for all warnings in the script output and
still be able to see for which CPU model is defined using features the
script doesn't know about.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
4 weeks agosync_qemu_models_i386: Fix typo in CPUID_8000_0021_EAX_No_NESTED_DATA_BP
Jiri Denemark [Wed, 5 Nov 2025 14:48:11 +0000 (15:48 +0100)] 
sync_qemu_models_i386: Fix typo in CPUID_8000_0021_EAX_No_NESTED_DATA_BP

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
4 weeks agocpu_map: Fix ordering of CPU models in meson.build
Jiri Denemark [Wed, 5 Nov 2025 14:47:18 +0000 (15:47 +0100)] 
cpu_map: Fix ordering of CPU models in meson.build

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
4 weeks agocpu_map: Add feature for detecting Indirect Target Selection immunity
Jiri Denemark [Wed, 5 Nov 2025 14:23:00 +0000 (15:23 +0100)] 
cpu_map: Add feature for detecting Indirect Target Selection immunity

QEMU commit 74978391b2da0116b9109d52931f342118d5a122

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
4 weeks agocpu_map: Add feature for detecting Branch History Injection immunity
Jiri Denemark [Wed, 5 Nov 2025 14:18:36 +0000 (15:18 +0100)] 
cpu_map: Add feature for detecting Branch History Injection immunity

QEMU commit b611931d4f70b9a3e49e39c405c63b3b5e9c0df1

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
4 weeks agocpu_map: Add features for Transient Scheduler Attacks mitigation
Jiri Denemark [Wed, 5 Nov 2025 14:11:56 +0000 (15:11 +0100)] 
cpu_map: Add features for Transient Scheduler Attacks mitigation

QEMU commits d8ec0baf4a15082cdc4abe1de28face9a26f0dc9 and
c79a35acadee784610aed40134a12738381b4fba

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
4 weeks agocpu_map: Add a few missing features to 0x80000021 CPUID leaf
Jiri Denemark [Wed, 5 Nov 2025 14:07:17 +0000 (15:07 +0100)] 
cpu_map: Add a few missing features to 0x80000021 CPUID leaf

QEMU commit dfd5b456108a75588ab094358ba5754787146d3d

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
4 weeks agocpu_map: Add msr-imm CPU feature
Jiri Denemark [Wed, 5 Nov 2025 13:45:36 +0000 (14:45 +0100)] 
cpu_map: Add msr-imm CPU feature

QEMU commit 91084f3b44b1da4935eec85b79c1f97d1c140ada

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
4 weeks agoscripts: do not use uninitialized variable
Ján Tomko [Fri, 7 Nov 2025 14:44:09 +0000 (15:44 +0100)] 
scripts: do not use uninitialized variable

A previous commit removed the 'ret' variable when
switching to subprocess.run, but did not adjust
the exit code.

Fixes: 15c9ca383c2a814c61cc4ed16b4dad91221d8129
Signed-off-by: Ján Tomko <jtomko@redhat.com>
4 weeks agotools/nss: check for missing array element
Daniel P. Berrangé [Thu, 16 Oct 2025 10:09:18 +0000 (11:09 +0100)] 
tools/nss: check for missing array element

We've already checked the upper bound of the array, but we should
none the less sanity check that the requested array element is
not NULL before dereferencing it.

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
4 weeks agosrc: check for invalid stream in virStreamInData
Daniel P. Berrangé [Thu, 16 Oct 2025 10:03:41 +0000 (11:03 +0100)] 
src: check for invalid stream in virStreamInData

All methods must use virCheckStreamReturn to validate their
'stream' parameter.

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
4 weeks agoscripts: use subprocess.run instead of os.system
Daniel P. Berrangé [Thu, 16 Oct 2025 09:23:27 +0000 (10:23 +0100)] 
scripts: use subprocess.run instead of os.system

The subprocess.run command avoids using the shell and so is robust
should sys.argv contain any whitespace or unexpected shell meta
characters.

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
4 weeks agoqemu: Use query-accelerators to query accelerators
Praveen K Paladugu [Thu, 6 Nov 2025 16:26:54 +0000 (10:26 -0600)] 
qemu: Use query-accelerators to query accelerators

Use the `query-accelerators` command to generically query the enabled
acclerator. Below is an example invocation in Qemu:

  { "execute": "query-accelerators"}
  "return": {"enabled": "kvm", "present": ["kvm", "mshv", "qtest", "tcg", "xen"]}}

"enabled" here indicates "kvm" is the enabled accelertor.

If query-accelerators command is not available, fallback to existing
mechnisms for querying kvm and hvf capabilities.

Signed-off-by: Praveen K Paladugu <prapal@linux.microsoft.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
4 weeks agoqemu: Introduce query-accelerators cap
Praveen K Paladugu [Thu, 6 Nov 2025 16:26:53 +0000 (10:26 -0600)] 
qemu: Introduce query-accelerators cap

Introduce query-accelerators capability which is a generic way to query
the accelerators supported by qemu.

Signed-off-by: Praveen K Paladugu <prapal@linux.microsoft.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
5 weeks agosrc: report error from failing to add timer/FD watches
Daniel P. Berrangé [Mon, 22 Jul 2024 14:56:03 +0000 (15:56 +0100)] 
src: report error from failing to add timer/FD watches

The virEventAddHandle/Timeout APIs are unusual in that they do not
report errors on failure, because they call through to function
callbacks which might be provided externally to libvirt and thus
won't be using libvirt's error reporting APIs.

This is a rather unfortunate design characteristic as we can see
most callers forgot about this special behaviour and so we are
lacking error reporting in many cases.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
5 weeks agoconf: Don't leak virDomainDiskDef's 'statistics' member
Peter Krempa [Wed, 5 Nov 2025 15:03:13 +0000 (16:03 +0100)] 
conf: Don't leak virDomainDiskDef's 'statistics' member

In commit 19fc614d531f I've added an option to configure statistics but
forgot to free it once the disk definition struct is freed.

Fixes: 19fc614d531fb75877abb59baaf33bc1add4d483
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
5 weeks agoqemu: Add support for enabling timed block device statistics collection
Peter Krempa [Tue, 7 Oct 2025 15:43:41 +0000 (17:43 +0200)] 
qemu: Add support for enabling timed block device statistics collection

Add validation that qemu supports the collection of statistics and
enable it on the block device commandline.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
5 weeks agoconf: Add configuration option for timed disk statistics collection
Peter Krempa [Mon, 6 Oct 2025 15:32:28 +0000 (17:32 +0200)] 
conf: Add configuration option for timed disk statistics collection

QEMU supports collection of disk statistics in configurable time
windows. Add support for enabling this feature to the conf parser.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
5 weeks agoqemu: capabilities: Introduce QEMU_CAPS_DISK_TIMED_STATS
Peter Krempa [Tue, 7 Oct 2025 12:57:50 +0000 (14:57 +0200)] 
qemu: capabilities: Introduce QEMU_CAPS_DISK_TIMED_STATS

The capability tracks support for 'stats-intervals' property of disk
frontends which enables statistics collection on the devices.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
5 weeks agoExpose qemu timed block statistics via bulk stats API
Peter Krempa [Fri, 12 Sep 2025 11:32:36 +0000 (13:32 +0200)] 
Expose qemu timed block statistics via bulk stats API

The statistics show various disk access timing parameters collected in
configurable interval which can be useful for performance
investigations.

Note that the statistic collection needs to be enabled explicitly for
the statistics to be collected and displayed.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
5 weeks agoqemu_monitor: Extract 'timed_stats' of block devices
Peter Krempa [Thu, 11 Sep 2025 15:07:11 +0000 (17:07 +0200)] 
qemu_monitor: Extract 'timed_stats' of block devices

The 'timed_stats' block is a set of statistics gathered in configurable
time intervals. The stats include latency timings of reads/writes as
well as the depth of the request queues.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
5 weeks agoExpose qemu storage request limits via bulk stats API
Peter Krempa [Mon, 6 Oct 2025 13:30:43 +0000 (15:30 +0200)] 
Expose qemu storage request limits via bulk stats API

Management applications can use the detected limits to cross reference
with configuration within the VM to ensure optimal performance.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
5 weeks agoqemu: monitor: Extract block limit values
Peter Krempa [Wed, 1 Oct 2025 08:42:09 +0000 (10:42 +0200)] 
qemu: monitor: Extract block limit values

The 'limits' field reports various maximum request sizes and
alignments for a qemu blockdev protocol node.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
5 weeks agoqemucapabilitiestest: qemucapabilitiestest: Update 'caps_10.2.0_x86_64' to 'v10.1...
Peter Krempa [Mon, 3 Nov 2025 12:04:09 +0000 (13:04 +0100)] 
qemucapabilitiestest: qemucapabilitiestest: Update 'caps_10.2.0_x86_64' to 'v10.1.0-1969-g53b41bb789'

Notable changes:
 - deprecated 'reconnect' option removed from socket chardevs
 - 'query-accelerators' QMP command added
 - 'query-firmware-log' QMP command added
 - block image limits exposed via QMP
 - timed block statistics collection config is now available via -device
 - 'audio-backend' QOM object type added
 - 'mshv-accel' QOM object type added
 - 'tsa-l1-no', 'tsa-sq-no', 'verw-clear' cpu properties added
 - SCLP_CPI_INFO_AVAILABLE event addedt

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
5 weeks agoqemu: capabilities: Fix logic for formatting 'reconnect' parameter
Peter Krempa [Mon, 3 Nov 2025 12:23:48 +0000 (13:23 +0100)] 
qemu: capabilities: Fix logic for formatting 'reconnect' parameter

In commit e4d058866e9 I've converted the code to use the modern
'reconnect-ms' parameter instead of 'reconnect' but messed up the logic
for the time when 'reconnect' will be removed.

We need to check QEMU_CAPS_NETDEV_STREAM_RECONNECT_MILISECONDS
individually and not based on QEMU_CAPS_NETDEV_STREAM_RECONNECT.

Fix the logic as upstream qemu now removed 'reconnect'.

Fixes: e4d058866e9563756349de6b3f451a53e64ca872
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
5 weeks agoqemu: capabilities: Retire QEMU_CAPS_CHARDEV_RECONNECT
Peter Krempa [Mon, 3 Nov 2025 12:18:02 +0000 (13:18 +0100)] 
qemu: capabilities: Retire QEMU_CAPS_CHARDEV_RECONNECT

The flag was never queried since it's introduction in
5f7da98b3ff29dc274c9e500f6afa40a97f02b7b

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
5 weeks agoqemucapabilitiesdata: README: Add rules for dumps of unreleased qemu
Peter Krempa [Mon, 3 Nov 2025 16:03:54 +0000 (17:03 +0100)] 
qemucapabilitiesdata: README: Add rules for dumps of unreleased qemu

Add a note that the filename should match the final version number and
that it's expected to do an update after the given qemu version gets
released.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
5 weeks agoci: Refresh with 'lcitool manifest'
Michal Privoznik [Wed, 5 Nov 2025 11:31:41 +0000 (12:31 +0100)] 
ci: Refresh with 'lcitool manifest'

The only change here is that fuse3 is installed instead of fuse.
This is needed by v11.9.0-9-gb100dabd6d which made the change in
spec file.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
5 weeks agorpm: change from fuse-devel to fuse3-devel
Daniel P. Berrangé [Fri, 31 Oct 2025 14:02:09 +0000 (14:02 +0000)] 
rpm: change from fuse-devel to fuse3-devel

The meson.build already supports both fuse2 and fuse3, and fuse3
is in all Fedora versions we need, so switch to the newer version
unconditionally.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
5 weeks agoRemove arm from KVM arches
Daniel P. Berrangé [Mon, 3 Nov 2025 14:36:34 +0000 (14:36 +0000)] 
Remove arm from KVM arches

Not only was ARM 7 dropped from Fedora 37, KVM support has also been
dropped in upstream Linux.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
5 weeks agoqemu: Ignore "ht" CPU feature
Jiri Denemark [Fri, 24 Oct 2025 12:17:56 +0000 (14:17 +0200)] 
qemu: Ignore "ht" CPU feature

The feature does not do anything, QEMU will always set it according to
the CPU topology completely ignoring what we asked for. Unfortunately,
the way the state of "ht" is reported changed in QEMU 10.0.0 (commit
c6bd2dd634208).

QEMU older than 10.0.0 would just report whatever was specified on the
command line totally ignoring the actual state of the feature visible to
a guest. But after the change QEMU reports ht=on in case it enabled "ht"
based on the CPU topology. In all other cases QEMU still reports the
state requested on the command line.

As a result of this change a domain with multiple CPU threads started on
QEMU < 10.0.0 could not be migrated to QEMU >= 10.0.0 unless "ht" was
explicitly enabled in the domain XML because libvirt would see "ht"
enabled on the destination, but disabled on the source (the guest would
see "ht" enabled in both cases anyway). Outgoing migration of domains
started on QEMU >= 10.0.0 is not affected.

To fix this issue we can completely ignore "ht" both in the domain XML
and in the CPU properties reported by QEMU. With this fix incoming
migration to QEMU >= 10.0.0 works again.

Fixes: https://gitlab.com/libvirt/libvirt/-/issues/821
Fixes: https://issues.redhat.com/browse/RHEL-104216
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
5 weeks agoqemu_monitor: Filter CPU features reported by QEMU
Jiri Denemark [Fri, 24 Oct 2025 15:16:32 +0000 (17:16 +0200)] 
qemu_monitor: Filter CPU features reported by QEMU

Some features may be on our ignore list because they do nothing even
though QEMU still supports them and reports their state. But as the
features do nothing, the state reported by QEMU may not correspond to
what the guest sees. To avoid possible confusion we may just pretend
QEMU did not report any of the features on our ignore list.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
5 weeks agoqemu_process: Always fix CPUs on reconnect
Jiri Denemark [Fri, 24 Oct 2025 13:36:18 +0000 (15:36 +0200)] 
qemu_process: Always fix CPUs on reconnect

We fix CPUs (i.e., remove ignored CPU features) only when libvirt/QEMU
combo used to start the domain is very old and doesn't support
query-cpu-model-expansion, in which case the CPU definition may contain
features that are unknown to QEMU. But even if both libvirt and QEMU are
new enough, we still want to remove features that do nothing to minimize
confusion or to avoid false migration issues.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
5 weeks agoqemu_domain: Fix qemuDomainFixupCPUs
Jiri Denemark [Fri, 24 Oct 2025 13:27:03 +0000 (15:27 +0200)] 
qemu_domain: Fix qemuDomainFixupCPUs

The function was apparently created when the list of ignored CPU
features contained just cmt and related features. The list grew quite a
bit since then and this function stopped making sense as it would remove
all ignored features from CPU definitions but only if cmt was present.
The issue with cmt is long gone and this function was not really doing
anything. Surprisingly this didn't cause any real issues as we don't
update CPU definitions with features unknown to QEMU. But we may still
want to remove ignored features even though QEMU knows about them for
compatibility reasons.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
5 weeks agoqemu_domain: Simplify qemuDomainFixupCPUs
Jiri Denemark [Fri, 24 Oct 2025 13:13:49 +0000 (15:13 +0200)] 
qemu_domain: Simplify qemuDomainFixupCPUs

Since virCPUDefFilterFeatures never fails, we can use it for in-place
modifications instead of modifying a temporary virCPUDef copy.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
5 weeks agocpu_conf: Make virCPUDefFilterFeatures return void
Jiri Denemark [Fri, 24 Oct 2025 13:07:45 +0000 (15:07 +0200)] 
cpu_conf: Make virCPUDefFilterFeatures return void

The only thing that can fail inside virCPUDefFilterFeatures is
VIR_DELETE_ELEMENT_INPLACE macro. The macro just calls
virDeleteElementsN, which reports a warning when all elements to be
removed are not within the array bounds and returns -1. The function
succeeds otherwise. But since VIR_DELETE_ELEMENT_INPLACE sets the number
of elements to be removed to 1 and we call it with i < cpu->nfeatures,
the safety check in virDeleteElementsN will never fail. And even if we
theoretically called it with wrong arguments, it just wouldn't do
anything.

Thus we can safely assume VIR_DELETE_ELEMENT_INPLACE always succeeds in
virCPUDefFilterFeatures and avoid reporting any errors to simplify
callers.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
5 weeks agoPost-release version bump to 11.10.0
Jiri Denemark [Mon, 3 Nov 2025 11:29:58 +0000 (12:29 +0100)] 
Post-release version bump to 11.10.0

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
5 weeks agoRelease of libvirt-11.9.0 v11.9.0
Jiri Denemark [Mon, 3 Nov 2025 11:26:40 +0000 (12:26 +0100)] 
Release of libvirt-11.9.0

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
5 weeks agoNEWS: mention 'manual' snapshot mode improvement
Peter Krempa [Fri, 31 Oct 2025 13:17:11 +0000 (14:17 +0100)] 
NEWS: mention 'manual' snapshot mode improvement

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
5 weeks agoTranslated using Weblate (Portuguese)
Américo Monteiro [Mon, 3 Nov 2025 07:03:49 +0000 (07:03 +0000)] 
Translated using Weblate (Portuguese)

Currently translated at 99.5% (10922 of 10976 strings)

Translation: libvirt/libvirt
Translate-URL: https://translate.fedoraproject.org/projects/libvirt/libvirt/pt/

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>
5 weeks agoTranslated using Weblate (Portuguese)
Anonymous [Mon, 3 Nov 2025 07:03:48 +0000 (07:03 +0000)] 
Translated using Weblate (Portuguese)

Currently translated at 99.5% (10922 of 10976 strings)

Translation: libvirt/libvirt
Translate-URL: https://translate.fedoraproject.org/projects/libvirt/libvirt/pt/

Signed-off-by: Anonymous <noreply@weblate.org>
5 weeks agoTranslated using Weblate (Portuguese)
Américo Monteiro [Mon, 3 Nov 2025 07:03:47 +0000 (07:03 +0000)] 
Translated using Weblate (Portuguese)

Currently translated at 99.3% (10901 of 10976 strings)

Translation: libvirt/libvirt
Translate-URL: https://translate.fedoraproject.org/projects/libvirt/libvirt/pt/

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>
Translated using Weblate (Portuguese)

Currently translated at 98.9% (10856 of 10976 strings)

Translation: libvirt/libvirt
Translate-URL: https://translate.fedoraproject.org/projects/libvirt/libvirt/pt/

Signed-off-by: Américo Monteiro <a_monteiro@gmx.com>
5 weeks agoNEWS: Document features/improvements/bug fixes I've participated in
Michal Privoznik [Fri, 31 Oct 2025 12:31:49 +0000 (13:31 +0100)] 
NEWS: Document features/improvements/bug fixes I've participated in

There are some features/improvements/bug fixes I've either
contributed or reviewed/merged. Document them for upcoming
release.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
5 weeks agoTranslated using Weblate (Ukrainian) v11.9.0-rc2
Yuri Chornoivan [Fri, 31 Oct 2025 09:59:00 +0000 (09:59 +0000)] 
Translated using Weblate (Ukrainian)

Currently translated at 100.0% (10976 of 10976 strings)

Translation: libvirt/libvirt
Translate-URL: https://translate.fedoraproject.org/projects/libvirt/libvirt/uk/

Signed-off-by: Yuri Chornoivan <yurchor@ukr.net>