]> git.ipfire.org Git - thirdparty/libvirt.git/log
thirdparty/libvirt.git
8 months agoNEWS: Mention qcow2 'data-file', block NVRAM, and internal snapshot reversion
Peter Krempa [Wed, 27 Nov 2024 14:06:15 +0000 (15:06 +0100)] 
NEWS: Mention qcow2 'data-file', block NVRAM, and internal snapshot reversion

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
8 months agoqemuDomainGetStorageSourceByDevstr: Lookup also '<dataStore>'
Peter Krempa [Tue, 26 Nov 2024 14:59:43 +0000 (15:59 +0100)] 
qemuDomainGetStorageSourceByDevstr: Lookup also '<dataStore>'

The <dataStore> volumes have their own 'id' so we need to be able to
look them up for the given image chain.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
8 months agoqemuDomainVirStorageSourceFindByNodeName: Match also '<dataStore>' sources
Peter Krempa [Tue, 26 Nov 2024 08:35:47 +0000 (09:35 +0100)] 
qemuDomainVirStorageSourceFindByNodeName: Match also '<dataStore>' sources

As the source for the data file is a completely separate
virStorageSource including it's own index we need to match it
explicitly, so that code such as storage threshold events work properly
and separately for the data file.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
8 months agoqemuDomainVirStorageSourceFindByNodeName: Extract nodename matching
Peter Krempa [Tue, 26 Nov 2024 08:31:57 +0000 (09:31 +0100)] 
qemuDomainVirStorageSourceFindByNodeName: Extract nodename matching

Extract the matching of the node name of a single virStorage source so
that the logic can be reused in the upcoming patch.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
8 months agoqemu: snapshot: Change 'data-file' to read-only after snapshot
Peter Krempa [Tue, 26 Nov 2024 09:23:23 +0000 (10:23 +0100)] 
qemu: snapshot: Change 'data-file' to read-only after snapshot

For the reason outlined in previous commit qemu doesn't do this
automatically. Handle it manually after the snapshot.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
8 months agoqemu: block: Ensure that <dataStore> is in appropriate state
Peter Krempa [Tue, 26 Nov 2024 08:12:01 +0000 (09:12 +0100)] 
qemu: block: Ensure that <dataStore> is in appropriate state

In contrast to normal backing chain members where qemu does honour the
'auto-read-only' property the 'data-file' nodes are not automatically
reopened by qemu. Libvirt now has the infrastructure to reopen them
explicitly so use it for all transitions of the 'commit' block job.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
8 months agoqemuBlockReopenAccess: Don't require backing chain terminator for non-chained images
Peter Krempa [Tue, 26 Nov 2024 08:10:10 +0000 (09:10 +0100)] 
qemuBlockReopenAccess: Don't require backing chain terminator for non-chained images

Add an exception for image formats not supporting backing images so that
they can be reopened RW/RO without the need for adding a terminating
virStorageSource as they simply can't have a backing image.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
8 months agoqemuBlockReopenAccess: Fix update of 'readonly' state
Peter Krempa [Tue, 26 Nov 2024 12:20:56 +0000 (13:20 +0100)] 
qemuBlockReopenAccess: Fix update of 'readonly' state

Refactors done in 24b667eeed78d2df (and also 9ec0e28e876b17df9)
broke the expected handling of the update of 'readonly' flag of a
virStorage. The source is actually set to the proper state but rolled
back to the previous state as the 'cleanup' label should have been
'error' and thus not reached on success.

Additionally some of the code paths violate the statement in the comment
after updating 'readonly' that only 'goto error' must be used.

Fixes: 24b667eeed78d2df0376a38a592ed9d8c2744bdc
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
8 months agoqemuBlockReopenAccess: Add debug log entry about state of the image
Peter Krempa [Tue, 26 Nov 2024 12:08:34 +0000 (13:08 +0100)] 
qemuBlockReopenAccess: Add debug log entry about state of the image

Log the node name and current and expected state to simplify debugging.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
8 months agoqemu: Validate QoS values in qemuDomainSetInterfaceParameters()
Michal Privoznik [Wed, 27 Nov 2024 11:25:12 +0000 (12:25 +0100)] 
qemu: Validate QoS values in qemuDomainSetInterfaceParameters()

This is similar to one of my previous commits (v10.7.0-rc1~22)
which introduced a check that <bandwidth/> values fit into
certain limits. My original commit validated values when parsing
<bandwidth/> XML, but completely missed the case when values are
set over virDomainSetInterfaceParameters() API.

Solution is simple - just perform validation after bandwidth
structure is reconstructed from arguments passed to the API.

Resolves: https://issues.redhat.com/browse/RHEL-65372
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
8 months agoNEWS: Document support for versioned CPU models
Jiri Denemark [Wed, 27 Nov 2024 09:02:08 +0000 (10:02 +0100)] 
NEWS: Document support for versioned CPU models

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
8 months agocpu: Check blockers in virCPUCompareUnusable only if they exist
Jiri Denemark [Wed, 27 Nov 2024 07:34:52 +0000 (08:34 +0100)] 
cpu: Check blockers in virCPUCompareUnusable only if they exist

virCPUCompareUnusable can be called with blockers == NULL in case the
CPU model itself is usable (i.e., QEMU reports an empty list of
blockers), but the CPU definition contains some additional features
which have to be checked.

Fixes: v10.8.0-129-g5f8abbb7d0
Reported-by: Han Han <hhan@redhat.com>
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Tested-by: Han Han <hhan@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
8 months agoUpdate translation files
Weblate [Tue, 26 Nov 2024 14:30:12 +0000 (15:30 +0100)] 
Update translation files

Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

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

Signed-off-by: Fedora Weblate Translation <i18n@lists.fedoraproject.org>
8 months agopo: Refresh potfile for v10.10.0 v10.10.0-rc1
Jiri Denemark [Tue, 26 Nov 2024 14:26:38 +0000 (15:26 +0100)] 
po: Refresh potfile for v10.10.0

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
8 months agoTranslated using Weblate (Swedish)
Göran Uddeborg [Tue, 26 Nov 2024 14:13:19 +0000 (15:13 +0100)] 
Translated using Weblate (Swedish)

Currently translated at 98.0% (10325 of 10526 strings)

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

Signed-off-by: Göran Uddeborg <goeran@uddeborg.se>
8 months agonetwork: add tc filter rule to nftables backend to fix checksum of DHCP responses
Laine Stump [Tue, 26 Nov 2024 03:24:49 +0000 (22:24 -0500)] 
network: add tc filter rule to nftables backend to fix checksum of DHCP responses

Please see the commit log for commit v10.9.0-rc1-1-g42ab0148dd for the
history and explanation of the problem that this patch is fixing.

A shorter explanation is that when a guest is connected to a libvirt
virtual network using a virtio-net adapter with in-kernel "vhost-net"
packet processing enabled, it will fail to acquire an IP address from
a DHCP seever running on the host.

In commit v10.9.0-rc1-1-g42ab0148dd we tried fixing this by *zeroing
out* the checksums of these packets with an nftables rule (nftables
can't recompute the checksum, but it can set it to 0) . This
*appeared* to work initially, but it turned out that zeroing the
checksum ends up breaking dhcp packets on *non* virtio/vhost-net guest
interfaces. That attempt was reverted in commit v10.9.0-rc2.

Fortunately, there is an existing way to recompute the checksum of a
packet as it leaves an interface - the "tc" (traffic control) utility
that libvirt already uses for bandwidth management. This patch uses a
tc filter rule to match dhcp response packets on the bridge and
recompute their checksum.

The filter rule must be attached to a tc qdisc, which may also have a
filter attached for bandwidth management (in the <bandwidth> element
of the network config). Not only must we add the qdisc only once
(which was already handled by the patch two prior to this one), but
also the filter rule for checksum fixing and the filter rule for
bandwidth management must be different priorities so they don't clash;
this is solved by adding the checksum-fix filter with "priority 2",
while the bandwidth management filter remains "priority 1" (both will
always be evaluated anyway, it's just a matter of which is evaluated
first).

So far this method has worked with every different guest we could
throw at it, including several that failed with the previous method.

Fixes: b89c4991daa0ee9371f10937fab3b03c5ffdabc6
Reported-by: Rich Jones <rjones@redhat.com>
Reported-by: Andrea Bolognani <abologna@redhat.com>
Fix-Suggested-by: Eric Garver <egarver@redhat.com>
Fix-Suggested-by: Phil Sutter <psutter@redhat.com>
Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
8 months agoutil: add new "tc" layer for virFirewallCmd objects
Laine Stump [Tue, 26 Nov 2024 03:24:48 +0000 (22:24 -0500)] 
util: add new "tc" layer for virFirewallCmd objects

If the layer of a virFirewallCmd is "tc", then the "tc" utility will
be executed using the arguments that had been added to the
virFirewallCmd

tc layer doesn't support auto-rollback command creation (any rollback
needs to be added manually with virFirewallAddRollbackCmd()), and also
tc layer isn't supported by the iptables backend (it would have been
straightforward to add, but the iptables backend doesn't need it, and
I didn't want to take the chance of causing a regression in that
code for no good reason).

Signed-off-by: Laine Stump <laine@redhat.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
8 months agoutil: don't re-add the qdisc used for tx filters if it already exists
Laine Stump [Tue, 26 Nov 2024 03:24:47 +0000 (22:24 -0500)] 
util: don't re-add the qdisc used for tx filters if it already exists

There will soon be two separate users of tc on virtual networks, and
both will use the "qdisc root handle 1: htb" to add tx filters. One or the
other could get the first chance to add the qdisc, and then if at a
later time the other decides to use it, we need to prevent the 2nd
user from attempting to re-add the qdisc (because that just generates
an error).

We do this by running "tc qdisc show dev $bridge handle 1:" then
checking if the output of that command contains both "qdisc" and " 1:
".[*] If it does then the qdisc has already been added. If not then we
need to add it now.

[*]As of this writing, the output more exactly starts with "qdisc
htb 1: root", but our comparison is made purposefully generous to
increase the chances that it will continue to work properly if tc
modifies the format of its output.

Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
8 months agoutil: put the command that adds a tx filter qdisc into a separate function
Laine Stump [Tue, 26 Nov 2024 03:24:46 +0000 (22:24 -0500)] 
util: put the command that adds a tx filter qdisc into a separate function

virNetDevBandwidthSet() adds a queue discipline (qdisc) for each
interface that it will need to add tc transmit filters to, and the
filters are then attached to the qdisc.

There are other circumstances where some other function will need to
add tc transmit filters to an interface (in particular an upcoming
patch to the network driver nftables backend that will use a tc tx
filter to fix the checksum of dhcp packets), so that function will
also need a qdisc for the tx filter. To assure both always use exactly
the same qdisc, this patch puts the command that adds the tx filter
qdisc into a separate helper function that can (and will) be called
from either place

Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
8 months agoutil: make it optional to clear existing tc qdiscs/filters in virNetDevBandwidthSet()
Laine Stump [Tue, 26 Nov 2024 03:24:45 +0000 (22:24 -0500)] 
util: make it optional to clear existing tc qdiscs/filters in virNetDevBandwidthSet()

virNetDevBandwidthSet() always clears all existing qdiscs and their
subordinate filters before adding all the new qdiscs/filters. This is
normally exactly what we want, but there is one case (the network
driver) where the Qdisc added by virNetDevBandwidthSet() may already
be in use by the nftables backend (which will add a rule to fix the
checksum of dhcp packets); in that case, we *don't* want
virNetDevBandwidthSet() to clear out the qdisc that was already added
for nftables, and none of the bandwidth filters have been added yet,
so there already aren't any "old" filters that need to be removed
either - it is safe to just skip virNetDevBandwidthClear() in this
case.

To allow the network driver to set bandwidth without first clearing
it, this patch adds the flag VIR_NETDEV_BANDWIDTH_SET_CLEAR_ALL to the
virNetDevBandwidthSetFlags enum, and recognizes it in
virNetDevBandwidthSet() - if the flag is set, then
virNetDevBandwidth() will call virNetDevBandwidthClear() just as it
always has. But if the flag isn't set it *won't* call
virNetDevBandwidthClear().

As suggested above, VIR_NETDEV_BANDWIDTH_SET_CLEAR_ALL is set for all
calls to virNetdevBandwidthSet() except for two places in the network
driver.

Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
8 months agoutil: use a single flags arg for virNetDevBandwidthSet(), not multiple bools
Laine Stump [Tue, 26 Nov 2024 03:24:44 +0000 (22:24 -0500)] 
util: use a single flags arg for virNetDevBandwidthSet(), not multiple bools

Having two bools in the arg list is on the borderline of being
confusing to anyone trying to read the code, but we're about to add a
3rd. This patch replaces the two bools with a single flags argument
which will instead have one or more bits from virNetDevBandwidthFlags
set.

Signed-off-by: Laine Stump <laine@redhat.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
8 months agocpu_map: Add KnightsMill CPU model
Jiri Denemark [Fri, 22 Nov 2024 13:44:01 +0000 (14:44 +0100)] 
cpu_map: Add KnightsMill CPU model

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
8 months agocpu_map: Add Denverton CPU model
Jiri Denemark [Fri, 22 Nov 2024 13:43:15 +0000 (14:43 +0100)] 
cpu_map: Add Denverton CPU model

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
8 months agocpu_map: Add versions of Dhyana CPU model
Jiri Denemark [Tue, 22 Oct 2024 09:51:30 +0000 (11:51 +0200)] 
cpu_map: Add versions of Dhyana CPU model

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
8 months agocpu_map: Add versions of EPYC CPU model
Jiri Denemark [Tue, 22 Oct 2024 09:50:56 +0000 (11:50 +0200)] 
cpu_map: Add versions of EPYC CPU model

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
8 months agocpu_map: Add versions of EPYC-Rome CPU model
Jiri Denemark [Tue, 22 Oct 2024 09:51:07 +0000 (11:51 +0200)] 
cpu_map: Add versions of EPYC-Rome CPU model

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
8 months agocpu_map: Add versions of EPYC-Milan CPU model
Jiri Denemark [Tue, 22 Oct 2024 09:51:20 +0000 (11:51 +0200)] 
cpu_map: Add versions of EPYC-Milan CPU model

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
8 months agocpu_map: Add versions of Nehalem CPU model
Jiri Denemark [Tue, 22 Oct 2024 09:45:34 +0000 (11:45 +0200)] 
cpu_map: Add versions of Nehalem CPU model

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
8 months agocpu_map: Add versions of Westmere CPU model
Jiri Denemark [Tue, 22 Oct 2024 09:45:49 +0000 (11:45 +0200)] 
cpu_map: Add versions of Westmere CPU model

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
8 months agocpu_map: Add versions of SandyBridge CPU model
Jiri Denemark [Tue, 22 Oct 2024 09:46:01 +0000 (11:46 +0200)] 
cpu_map: Add versions of SandyBridge CPU model

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
8 months agocpu_map: Add versions of IvyBridge CPU model
Jiri Denemark [Tue, 22 Oct 2024 09:46:14 +0000 (11:46 +0200)] 
cpu_map: Add versions of IvyBridge CPU model

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
8 months agocpu_map: Add versions of Haswell CPU model
Jiri Denemark [Tue, 22 Oct 2024 09:46:25 +0000 (11:46 +0200)] 
cpu_map: Add versions of Haswell CPU model

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
8 months agocpu_map: Add versions of Broadwell CPU model
Jiri Denemark [Tue, 22 Oct 2024 09:46:34 +0000 (11:46 +0200)] 
cpu_map: Add versions of Broadwell CPU model

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
8 months agocpu_map: Add versions of Skylake-Client CPU model
Jiri Denemark [Tue, 22 Oct 2024 09:46:49 +0000 (11:46 +0200)] 
cpu_map: Add versions of Skylake-Client CPU model

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
8 months agocpu_map: Add versions of Skylake-Server CPU model
Jiri Denemark [Tue, 22 Oct 2024 09:46:57 +0000 (11:46 +0200)] 
cpu_map: Add versions of Skylake-Server CPU model

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
8 months agocpu_map: Add versions of Cascadelake-Server CPU model
Jiri Denemark [Tue, 22 Oct 2024 09:47:10 +0000 (11:47 +0200)] 
cpu_map: Add versions of Cascadelake-Server CPU model

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
8 months agocpu_map: Add versions of Icelake-Server CPU model
Jiri Denemark [Tue, 22 Oct 2024 09:47:28 +0000 (11:47 +0200)] 
cpu_map: Add versions of Icelake-Server CPU model

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
8 months agocpu_map: Add versions of Cooperlake CPU model
Jiri Denemark [Tue, 22 Oct 2024 09:47:41 +0000 (11:47 +0200)] 
cpu_map: Add versions of Cooperlake CPU model

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
8 months agocpu_map: Add versions of Snowridge CPU model
Jiri Denemark [Tue, 22 Oct 2024 09:48:04 +0000 (11:48 +0200)] 
cpu_map: Add versions of Snowridge CPU model

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
8 months agocpu_map: Add versions of SapphireRapids CPU model
Jiri Denemark [Tue, 22 Oct 2024 09:48:14 +0000 (11:48 +0200)] 
cpu_map: Add versions of SapphireRapids CPU model

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
8 months agocpu_map: Add versions of GraniteRapids CPU model
Jiri Denemark [Tue, 22 Oct 2024 09:48:27 +0000 (11:48 +0200)] 
cpu_map: Add versions of GraniteRapids CPU model

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
8 months agocpu_map: Add versions of SierraForest CPU model
Jiri Denemark [Tue, 22 Oct 2024 09:48:48 +0000 (11:48 +0200)] 
cpu_map: Add versions of SierraForest CPU model

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
8 months agodomain_capabilities: Report canonical names of CPU models
Jiri Denemark [Fri, 22 Nov 2024 16:45:00 +0000 (17:45 +0100)] 
domain_capabilities: Report canonical names of CPU models

Some models are just aliases to other models. Make this relation
available to users via domain capabilities.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
8 months agocpu: Introduce virCPUGetCanonicalModel
Jiri Denemark [Fri, 22 Nov 2024 18:00:26 +0000 (19:00 +0100)] 
cpu: Introduce virCPUGetCanonicalModel

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
8 months agocpu_x86: Record relations between CPU models
Jiri Denemark [Fri, 22 Nov 2024 18:09:39 +0000 (19:09 +0100)] 
cpu_x86: Record relations between CPU models

Record a fact a specific CPU model was derived from another one. The
original model is also marked as an alias of the new one in case it did
not change any properties of the original CPU.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
8 months agosync_qemu_models_i386: Copy signatures from base model
Jiri Denemark [Tue, 22 Oct 2024 10:38:04 +0000 (12:38 +0200)] 
sync_qemu_models_i386: Copy signatures from base model

The signatures in the CPU map are used for matching physical CPUs and
thus we need to cover all possible real world variants we know about.
When adding a new version of an existing CPU model, we should copy the
signature(s) of the existing model rather than replacing it with the
signature that QEMU uses.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
8 months agosync_qemu_models_i386: Update index.xml
Jiri Denemark [Mon, 21 Oct 2024 13:41:50 +0000 (15:41 +0200)] 
sync_qemu_models_i386: Update index.xml

Add all newly generated CPU models to the appropriate section of
index.xml.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
8 months agocpu_map: Properly group models in index.xml
Jiri Denemark [Tue, 22 Oct 2024 07:16:46 +0000 (09:16 +0200)] 
cpu_map: Properly group models in index.xml

We already visually group the included models using comments. This patch
introduces a new <group name='...'> element for doing it properly in a
machine friendly way.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
8 months agosync_qemu_models_i386: Switch to lxml
Jiri Denemark [Mon, 21 Oct 2024 13:41:33 +0000 (15:41 +0200)] 
sync_qemu_models_i386: Switch to lxml

XMLs parse/format round trip using lxml results in an XML document that
almost exactly matches the original (including comments).

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
8 months agosync_qemu_models_i386: Store extra info in a separate file
Jiri Denemark [Tue, 12 Nov 2024 10:24:23 +0000 (11:24 +0100)] 
sync_qemu_models_i386: Store extra info in a separate file

We don't really need or want the extra info to be included in the CPU
model definitions in git, it's mostly useful for verifying the output of
the script. Let's store it in a separate file rather than in a comment
block of the CPU model definition itself.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
8 months agosync_qemu_models_i386: Add support for versioned CPU models
Jiri Denemark [Mon, 21 Oct 2024 11:25:51 +0000 (13:25 +0200)] 
sync_qemu_models_i386: Add support for versioned CPU models

Each CPU model with -v* suffix is defined as a standalone model copying
all attributes of the previous version. CPU model versions with an alias
are handled differently. The full definition is used for the alias and
the versioned model is created as an identical copy of the alias.

To avoid breaking migration compatibility of host-model CPUs all
versioned models are marked with <decode guest='off'/> so that they are
ignored when selecting candidates for host-model. It's not ideal but not
doing so would break almost all host-model CPUs as the new versioned CPU
models have all vmx-* features included since their introduction while
existing CPU models were updated later. This meas existing models would
be accompanied with a long list of vmx-* features to properly describe a
host CPU while the newly added CPU models would have those features
enabled implicitly and their list of features would be significantly
shorter. Thus the new models would always be better candidates for
host-model than the existing models.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
8 months agosync_qemu_models_i386: Do not require full path to QEMU's cpu.c
Jiri Denemark [Mon, 21 Oct 2024 11:00:26 +0000 (13:00 +0200)] 
sync_qemu_models_i386: Do not require full path to QEMU's cpu.c

While the script for synchronizing CPU features expects a path to QEMU
source tree, this CPU model script insisted on getting a full patch to
cpu.c file, even though it could easily deduce it from the path to QEMU
source tree.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
8 months agosync_qemu_models_i386: Do not overwrite existing models
Jiri Denemark [Mon, 21 Oct 2024 10:55:32 +0000 (12:55 +0200)] 
sync_qemu_models_i386: Do not overwrite existing models

We don't change definitions of CPU models which were already included in
a libvirt release to maintain migration compatibility. Thus the script
can just skip existing models and save us from having to drop the
changes it would do to them.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
8 months agosync_qemu_models_i386: Use f-strings
Jiri Denemark [Mon, 21 Oct 2024 10:10:57 +0000 (12:10 +0200)] 
sync_qemu_models_i386: Use f-strings

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
8 months agosync_qemu_features_i386: Add some removed features back
Jiri Denemark [Mon, 21 Oct 2024 09:54:50 +0000 (11:54 +0200)] 
sync_qemu_features_i386: Add some removed features back

When removing features unknown to QEMU (they have a different name or
are completely missing as they are not configurable by a user) I should
not have removed them from the list of features unknown to QEMU in the
script for synchronizing QEMU features to the CPU map.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
8 months agocpu_x86: Promote added/removed from ancestor
Jiri Denemark [Fri, 15 Nov 2024 13:52:12 +0000 (14:52 +0100)] 
cpu_x86: Promote added/removed from ancestor

When a CPU model is defined based on another model, we were completely
ignoring features marked as added to or removed from the original model
after it was released. For added features this is the right thing to do
as it will promote them to become normal features included in the new
model. But features marked as removed would become included in the new
model as well. We need to explicitly remove them as if they were never
included in the model.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
8 months agocpu_x86: Annotate virCPUx86Model fields
Jiri Denemark [Fri, 22 Nov 2024 15:01:28 +0000 (16:01 +0100)] 
cpu_x86: Annotate virCPUx86Model fields

Document which fields are inherited when a CPU model is based on another
model.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
8 months agoTranslated using Weblate (Swedish)
Göran Uddeborg [Sun, 24 Nov 2024 12:38:44 +0000 (12:38 +0000)] 
Translated using Weblate (Swedish)

Currently translated at 97.9% (10305 of 10526 strings)

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

Signed-off-by: Göran Uddeborg <goeran@uddeborg.se>
8 months agoTranslated using Weblate (Swedish)
Göran Uddeborg [Sat, 23 Nov 2024 09:33:47 +0000 (09:33 +0000)] 
Translated using Weblate (Swedish)

Currently translated at 97.7% (10285 of 10526 strings)

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

Signed-off-by: Göran Uddeborg <goeran@uddeborg.se>
8 months agoTranslated using Weblate (Swedish)
Weblate [Sat, 23 Nov 2024 09:27:15 +0000 (09:27 +0000)] 
Translated using Weblate (Swedish)

Currently translated at 97.4% (10259 of 10526 strings)

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

Signed-off-by: Weblate <noreply-mt-weblate@weblate.org>
8 months agoTranslated using Weblate (Swedish)
Göran Uddeborg [Sat, 23 Nov 2024 09:24:01 +0000 (09:24 +0000)] 
Translated using Weblate (Swedish)

Currently translated at 97.4% (10259 of 10526 strings)

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

Signed-off-by: Göran Uddeborg <goeran@uddeborg.se>
8 months agoTranslated using Weblate (Swedish)
Weblate [Fri, 22 Nov 2024 21:12:44 +0000 (21:12 +0000)] 
Translated using Weblate (Swedish)

Currently translated at 97.2% (10235 of 10526 strings)

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

Signed-off-by: Weblate <noreply-mt-weblate@weblate.org>
8 months agoTranslated using Weblate (Swedish)
Göran Uddeborg [Fri, 22 Nov 2024 21:09:25 +0000 (21:09 +0000)] 
Translated using Weblate (Swedish)

Currently translated at 97.2% (10235 of 10526 strings)

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

Signed-off-by: Göran Uddeborg <goeran@uddeborg.se>
8 months agoTranslated using Weblate (Swedish)
Weblate [Fri, 22 Nov 2024 21:08:24 +0000 (21:08 +0000)] 
Translated using Weblate (Swedish)

Currently translated at 97.1% (10224 of 10526 strings)

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

Signed-off-by: Weblate <noreply-mt-weblate@weblate.org>
8 months agoTranslated using Weblate (Swedish)
Göran Uddeborg [Fri, 22 Nov 2024 21:04:05 +0000 (21:04 +0000)] 
Translated using Weblate (Swedish)

Currently translated at 97.1% (10224 of 10526 strings)

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

Signed-off-by: Göran Uddeborg <goeran@uddeborg.se>
8 months agoTranslated using Weblate (Georgian)
Weblate [Thu, 21 Nov 2024 05:41:33 +0000 (05:41 +0000)] 
Translated using Weblate (Georgian)

Currently translated at 4.3% (459 of 10526 strings)

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

Signed-off-by: Weblate <noreply-mt-weblate@weblate.org>
8 months agoTranslated using Weblate (French)
Léane GRASSER [Tue, 19 Nov 2024 12:11:03 +0000 (12:11 +0000)] 
Translated using Weblate (French)

Currently translated at 95.9% (10098 of 10526 strings)

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

Signed-off-by: Léane GRASSER <leane.grasser@proton.me>
8 months agoTranslated using Weblate (Swedish)
Göran Uddeborg [Tue, 19 Nov 2024 09:22:39 +0000 (09:22 +0000)] 
Translated using Weblate (Swedish)

Currently translated at 96.9% (10205 of 10526 strings)

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

Signed-off-by: Göran Uddeborg <goeran@uddeborg.se>
8 months agoTranslated using Weblate (Chinese (Simplified) (zh_CN))
jianqing yan [Tue, 19 Nov 2024 09:21:28 +0000 (10:21 +0100)] 
Translated using Weblate (Chinese (Simplified) (zh_CN))

Currently translated at 95.7% (10074 of 10526 strings)

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

Co-authored-by: jianqing yan <yanjianqing@kylinos.cn>
Signed-off-by: jianqing yan <yanjianqing@kylinos.cn>
8 months agoTranslated using Weblate (Swedish)
Weblate [Tue, 19 Nov 2024 09:21:27 +0000 (10:21 +0100)] 
Translated using Weblate (Swedish)

Currently translated at 96.8% (10199 of 10526 strings)

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

Co-authored-by: Weblate <noreply-mt-weblate@weblate.org>
Signed-off-by: Weblate <noreply-mt-weblate@weblate.org>
8 months agoTranslated using Weblate (Swedish)
Göran Uddeborg [Tue, 19 Nov 2024 09:21:26 +0000 (10:21 +0100)] 
Translated using Weblate (Swedish)

Currently translated at 96.8% (10199 of 10526 strings)

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

Co-authored-by: Göran Uddeborg <goeran@uddeborg.se>
Signed-off-by: Göran Uddeborg <goeran@uddeborg.se>
8 months agoqemuxmlconftest: Add test cases for the <dataStore> feature
Nikolai Barybin [Wed, 20 Nov 2024 15:48:49 +0000 (18:48 +0300)] 
qemuxmlconftest: Add test cases for the <dataStore> feature

Signed-off-by: Nikolai Barybin <nikolai.barybin@virtuozzo.com>
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
8 months agoqemuxmlactivetest: Add tests for <dataStore>
Nikolai Barybin [Wed, 20 Nov 2024 15:48:49 +0000 (18:48 +0300)] 
qemuxmlactivetest: Add tests for <dataStore>

Signed-off-by: Nikolai Barybin <nikolai.barybin@virtuozzo.com>
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
8 months agotests: virstoragetest: Add tests for detection of qcow2 'data_file' feature
Nikolai Barybin [Wed, 20 Nov 2024 15:48:49 +0000 (18:48 +0300)] 
tests: virstoragetest: Add tests for detection of qcow2 'data_file' feature

Add two test images showing the use of 'data_file' and 'data_file_raw'
(although the latter is not detected by libvirt) so that we can see that
the qcow2 metadata parser and backing chain populators work correctly.

The example files were created by:

 qemu-img create  -f qcow2 -o data_file=raw,data_file_raw=true,preallocation=off datafile.qcow2 1k
 qemu-img create  -f qcow2 -o data_file=rawpreallocation=off -F qcow2 -b datafile.qcow2 qcow2datafile-datafile.qcow2

Note that 'data_file_raw' is mutually exclusive with backing images.

Signed-off-by: Nikolai Barybin <nikolai.barybin@virtuozzo.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
8 months agoqemu: block: Add support for 'data-file' feature of qcow2
Nikolai Barybin [Wed, 20 Nov 2024 15:48:48 +0000 (18:48 +0300)] 
qemu: block: Add support for 'data-file' feature of qcow2

Add the block infrastructure for detecting and landling the data file
for images and starting qemu with the configuration.

Signed-off-by: Nikolai Barybin <nikolai.barybin@virtuozzo.com>
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
8 months agoqemu: factor out qemuDomainPrepareStorageSource()
Nikolai Barybin [Wed, 20 Nov 2024 15:48:47 +0000 (18:48 +0300)] 
qemu: factor out qemuDomainPrepareStorageSource()

This refactoring will simplify next changes.

Signed-off-by: Nikolai Barybin <nikolai.barybin@virtuozzo.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
8 months agoqemu: put data-file path to VM's cgroup and namespace
Nikolai Barybin [Wed, 20 Nov 2024 15:48:46 +0000 (18:48 +0300)] 
qemu: put data-file path to VM's cgroup and namespace

Signed-off-by: Nikolai Barybin <nikolai.barybin@virtuozzo.com>
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
8 months agosecurity: apparmor: handle qcow2 data-file
Nikolai Barybin [Wed, 20 Nov 2024 15:48:45 +0000 (18:48 +0300)] 
security: apparmor: handle qcow2 data-file

Signed-off-by: Nikolai Barybin <nikolai.barybin@virtuozzo.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
8 months agosecurity: selinux: handle qcow2 data-file on image label set/restore
Nikolai Barybin [Wed, 20 Nov 2024 15:48:44 +0000 (18:48 +0300)] 
security: selinux: handle qcow2 data-file on image label set/restore

Signed-off-by: Nikolai Barybin <nikolai.barybin@virtuozzo.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
8 months agosecurity: DAC: handle qcow2 data-file on image label set/restore
Nikolai Barybin [Wed, 20 Nov 2024 15:48:43 +0000 (18:48 +0300)] 
security: DAC: handle qcow2 data-file on image label set/restore

Signed-off-by: Nikolai Barybin <nikolai.barybin@virtuozzo.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
8 months agostorage file: fill in src->dataFileStore during file probe
Nikolai Barybin [Wed, 20 Nov 2024 15:48:42 +0000 (18:48 +0300)] 
storage file: fill in src->dataFileStore during file probe

Signed-off-by: Nikolai Barybin <nikolai.barybin@virtuozzo.com>
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
8 months agostorage file: add qcow2 data-file path parsing from header
Nikolai Barybin [Wed, 20 Nov 2024 15:48:41 +0000 (18:48 +0300)] 
storage file: add qcow2 data-file path parsing from header

In qcow2 header data file is represented by incompitible feature bit
and its path is saved to header extension table.
Thus, we implement here the logic similar to backing file probing.

Signed-off-by: Nikolai Barybin <nikolai.barybin@virtuozzo.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
8 months agostorage file: add getDataFile function to FileTypeInfo
Nikolai Barybin [Wed, 20 Nov 2024 15:48:40 +0000 (18:48 +0300)] 
storage file: add getDataFile function to FileTypeInfo

Signed-off-by: Nikolai Barybin <nikolai.barybin@virtuozzo.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
8 months agoconf: implement XML parsing/formating for <dataStore> element of a storage <source>
Nikolai Barybin [Wed, 20 Nov 2024 15:48:39 +0000 (18:48 +0300)] 
conf: implement XML parsing/formating for <dataStore> element of a storage <source>

Introduce parsing and formatting of <dataStore> element. The <dataStore
represents a different storage volume meant for storing the actual
blocks of guest-visible data. The original disk source is then just a
metadata storage for any advanced features.

This currently works only for 'qcow2' images.

Signed-off-by: Nikolai Barybin <nikolai.barybin@virtuozzo.com>
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
8 months ago Add schema and documentation for 'dataStore' sub-element of disk source
Nikolai Barybin [Wed, 20 Nov 2024 15:48:38 +0000 (18:48 +0300)] 
 Add schema and documentation for 'dataStore' sub-element of disk source

Signed-off-by: Nikolai Barybin <nikolai.barybin@virtuozzo.com>
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
8 months agoconf: add data-file feature and related fields to virStorageSource
Nikolai Barybin [Wed, 20 Nov 2024 15:48:36 +0000 (18:48 +0300)] 
conf: add data-file feature and related fields to virStorageSource

The 'data-file' is a qcow2 feature which allows storing the actual data
outside of the qcow2 image.

Signed-off-by: Nikolai Barybin <nikolai.barybin@virtuozzo.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
8 months agodocs: formatsecret: Fix an example of secret-set-value
Han Han [Thu, 21 Nov 2024 02:27:36 +0000 (10:27 +0800)] 
docs: formatsecret: Fix an example of secret-set-value

The previous example will cause the error like:
error: Options --file and --base64 are mutually exclusive

Reported-by: Yanqiu Zhang <yanqzhan@redhat.com>
Signed-off-by: Han Han <hhan@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
8 months agoQEMU: allow to hot plugging virtio-serial-pci device
shenjiatong [Sun, 17 Nov 2024 14:44:26 +0000 (22:44 +0800)] 
QEMU: allow to hot plugging virtio-serial-pci device

Virtio-serial-pci device is hot pluggable, loosen the restriction
and allow user to hot plug it.

Signed-off-by: shenjiatong <yshxxsjt715@163.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
8 months agotests: qemucapabilitiesdata: Update 'x86_64' capabilities for the qemu-9.2 dev cycle
Peter Krempa [Tue, 19 Nov 2024 08:46:24 +0000 (09:46 +0100)] 
tests: qemucapabilitiesdata: Update 'x86_64' capabilities for the qemu-9.2 dev cycle

Update to v9.2.0-rc0-42-g3428a3894c

Apart from the changes below there are changes to CPU features reported
by qemu, some of which were reported multiple times previously which no
longer happens.

Notable changes:
 - 'reconnect-ms' added and 'reconnect' deprecated for 'stream' variant
   of 'netdev-add' backend
 - 'BLOCK_IO_ERROR' event removed 'qom-path' parameter
 - 'GraniteRapids-v2-x86_64-cpu' added
 - 'sm3' hashing algorithm for 'luks' added
 - 'acpi-generic-port' object added
 - deprecated field 'loaded' of 'secret'/'secret_keyring'/'tls-creds*'
   removed
 - 'sh4eb' target added
 - 'query-migrationthreads' command deprecated
 - 'busnr' and 'x-pcie-ext-tag' attributes added for
    'ICH9-LPC'/'PIIX4_PM'/'VGA'/'mch'/'pcie-root-port'/'qxl'/'vfio-pci'/
    'virtio-*'/'vmware-svga'
    devices
 - 'stale-tm' property added for 'intel-iommu' device

Experimental features:
 - 'device-sync-config' command added

As the addition of the 'reconnect-ms' property of the 'stream' network
backend happened along with deprecation of the 'reconnect' field which
was already in use by libvirt this patch also captures the change to the
new format.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
8 months agoqemu: passt: Use 'reconnect-ms' instead of 'reconnect' with new qemus
Peter Krempa [Tue, 19 Nov 2024 09:53:08 +0000 (10:53 +0100)] 
qemu: passt: Use 'reconnect-ms' instead of 'reconnect' with new qemus

The 'reconnect' field of 'stream' network backend type is about to be
deprecated so libvirt will need to start using 'reconnect-ms'.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
8 months agoqemu: capabilities: Introduce QEMU_CAPS_NETDEV_STREAM_RECONNECT_MILISECONDS
Peter Krempa [Tue, 19 Nov 2024 09:41:13 +0000 (10:41 +0100)] 
qemu: capabilities: Introduce QEMU_CAPS_NETDEV_STREAM_RECONNECT_MILISECONDS

The 'stream' type for 'netdev-add' recently added support for
'reconnect-ms' which supersedes 'reconnect' (now deprecated). Add a
capability which will allow us to switch to the new property.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
8 months agoqemu: capabilities: Restore grouping in 'virQEMUCapsQMPSchemaQueries'
Peter Krempa [Tue, 19 Nov 2024 09:35:16 +0000 (10:35 +0100)] 
qemu: capabilities: Restore grouping in 'virQEMUCapsQMPSchemaQueries'

Historically the QMP schema lookup queries were grouped by the first
component of the query (which was also sorted), but not fully sorted.
This deteriorated over time. Re-group the query strings now that some
were added at the bottom.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
8 months agoqemuDomainDiskChangeSupported: Add missing iothreads check
Adam Julis [Fri, 26 Jul 2024 08:52:18 +0000 (10:52 +0200)] 
qemuDomainDiskChangeSupported: Add missing iothreads check

GSList of iothreads is not allowed to be changed while the
virtual machine is running.

Resolves: https://issues.redhat.com/browse/RHEL-23607
Signed-off-by: Adam Julis <ajulis@redhat.com>
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
8 months agomanpage: virsh: Add warning about 'migrate' with '--persistent' together with '-...
Peter Krempa [Mon, 18 Nov 2024 13:12:20 +0000 (14:12 +0100)] 
manpage: virsh: Add warning about 'migrate' with '--persistent' together with '--xml'

When a VM is being migrated to a destination host it can be made
persistent on the destination by using '--persistent'. That may not
work as intended if '--xml' is used as well as that allows overriding
certain aspects of the VM xml, but does not involve the persistent
definition. In most cases users will need to supply also
'--persistent-xml' with the same set of modification.

Modify the man page to clarify the above so that users don't end up with
broken VM after migrating and restarting it.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
8 months agoAPI: migration: Warn about use of VIR_MIGRATE_PERSIST_DEST with VIR_MIGRATE_PARAM_DES...
Peter Krempa [Mon, 18 Nov 2024 13:25:22 +0000 (14:25 +0100)] 
API: migration: Warn about use of VIR_MIGRATE_PERSIST_DEST with VIR_MIGRATE_PARAM_DEST_XML

When a VM is being migrated to a destination host it can be made
persistent on the destination by using VIR_MIGRATE_PERSIST_DEST. That
may not work as intended if VIR_MIGRATE_PARAM_DEST_XML or the 'xmlin'
parameter is used as that allows overriding certain aspects of the VM
xml, but does not involve the persistent definition.
In most cases users will need to supply also VIR_MIGRATE_PARAM_PERSIST_XML
with the same set of modification.

Modify the man page to clarify the above so that users don't end up with
broken VM after migrating and restarting it.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
8 months agoRevert "qemu: migration: Improve handling of VIR_MIGRATE_PARAM_DEST_XML with VIR_MIGR...
Peter Krempa [Mon, 18 Nov 2024 13:02:17 +0000 (14:02 +0100)] 
Revert "qemu: migration: Improve handling of VIR_MIGRATE_PARAM_DEST_XML with VIR_MIGRATE_PERSIST_DEST"

The original intention was to improve the behaviour of the
VIR_MIGRATE_PERSIST_DEST flag which makes the VM persistent after
migration on the destination when used with VIR_MIGRATE_PARAM_DEST_XML.

While it worked as intended with p2p migration where the migration is
driven from the virtqemud instance on the source of the migration, which
can distinguish between the user-provided input XML and the one fetched
from the source of the migration, it's not easily possible to achieve
the same behaviour with normal migration driven from the client library.

The approach also still had corner cases (originally deemed worth
changing) such as if the persistent definition was modified it would be
overwritten.

As there is no clear fix which would improve both styles of migrations
with no corner cases revert the change.

Upcoming commits will modify the documentation to add warning about the
use of VIR_MIGRATE_PERSIST_DEST with VIR_MIGRATE_PARAM_DEST_XML/xmlin
without using VIR_MIGRATE_PARAM_PERSIST_XML instead of a code fix.

This reverts commit 6a385590926d01ab2f2137d1d0833ae797cd2839.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
8 months agoNEWS: Add the news for CVE-2024-4418
Han Han [Fri, 25 Oct 2024 04:57:26 +0000 (12:57 +0800)] 
NEWS: Add the news for CVE-2024-4418

Signed-off-by: Han Han <hhan@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
8 months agoNEWS: Add the news for CVE-2024-2494
Han Han [Fri, 25 Oct 2024 04:57:25 +0000 (12:57 +0800)] 
NEWS: Add the news for CVE-2024-2494

Signed-off-by: Han Han <hhan@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
8 months agoNEWS: cpu_map: Add the EPYC-Genoa cpu mode
Han Han [Fri, 25 Oct 2024 04:57:24 +0000 (12:57 +0800)] 
NEWS: cpu_map: Add the EPYC-Genoa cpu mode

Signed-off-by: Han Han <hhan@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
8 months agoNEWS: qemu: Add support for hyperv enlightenments features
Han Han [Fri, 25 Oct 2024 04:57:23 +0000 (12:57 +0800)] 
NEWS: qemu: Add support for hyperv enlightenments features

Signed-off-by: Han Han <hhan@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>