]> xenbits.xensource.com Git - libvirt.git/log
libvirt.git
14 months agospec: Handle new location of bash-completion .pc file
Cole Robinson [Mon, 19 Feb 2024 16:44:53 +0000 (11:44 -0500)]
spec: Handle new location of bash-completion .pc file

On Fedora 41, bash-completion's .pc file moved to
`bash-completion-devel`.

Using `pkgconfig()` lets us handle this without distro version checks

Signed-off-by: Cole Robinson <crobinso@redhat.com>
14 months agoci: regenerate
Michal Privoznik [Thu, 22 Feb 2024 16:10:59 +0000 (17:10 +0100)]
ci: regenerate

Regenerate the ci files using the latest libvirt-ci:

  commit face9746f9729699ae8525ffac4ee19be82c1ba5
  ci: drop update-alternatives for opensuse tumbleweed

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
14 months agoUpdate translation files
Weblate [Mon, 26 Feb 2024 14:03:57 +0000 (15:03 +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/

Co-authored-by: Weblate <noreply@weblate.org>
Signed-off-by: Fedora Weblate Translation <i18n@lists.fedoraproject.org>
14 months agopo: Refresh potfile for v10.1.0
Jiri Denemark [Mon, 26 Feb 2024 14:05:27 +0000 (15:05 +0100)]
po: Refresh potfile for v10.1.0

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
14 months agonodedevmdevctltest: Fix two memleaks
Michal Privoznik [Mon, 26 Feb 2024 11:42:09 +0000 (12:42 +0100)]
nodedevmdevctltest: Fix two memleaks

There are two memleaks inside of nodedevmdevctltest:

1) In the testCommandDryRunCallback() - when appending lines to
   stdinbuf the pointer is overwritten without freeing the old
   memory it pointed to.

2) In testMdevctlModify() the livecmd variable is reused and
   since its marked as g_autoptr() the first use leaks.

Fixes: 582f27ff15f14fa0e913278c0a2ca9840c3f12f5
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
14 months agosyntax-check: Validate :since: tags
Andrea Bolognani [Fri, 16 Feb 2024 13:02:49 +0000 (14:02 +0100)]
syntax-check: Validate :since: tags

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
14 months agodocs: Other fixes to :since: tags
Andrea Bolognani [Mon, 19 Feb 2024 10:33:45 +0000 (11:33 +0100)]
docs: Other fixes to :since: tags

Make sure that they're entirely contained within a single line
and that punctuation is used in a way that doesn't make the
resulting HTML look weird.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
14 months agodocs: Rewrite a few awkward sections
Andrea Bolognani [Mon, 19 Feb 2024 10:33:45 +0000 (11:33 +0100)]
docs: Rewrite a few awkward sections

Address several oddities, and bring them in line with the style
used for the vast majority of our documentation. In a couple of
cases, some of the possible values for an attribute were listed
with :since: information matching that off the attribute itself,
making it redundant.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
14 months agodocs: Leave kernel version out of :since:
Andrea Bolognani [Mon, 19 Feb 2024 17:26:08 +0000 (18:26 +0100)]
docs: Leave kernel version out of :since:

Tweak things so that the required kernel version is still
listed, just not as part of the :since: tag.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
14 months agodocs: Fix a few weird :since: tags
Andrea Bolognani [Mon, 19 Feb 2024 18:20:38 +0000 (19:20 +0100)]
docs: Fix a few weird :since: tags

These either mention libvirt explicitly, which is something
that we generally don't do, or lack the word "since", which
makes the resulting HTML awkward.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
14 months agodocs: Don't use "line blocks"
Andrea Bolognani [Mon, 19 Feb 2024 17:14:46 +0000 (18:14 +0100)]
docs: Don't use "line blocks"

It's unclear why the conversion process decided to insert
them, but they don't seem to do much.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
14 months agodocs: Fix list of values
Andrea Bolognani [Mon, 19 Feb 2024 18:59:27 +0000 (19:59 +0100)]
docs: Fix list of values

One of them got chopped up.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
14 months agodocs: Remove unnecessary whitespace
Andrea Bolognani [Mon, 19 Feb 2024 17:04:12 +0000 (18:04 +0100)]
docs: Remove unnecessary whitespace

It slipped in during the conversion to reStructuredText.

In one case, part of the preformatted text shouldn't have been
marked as such, so that's addressed too. A spurious opening
parenthesis is dropped as well.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
14 months agodocs: Format lists of files better
Andrea Bolognani [Mon, 19 Feb 2024 10:39:28 +0000 (11:39 +0100)]
docs: Format lists of files better

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
14 months agoci: cirrus: Use --break-system-packages with 'pip install'
Peter Krempa [Mon, 26 Feb 2024 10:25:09 +0000 (11:25 +0100)]
ci: cirrus: Use --break-system-packages with 'pip install'

Cirrus tests on macos started to fail when installing 'pytest'. Override
the pip lock.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
14 months agonodedev: allow modify on define of a persistent node device
Boris Fiuczynski [Thu, 22 Feb 2024 13:02:09 +0000 (14:02 +0100)]
nodedev: allow modify on define of a persistent node device

Allow to modify a node device by using virNodeDeviceDefineXML() to align
its behavior with other drivers define methods.

Signed-off-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Jonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
14 months agovirsh: add nodedev-update
Boris Fiuczynski [Thu, 22 Feb 2024 13:02:08 +0000 (14:02 +0100)]
virsh: add nodedev-update

Add ability to update node devices.

Signed-off-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Jonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
14 months agonodedev: Implement virNodeDeviceUpdate
Boris Fiuczynski [Thu, 22 Feb 2024 13:02:07 +0000 (14:02 +0100)]
nodedev: Implement virNodeDeviceUpdate

Implement the API functions in the node device driver by using mdevctl
modify with the options defined and live.
Instead of increasing the minimum mdevctl version to 1.3.0 in the spec
file to ensure support exists in mdevctl the support is dynamically
checked before using mdevctl.

Signed-off-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Jonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
14 months agoapi: add virNodeDeviceUpdate()
Boris Fiuczynski [Thu, 22 Feb 2024 13:02:06 +0000 (14:02 +0100)]
api: add virNodeDeviceUpdate()

A public API method which allows to update or modify objects is
implemented for almost all other objects that have a concept of
persistent definition and activatability. Currently node devices of type
mdev can be persistent and active. This new method allows to update
defined and active node devices as well.

Signed-off-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
Reviewed-by: Jonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
14 months agovirsh: doc fix on nodedev-list
Boris Fiuczynski [Thu, 22 Feb 2024 13:02:05 +0000 (14:02 +0100)]
virsh: doc fix on nodedev-list

Commit 26136e3 allowed to use option all with option tree but did not
update the manpage.

Signed-off-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
Reviewed-by: Jonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
14 months agotools: add switches persistent and transient to nodedev-list
Boris Fiuczynski [Thu, 22 Feb 2024 13:02:04 +0000 (14:02 +0100)]
tools: add switches persistent and transient to nodedev-list

Now that we can filter persistent and transient node devices in
virConnectListAllNodeDevices(), add these switches also to the
virsh nodedev-list command.

Signed-off-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
Reviewed-by: Jonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
14 months agonodedev: add persistent and transient filter on list
Boris Fiuczynski [Thu, 22 Feb 2024 13:02:03 +0000 (14:02 +0100)]
nodedev: add persistent and transient filter on list

Allow to filter node devices based on their persistent or transient
states.

Signed-off-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
Reviewed-by: Jonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
14 months agotools: add option inactive to nodedev-dumpxml
Boris Fiuczynski [Thu, 22 Feb 2024 13:02:02 +0000 (14:02 +0100)]
tools: add option inactive to nodedev-dumpxml

Allow to dump the XML of the persistent mdev when the mdev has been
started instead of the current state only.

Signed-off-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
Reviewed-by: Jonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
14 months agonodedev: add an active config to mdev
Boris Fiuczynski [Thu, 22 Feb 2024 13:02:01 +0000 (14:02 +0100)]
nodedev: add an active config to mdev

The configuration of a defined mdev can be modified after the mdev is
started. The defined configuration and the active configuration can
therefore run out of sync. Handle this by storing the modifiable data
which is the mdev type and attributes in two separate active and
defined configurations. mdevctl supports with callout scripts to do an
attribute retrieval of started mdevs which is already implemented in
libvirt.

Signed-off-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Jonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
14 months agonode_device: remove unnecessary checks in virNodeDeviceDefFormat
Boris Fiuczynski [Thu, 22 Feb 2024 13:02:00 +0000 (14:02 +0100)]
node_device: remove unnecessary checks in virNodeDeviceDefFormat

virBufferEscapeString already contains the null check.

Signed-off-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
Reviewed-by: Jonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
14 months agonode_device: refactor mdev attributes handling
Boris Fiuczynski [Thu, 22 Feb 2024 13:01:59 +0000 (14:01 +0100)]
node_device: refactor mdev attributes handling

Refactor attribute handling code into methods for easier reuse.

Signed-off-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Jonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
14 months agovirmdev: prepare type and attributes for dual state
Boris Fiuczynski [Thu, 22 Feb 2024 13:01:58 +0000 (14:01 +0100)]
virmdev: prepare type and attributes for dual state

Create a new structure holding type and attributes as these are
modifiable in a persistent mdev configuration and run out of sync with
the active mdev configuration.

Signed-off-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
Reviewed-by: Jonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
14 months agodaemon: fix wrong request count for sparse stream
Vincent Vanlaer [Mon, 19 Feb 2024 22:24:02 +0000 (23:24 +0100)]
daemon: fix wrong request count for sparse stream

Similar to when actual data is being written to the stream, it is
necessary to acknowledge handling of the client request when a hole is
encountered. This is done later in daemonStreamHandleWrite by sending a
fake zero-length reply if the status variable is set to
VIR_STREAM_CONTINUE. It seems that setting status from the message
header was missed for holes in the introduction of the sparse stream
feature.

Signed-off-by: Vincent Vanlaer <libvirt-e6954efa@volkihar.be>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
14 months agoqemuxmlconftest: Introduce memory-hotplug-nvdimm-overlap test case
Michal Privoznik [Tue, 20 Feb 2024 15:28:55 +0000 (16:28 +0100)]
qemuxmlconftest: Introduce memory-hotplug-nvdimm-overlap test case

This new test case checks whether we are handling NVDIMMs
correctly when checking for overlapping memory devices (see
previous commit). Without previous commit, this test case would
fail, yet it was produced in real life (at least the NVDIMM
part) and thus it is valid.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
14 months agodomain_validate: Account for NVDIMM label size properly when checking for memory...
Michal Privoznik [Mon, 19 Feb 2024 14:37:16 +0000 (15:37 +0100)]
domain_validate: Account for NVDIMM label size properly when checking for memory conflicts

As of v9.8.0-rc1~7 we check whether two <memory/> devices don't
overlap (since we allow setting where a <memory/> device should
be mapped to). We do this pretty straightforward, by comparing
start and end address of each <memory/> device combination.
But since only the start address is given (an exposed in the
XML), the end address is computed trivially as:

  start + mem->size * 1024

And for majority of memory device types this works. Except for
NVDIMMs. For them the <memory/> device consists of two separate
regions: 1) actual memory device, and 2) label.

Label is where NVDIMM stores some additional information like
namespaces partition and so on. But it's not mapped into the
guest the same way as actual memory device. In fact, mem->size is
a sum of both actual memory device and label sizes. And to make
things a bit worse, both sizes are subject to alignment (either
the alignsize value specified in XML, or system page size if not
specified in XML).

Therefore, to get the size of actual memory device we need to
take mem->size and substract label size rounded up to alignment.

If we don't do this we report there's an overlap between two
NVDIMMs even when in reality there's none.

Fixes: 3fd64fb0e236fc80ffa2cc977c0d471f11fc39bf
Fixes: 91f9a9fb4fc0d34ed8d7a869de3d9f87687c3618
Resolves: https://issues.redhat.com/browse/RHEL-4452?focusedId=23805174#comment-23805174
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
14 months agovirfile: Switch to virReportSystemError after failed VIR_CLOSE()
Adam Julis [Thu, 22 Feb 2024 09:14:35 +0000 (10:14 +0100)]
virfile: Switch to virReportSystemError after failed VIR_CLOSE()

VIR_CLOSE() sets errno on failure so it's better to use
virReportSystemError() than plain virReportError() as the former
reports errno value too.

Signed-off-by: Adam Julis <ajulis@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
14 months agoqemu: Fix guest-sync response time in qga command
ray [Wed, 21 Feb 2024 14:45:36 +0000 (06:45 -0800)]
qemu: Fix guest-sync response time in qga command

The current implementation sets the guest-sync timeout to the
smaller value between the default value (QEMU_AGENT_WAIT_TIME)
and agent->timeout, without considering the timeout passed
via the qga command.

This patch enhances the guest-sync timeout logic to use the
minimum value among the default value, agent->timeout, and
the timeout passed via the qga command.

Resolves: https://gitlab.com/libvirt/libvirt/-/issues/590
Signed-off-by: ray <honglei.wang@smartx.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
14 months agoqemuMigrationDstPrepareStorage: Annotate that existance of 'volume' disks is checked...
Peter Krempa [Mon, 19 Feb 2024 13:18:19 +0000 (14:18 +0100)]
qemuMigrationDstPrepareStorage: Annotate that existance of 'volume' disks is checked elswhere

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
14 months agoqemuMigrationDstPrepareStorage: Move assumption that 'network' disks always exist
Peter Krempa [Mon, 19 Feb 2024 13:16:19 +0000 (14:16 +0100)]
qemuMigrationDstPrepareStorage: Move assumption that 'network' disks always exist

Move the assumption from the code pre-creating the storage to
qemuMigrationDstPrepareStorage where it's checked for other cases.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
14 months agoqemuMigrationDstPrepareStorage: Reject migration into 'dir' and 'vhost-user' types
Peter Krempa [Mon, 19 Feb 2024 12:53:26 +0000 (13:53 +0100)]
qemuMigrationDstPrepareStorage: Reject migration into 'dir' and 'vhost-user' types

Migrating into a 'directory' won't ever work as we ask qemu to emulate a
fat filesystem, so restoring of the files won't be possible. Same for
'vhost-user' disks which don't support blockjobs as there's no block
backend used in qemu.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
14 months agoqemuMigrationDstPrepareStorage: Rework storage existence check
Peter Krempa [Mon, 19 Feb 2024 12:47:55 +0000 (13:47 +0100)]
qemuMigrationDstPrepareStorage: Rework storage existence check

Check the existance of storage per-type rather than trying to come up
with a common "path".

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
14 months agoqemuMigrationDstPrepareStorage: Move block device specific logic
Peter Krempa [Fri, 16 Feb 2024 15:31:45 +0000 (16:31 +0100)]
qemuMigrationDstPrepareStorage: Move block device specific logic

Now that we have a switch statement, the code adding the 'slice' for
block devices of non-equal sizes can be moved to appropriate location.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
14 months agoqemuMigrationDstPrecreateDisk: Refactor cleanup
Peter Krempa [Thu, 8 Feb 2024 15:48:17 +0000 (16:48 +0100)]
qemuMigrationDstPrecreateDisk: Refactor cleanup

Automatically free helper variables, remove the 'cleanup' label and
use virBufferCurrentContent() to take the XML from the buffer rather
than extracting it to a separate variable.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
14 months agoqemuMigrationDstPrepareStorage: Properly consider path for 'vdpa' devices
Peter Krempa [Fri, 16 Feb 2024 15:40:20 +0000 (16:40 +0100)]
qemuMigrationDstPrepareStorage: Properly consider path for 'vdpa' devices

Allow storage migration of VDPA devices by properly checking that they
exist on the destionation. Pre-creation is not supported but if the
device exists the migration should be able to succeed.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
14 months agoqemuMigrationDstPrepareStorage: Use 'switch' statement to include all storage types
Peter Krempa [Thu, 8 Feb 2024 15:48:25 +0000 (16:48 +0100)]
qemuMigrationDstPrepareStorage: Use 'switch' statement to include all storage types

Decrease the likelyhood that addition of a new storage type will be
forgotten.

This patch also unifies the type check to consult the 'actual' type of
the storage in both cases as the NVMe check looked for the XML declared
type while virStorageSourceIsLocalStorage() looks for the
actual/translated type.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
14 months agocpu_map: Rewrite feature sync script
Tim Wiederhake [Thu, 1 Feb 2024 20:51:01 +0000 (21:51 +0100)]
cpu_map: Rewrite feature sync script

Previously, the script would only detect differences between
libvirt's and qemu's list of x86 features, adding those features
to libvirt was a manual and error prone procedure.

Replace with a script that can generate libvirt's feature list
directly from qemu source code.

Usage: sync_qemu_features_i386.py [--output OUTPUT] [qemu]

If not specified otherwise, "output" defaults to x86_features.xml
in the same directory as sync_qemu_features_i386.py. If a checkout
of the qemu source code resides next to the libvirt directory, it
will be found automatically and need not be specified.

Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
14 months agocpu_map: Format comments
Tim Wiederhake [Thu, 1 Feb 2024 21:40:53 +0000 (22:40 +0100)]
cpu_map: Format comments

Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
14 months agocpu_map: Format register values
Tim Wiederhake [Thu, 1 Feb 2024 21:36:30 +0000 (22:36 +0100)]
cpu_map: Format register values

Use "0x%08x" as format for all values:

    sed \
        -e "s/'0x\(..\)'/'0x000000\\1'/g" \
        -e "s/'0x\(...\)'/'0x00000\\1'/g"

Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
14 months agocpu_map: Sort cpu features
Tim Wiederhake [Thu, 1 Feb 2024 21:03:49 +0000 (22:03 +0100)]
cpu_map: Sort cpu features

Some feature words were not sorted correctly.

Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
14 months agoSet stubDriverName from hostdev driver model attribute during pci device setup
Laine Stump [Fri, 16 Feb 2024 17:43:59 +0000 (12:43 -0500)]
Set stubDriverName from hostdev driver model attribute during pci device setup

commit v9.10.0-129-g8b93d78c83 (first appearing in libvirt-10.0.0) was
supposed to allow forcing a PCI hostdev to be bound to a particular
driver by adding <driver model='blah'/> to the XML for the
device. Unfortunately, a single line was missed during the final
changes to the patch prior to pushing, and the result was that the
driver model could be set to *anything* and it would be accepted but
just ignored.

This patch adds the missing line, which will set the stubDriverName
field of the virPCIDevice object from the hostdev object as the
virPCIDevice is being created. This ends up being used by
virPCIDeviceBindToStub() as the driver that it binds the device to.

Fixes: 8b93d78c8325f1fba5db98848350f3db43f5e7d5
Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
14 months agoTranslated using Weblate (Swedish)
Göran Uddeborg [Mon, 19 Feb 2024 15:01:11 +0000 (16:01 +0100)]
Translated using Weblate (Swedish)

Currently translated at 69.7% (7283 of 10447 strings)

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

Translated using Weblate (Swedish)

Currently translated at 69.5% (7262 of 10447 strings)

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

Translated using Weblate (Swedish)

Currently translated at 68.9% (7202 of 10447 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>
14 months agovirsh-completer: modify and fix bug in virshPoolTypeCompleter, now used for more...
Adam Julis [Tue, 20 Feb 2024 09:31:34 +0000 (10:31 +0100)]
virsh-completer: modify and fix bug in virshPoolTypeCompleter, now used for more commands

Signed-off-by: Adam Julis <ajulis@redhat.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
14 months agobuild: Let users know not all tests might run
Martin Kletzander [Mon, 19 Feb 2024 09:23:35 +0000 (10:23 +0100)]
build: Let users know not all tests might run

We warned users before the meson times, so do like an S Club 7 and bring
it all back.

Add the information into a new section of the summary, because even
though using `warning()` looks better, it scrolls on by once the summary
is printed.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
14 months agobuild: Split optional programs into test and rest
Martin Kletzander [Mon, 19 Feb 2024 09:23:27 +0000 (10:23 +0100)]
build: Split optional programs into test and rest

To be used in the following commit.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
14 months agoNEWS: Announce support for /dev/userfaultfd
Jiri Denemark [Mon, 19 Feb 2024 10:36:36 +0000 (11:36 +0100)]
NEWS: Announce support for /dev/userfaultfd

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
14 months agosyntax-check: Drop 'syntax-check' target
Andrea Bolognani [Fri, 16 Feb 2024 14:03:19 +0000 (15:03 +0100)]
syntax-check: Drop 'syntax-check' target

Our entry point for syntax-check rules is meson, which calls
to each of them specifically; additionally, we have the 'all'
target that warns users who try to use make directly.

The 'syntax-check' target is not used by anything, and in fact
it couldn't be even if one tried: its availability depends on
the $(_gl-Makefile) variable, which in our case is never
defined.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
14 months agosyntax-check: Sync with gnulib
Andrea Bolognani [Fri, 16 Feb 2024 14:09:45 +0000 (15:09 +0100)]
syntax-check: Sync with gnulib

The most notable change is the new 'sc_unportable_grep_q' rule.

While importing it from gnulib, the rule has been tweaked
slightly by adding superflous quotes so that syntax-check.mk
itself doesn't trip it. This is similar to the tricks employed
for the 'sc_prohibit_close' and 'sc_copyright_usage' rules,
among many others.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
14 months agoall: Don't use 'grep -q'
Andrea Bolognani [Fri, 16 Feb 2024 14:15:55 +0000 (15:15 +0100)]
all: Don't use 'grep -q'

It's not portable.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
14 months agorpm: Always enable sysctl_config
Andrea Bolognani [Wed, 14 Feb 2024 18:00:08 +0000 (19:00 +0100)]
rpm: Always enable sysctl_config

We currently rely on it being enabled by default.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
14 months agodocs: domain: Fix iothread to virtqueue mapping example
Peter Krempa [Fri, 16 Feb 2024 08:40:59 +0000 (09:40 +0100)]
docs: domain: Fix iothread to virtqueue mapping example

Each queue can be referenced only once and queues are numbered starting
from 0. Modify the example to show a valid configuration of one
iothread servicing more queues.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
14 months agodocs: domain: Fix broken rST clauses
Peter Krempa [Fri, 16 Feb 2024 08:33:31 +0000 (09:33 +0100)]
docs: domain: Fix broken rST clauses

Fix few malformed rST clauses breaking the 'Since' label and one
internal link.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
14 months agoTranslated using Weblate (Swedish)
Göran Uddeborg [Thu, 15 Feb 2024 21:35:53 +0000 (22:35 +0100)]
Translated using Weblate (Swedish)

Currently translated at 68.9% (7200 of 10447 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>
14 months agoTranslated using Weblate (Korean)
김인수 [Tue, 13 Feb 2024 15:10:15 +0000 (16:10 +0100)]
Translated using Weblate (Korean)

Currently translated at 100.0% (10433 of 10433 strings)

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

Co-authored-by: 김인수 <simmon@nplob.com>
Signed-off-by: 김인수 <simmon@nplob.com>
14 months agoTranslated using Weblate (Swedish)
Göran Uddeborg [Tue, 13 Feb 2024 15:10:15 +0000 (16:10 +0100)]
Translated using Weblate (Swedish)

Currently translated at 68.5% (7162 of 10447 strings)

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

Translated using Weblate (Swedish)

Currently translated at 68.3% (7142 of 10447 strings)

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

Translated using Weblate (Swedish)

Currently translated at 68.1% (7122 of 10447 strings)

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

Translated using Weblate (Swedish)

Currently translated at 67.9% (7102 of 10447 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>
14 months agospec: Explicitly disable userfaultfd_sysctl for mingw
Jiri Denemark [Tue, 13 Feb 2024 18:07:07 +0000 (19:07 +0100)]
spec: Explicitly disable userfaultfd_sysctl for mingw

The %meson* macros pass --auto-features=enabled to enable all "auto"
features, which means we have to explicitly disable them.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
14 months agospec: Disable with_userfaultfd_sysctl on Fedora and RHEL-9
Jiri Denemark [Fri, 9 Feb 2024 15:21:19 +0000 (16:21 +0100)]
spec: Disable with_userfaultfd_sysctl on Fedora and RHEL-9

All supported versions of Fedora and RHEL >= 9.0 support
/dev/userfaultfd.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
14 months agobuild: Add userfaultfd_sysctl build option
Jiri Denemark [Fri, 9 Feb 2024 14:20:58 +0000 (15:20 +0100)]
build: Add userfaultfd_sysctl build option

This option controls whether the sysctl config for enabling unprivileged
userfaultfd will be installed.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
14 months agoqemu: Add support for /dev/userfaultfd
Jiri Denemark [Thu, 8 Feb 2024 14:56:38 +0000 (15:56 +0100)]
qemu: Add support for /dev/userfaultfd

/dev/userfaultfd device is preferred over userfaultfd syscall for
post-copy migrations. Unless qemu driver is configured to disable mount
namespace or to forbid access to /dev/userfaultfd in cgroup_device_acl,
we will copy it to the limited /dev filesystem QEMU will have access to
and label it appropriately. So in the default configuration post-copy
migration will be allowed even without enabling
vm.unprivileged_userfaultfd sysctl.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
14 months agoqemu: Add sysusers config file for qemu & kvm user/groups
Timothée Ravier [Fri, 2 Feb 2024 18:59:44 +0000 (18:59 +0000)]
qemu: Add sysusers config file for qemu & kvm user/groups

Install a systemd sysusers config file for the qemu & kvm user/groups.

We can not use the sysusers_create_compat macro in the RPM specfile to
create those users as we want to keep the specfile standalone and not
relying on additionnal files.

Update the specfile to make the commands closer to what is generated by
the current macro.

See: https://src.fedoraproject.org/rpms/libvirt/pull-request/22
See: https://gitlab.com/libvirt/libvirt/-/merge_requests/319
See: https://bugzilla.redhat.com/show_bug.cgi?id=2095429
See: https://docs.fedoraproject.org/en-US/packaging-guidelines/UsersAndGroups/

Based on previous work by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Timothée Ravier <tim@siosm.fr>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
14 months agodocs: gitlab redirects: Drop '/libvirt' prefix for hosting the web through gitlab...
Peter Krempa [Wed, 10 Jan 2024 13:16:46 +0000 (14:16 +0100)]
docs: gitlab redirects: Drop '/libvirt' prefix for hosting the web through gitlab pages

The prefix needs to be dropped for the redirects to work properly once
hosting 'libvirt.org' via gitlab pages.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
14 months agosecret_conf: Modernize XML parsing & formatting
Michal Privoznik [Fri, 9 Feb 2024 09:20:50 +0000 (10:20 +0100)]
secret_conf: Modernize XML parsing & formatting

Our virSecret XML is still parsed and formatted using old way
(e.g. virXPathString() + virXXXTypeFromString() combo, or
formatting elements using plain virBufferAsprintf() instead of
virXMLFormatElement()). Modernize the code as it'll make it
easier for future expansion.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
14 months agovirSecretDef: Convert 'usage_type' field to proper enum type
Michal Privoznik [Fri, 9 Feb 2024 08:03:54 +0000 (09:03 +0100)]
virSecretDef: Convert 'usage_type' field to proper enum type

Convert the field and adjust the XML parsers to use
virXMLPropEnum().

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
14 months agosecret_conf: Simplify calling of virSecretDefParseUsage()
Michal Privoznik [Fri, 9 Feb 2024 11:07:03 +0000 (12:07 +0100)]
secret_conf: Simplify calling of virSecretDefParseUsage()

The virSecretDefParseUsage() function is called conditionally.
Call it unconditionally and keep pointer to the <usage/> node as
it'll come handy soon.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
14 months agoviraccessdriverpolkit: Add missing vtpm case
Michal Privoznik [Fri, 9 Feb 2024 08:03:29 +0000 (09:03 +0100)]
viraccessdriverpolkit: Add missing vtpm case

When adding vtpm virSecret usage type (in v5.6.0-rc1~61) we
forgot to update polkit access check. This limited user's ability
to match secrets in their rules. Add missing case into switch in
virAccessDriverPolkitCheckSecret().

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
14 months agoqemu: handle adding/removing nbdkit-backed disk sources
Jonathon Jongsma [Thu, 25 Jan 2024 17:51:51 +0000 (11:51 -0600)]
qemu: handle adding/removing nbdkit-backed disk sources

Previously we were only starting or stopping nbdkit when the guest was
started or stopped or when hotplugging/unplugging a disk. But when doing
block operations, the disk backing store sources can also be be added or
removed independently of the disk device. When this happens the nbdkit
backend was not being handled properly. For example, when doing a
blockcopy from a nbdkit-backed disk to a new disk and pivoting to that
new location, the nbdkit process did not get cleaned up properly. Add
some functionality to qemuDomainStorageSourceAccessModify() to handle
this scenario.

Since we're now starting nbdkit from the ChainAccessAllow/Revoke()
functions, we no longer need to explicitly start nbdkit in hotplug code
paths because the hotplug functions already call these allow/revoke
functions and will start/stop nbdkit if necessary.

Add a check to qemuNbdkitProcessStart() to report an error if we
are trying to start nbdkit for a disk source that already has a running
nbdkit process. This shouldn't happen, and if it does it indicates an
error in another part of our code.

Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
14 months agoqemu: roll back if not all nbdkit backends are successful
Jonathon Jongsma [Thu, 25 Jan 2024 20:02:16 +0000 (14:02 -0600)]
qemu: roll back if not all nbdkit backends are successful

When starting nbdkit processes for the backing store of a disk, we were
returning an error if any backing store failed, but we were not cleaning
up processes that succeeded higher in the chain. Make sure that if we
return a failure status from qemuNbdkitStartStorageSource() that we roll
back any processes that had been started.

Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
14 months agoqemu: add a 'chain' parameter to nbdkit start/stop
Jonathon Jongsma [Thu, 25 Jan 2024 17:30:02 +0000 (11:30 -0600)]
qemu: add a 'chain' parameter to nbdkit start/stop

This will allow us to start or stop nbdkit for just a single disk source
or for every source in the backing chain. This will be used in following
patches.

Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
14 months agotests: Add capabilities for QEMU 8.2.0 on s390x
Andrea Bolognani [Fri, 9 Feb 2024 15:25:43 +0000 (16:25 +0100)]
tests: Add capabilities for QEMU 8.2.0 on s390x

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
14 months agotests: Update capabilities for QEMU 8.1.0 on s390x
Andrea Bolognani [Fri, 9 Feb 2024 15:44:09 +0000 (16:44 +0100)]
tests: Update capabilities for QEMU 8.1.0 on s390x

The existing capabilities were generated against a build made
quite early in the QEMU 8.1.0 development cycle. Update them
to match the final release.

A notable effect of this is that the recently introduced
s390-usb-model test now passes instead of failing: QEMU 8.1.0
enables several new devices on s390x, including the qemu-xhci
USB controller.

There's a small amount of additional churn caused by the fact
that the machine on which I have generated these capabilities
is apparently slightly less fancy than the one used originally.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
14 months agotests: Add s390-usb-model
Andrea Bolognani [Fri, 9 Feb 2024 16:15:10 +0000 (17:15 +0100)]
tests: Add s390-usb-model

Show what happens when trying to use a specific type of USB
controller. This currently fails because the QEMU binary doesn't
include the necessary device.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
14 months agotests: Minimize s390-usb-*
Andrea Bolognani [Fri, 9 Feb 2024 14:08:49 +0000 (15:08 +0100)]
tests: Minimize s390-usb-*

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
14 months agotests: Rename s390-usb-*
Andrea Bolognani [Fri, 9 Feb 2024 16:09:26 +0000 (17:09 +0100)]
tests: Rename s390-usb-*

These tests currently cover the scenarios in which the guest
can end up with no USB controller, one of which is specific
to s390x. We are going to add more USB on s390x scenarios, so
a different naming convention is needed.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
14 months agoqemu: fix nbdkit command test for backing chains
Jonathon Jongsma [Fri, 26 Jan 2024 16:41:58 +0000 (10:41 -0600)]
qemu: fix nbdkit command test for backing chains

Previously this test only tested the generated nbdkit command for the
top level disk source. Update it to test the generated commmands for all
sources in the chain.

Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
15 months agoci: regenerate
Ján Tomko [Thu, 8 Feb 2024 15:33:38 +0000 (16:33 +0100)]
ci: regenerate

Regenerate the ci files using the latest libvirt-ci:
commit 5b9b11261fa28cae964fd91638056318f270e300
    examples: illustrate use of remote project reference

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
15 months agoci: lcitool: sync dependencies with libvirt-ci repo
Ján Tomko [Thu, 8 Feb 2024 15:13:50 +0000 (16:13 +0100)]
ci: lcitool: sync dependencies with libvirt-ci repo

libvirt commit 120a674f25aa6e9e1ff7c2e9527f890f48f0340e
    ci: lcitool: Maintain project package deps lists here

added an override file for lcitool in August, but nobody regenerating
libvirt's ci files from the manifest seemed to use the override dir.

libvirt-ci commit 1f4184edfdd541964a187810b34ac4c7702b6577
    commandline: set --extra-data-dir default path
from January made $PWD/ci/lcitool the default.

Reflect the changes made in libvirt-ci's repo here too.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
15 months agodocs: Improve documentation for dies and clusters
Andrea Bolognani [Tue, 6 Feb 2024 17:56:39 +0000 (18:56 +0100)]
docs: Improve documentation for dies and clusters

I've seen examples in the wild of the cluster attribute having
non-zero value on x86_64.

This is obviously quite confusing, but it's the information that
Linux exposes to userspace and we don't really have a way to tell
apart a valid die/cluster ID from a dummy one.

What ultimately matters is that the underlying assumptions about
topology are respected, which they are: in the x86_64 cases that
I have analyzed, for example, each "cluster" contained exactly
one core, so any program that would use this information to
influence guest topology decisions would be unaffected by the
additional level showing up in the hierarchy.

In an attempt to reduce confusion, remove any reference to any
specific value for the attributes having any special meaning
attached to it.

In fact, since there are plans to make it possible to create
guests with multiple CPU clusters on x86_64, rework the note
into a more generic warning cautioning users that an attribute
showing up here does not imply that the same attribute can be
used when defining a guest CPU topology.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
15 months agodocs: page.xsl: Split up 'href_base' for assets and links
Peter Krempa [Wed, 7 Feb 2024 16:05:49 +0000 (17:05 +0100)]
docs: page.xsl: Split up 'href_base' for assets and links

To allow reuse of this template as-is in libvirt-wiki, we need to be
able to specify a distinct asset_href_base and link_href_base. Adjust
the template to allow that.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
15 months agodocs: xsl: Properly propagate 'href_base' as XSL template parameter
Peter Krempa [Wed, 7 Feb 2024 16:30:55 +0000 (17:30 +0100)]
docs: xsl: Properly propagate 'href_base' as XSL template parameter

Propagate it as a parameter both from site.xsl and from newapi.xsl, the
latter of which declared it as a variable.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
15 months agodocs: Move 'html including' from page.xsl to site.xsl
Peter Krempa [Wed, 7 Feb 2024 14:08:16 +0000 (15:08 +0100)]
docs: Move 'html including' from page.xsl to site.xsl

Strip down the main template as much as possible.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
15 months agocss: Move generic styles to 'generic.css'
Peter Krempa [Wed, 7 Feb 2024 13:27:43 +0000 (14:27 +0100)]
css: Move generic styles to 'generic.css'

Move the few generic styles to the appropriate document. 'libvirt.css'
will now be a compilation of styles related only to libvirt.org.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
15 months agocss: Move styles for the generated API documents to libvirt-api.css
Peter Krempa [Wed, 7 Feb 2024 13:23:24 +0000 (14:23 +0100)]
css: Move styles for the generated API documents to libvirt-api.css

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
15 months agocss: Remove unused CSS for migration support matrix table
Peter Krempa [Wed, 7 Feb 2024 13:18:23 +0000 (14:18 +0100)]
css: Remove unused CSS for migration support matrix table

The 'table tbody td.y' and 'table tbody td.n' selectors don't exist
since commit 8841302e3d46b2de0227dc2f97e4e647580e3d88 which converted
the table to rST.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
15 months agocss: Split out page templated styles to 'libvirt-template.css'
Peter Krempa [Wed, 7 Feb 2024 12:59:30 +0000 (13:59 +0100)]
css: Split out page templated styles to 'libvirt-template.css'

Separate the styles related to the main page template and the build
process specifics (docutils-originated) into a separate CSS file.

Hint: Best viewed with 'git show --color-moved=blocks'

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
15 months agocss: mobile: Split up libvirt.org specific styles from main template style
Peter Krempa [Wed, 7 Feb 2024 09:45:17 +0000 (10:45 +0100)]
css: mobile: Split up libvirt.org specific styles from main template style

Separate the libvirt.org specific stuff from the main template style so
that the latter can be reused in libvirt-wiki without modification.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
15 months agojs: Separate the virt-tools blog planet loader code
Peter Krempa [Wed, 7 Feb 2024 09:31:02 +0000 (10:31 +0100)]
js: Separate the virt-tools blog planet loader code

In order to promote simple assets sharing between main libvirt web and
the libvirt-wiki separate the virt tools blog feed loader from the main
code used for search.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
15 months agodocs: page.xsl: Fix headerlinks with new docutils
Peter Krempa [Wed, 7 Feb 2024 15:54:22 +0000 (16:54 +0100)]
docs: page.xsl: Fix headerlinks with new docutils

New docutils generates a <section> element rather than a <div
class='section'> as it did before thus breaking our headerlink
generator.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
15 months agogitlab_pages: Fix 'maven' redirect
Peter Krempa [Wed, 7 Feb 2024 13:28:28 +0000 (14:28 +0100)]
gitlab_pages: Fix 'maven' redirect

The redirect to the 'maven' repository of libvirt doesn't work currently
for libvirt pages as the ':splat' replacement doesn't match due to a
missing '/'.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
15 months agoexamples: Define _GNU_SOURCE for more examples
Michal Privoznik [Wed, 7 Feb 2024 12:28:15 +0000 (13:28 +0100)]
examples: Define _GNU_SOURCE for more examples

Some of our examples use GNU/Linux extensions functions/variables:

1) domtop.c uses usleep(3),
2) logging.c uses getopt(3).

Put _GNU_SOURCE definition at the top of corresponding files so
that users can just grab the code and compile it (in contrast
with the rest of the code where _GNU_SOURCE is declared in
meson-config.h).

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
15 months agovirsh-domain: Fix return of virshGetDBusDisplay() in one error path
Michal Privoznik [Wed, 7 Feb 2024 12:28:31 +0000 (13:28 +0100)]
virsh-domain: Fix return of virshGetDBusDisplay() in one error path

The virshGetDBusDisplay() function is declared to return a
pointer and yet, in one error path false is returned. Switch the
statement to return NULL, which is what other error paths use to
indicate an error.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
15 months agoTranslated using Weblate (Swedish)
Göran Uddeborg [Wed, 7 Feb 2024 10:36:47 +0000 (11:36 +0100)]
Translated using Weblate (Swedish)

Currently translated at 67.2% (7022 of 10447 strings)

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

Translated using Weblate (Swedish)

Currently translated at 67.0% (7002 of 10447 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>
15 months agoNEWS: Mention systemd-resolved support in network driver
Jiri Denemark [Thu, 1 Feb 2024 20:56:45 +0000 (21:56 +0100)]
NEWS: Mention systemd-resolved support in network driver

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
15 months agonetwork: Make virtual domains resolvable from the host
Jiri Denemark [Wed, 31 Jan 2024 11:20:54 +0000 (12:20 +0100)]
network: Make virtual domains resolvable from the host

This patch adds a new attribute "register" to the <domain> element. If
set to "yes", the DNS server created for the virtual network is
registered with systemd-resolved as a name server for the associated
domain. The names known to the dnsmasq process serving DNS and DHCP
requests for the virtual network will then be resolvable from the host
by appending the domain name to them.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
15 months agotests: Add tests for virSystemdResolvedRegisterNameServer
Jiri Denemark [Thu, 25 Jan 2024 15:22:24 +0000 (16:22 +0100)]
tests: Add tests for virSystemdResolvedRegisterNameServer

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
15 months agoutil: Introduce virSystemdResolvedRegisterNameServer
Jiri Denemark [Wed, 31 Jan 2024 11:20:41 +0000 (12:20 +0100)]
util: Introduce virSystemdResolvedRegisterNameServer

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
15 months agoutil: Introduce virSocketAddrBytes
Jiri Denemark [Wed, 31 Jan 2024 10:58:47 +0000 (11:58 +0100)]
util: Introduce virSocketAddrBytes

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>