]> git.ipfire.org Git - thirdparty/libvirt.git/log
thirdparty/libvirt.git
8 months agoqemuPrepareNVRAM: Don't attempt to create NVRAM on block device
Peter Krempa [Fri, 23 Aug 2024 11:14:33 +0000 (13:14 +0200)] 
qemuPrepareNVRAM: Don't attempt to create NVRAM on block device

'virFileRewrite()' which is used to setup the NVRAM image if it doesn't
exist or when it is requested by the user forcibly replaces the
destination file by the file it creates. For block devices this
overwrites the device node file or the symlink pointing to the device
node by a regular file instead of formatting it.

As this not only makes the VM fail to start but also breaks user's /dev/
filesystem forbid it for now.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
8 months agosyntax-check: Suggest ways to fix internal references
Andrea Bolognani [Wed, 13 Nov 2024 21:51:35 +0000 (22:51 +0100)] 
syntax-check: Suggest ways to fix internal references

The rule catches incorrect attempts to use internal references,
but doesn't guide the developer hitting a failure towards the
not exactly obvious acceptable alternatives.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
8 months agodocs: Document authselect to enable the NSS module
Andrea Bolognani [Tue, 12 Nov 2024 22:32:33 +0000 (23:32 +0100)] 
docs: Document authselect to enable the NSS module

When using recent Fedora and RHEL versions, the manual setup that
is otherwise necessary to enable the module can be replaced with
executing a single command.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
8 months agodocs: Rework documentation for the NSS module
Andrea Bolognani [Tue, 12 Nov 2024 19:28:49 +0000 (20:28 +0100)] 
docs: Rework documentation for the NSS module

The page contains some confusing information, especially around
limitations that supposedly only affect one of the two variants,
and goes into what is arguably an unnecessary amount of detail
when it comes to its inner workings.

We can make the page a lot shorter and snappier without
affecting its usefulness, so let's do just that.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
8 months agoqemu: Move PostParse functions out of qemu_domain.c
Michal Privoznik [Tue, 12 Nov 2024 14:55:14 +0000 (15:55 +0100)] 
qemu: Move PostParse functions out of qemu_domain.c

Problem with qemu_domain.c is that it's constantly growing. But
there are few options for improvement. For instance, validation
functions were moved out and now live in qemu_validate.c. We can
do the same for PostParse functions, though since PostParse may
modify domain definition, some functions need to be exported from
qemu_domain.c.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
8 months agoqemu_hotplug: Do not report unknown error when hot-unplugging non-existing device
Martin Kletzander [Fri, 8 Nov 2024 11:30:06 +0000 (12:30 +0100)] 
qemu_hotplug: Do not report unknown error when hot-unplugging non-existing device

When qemuDomainDeleteDevice() gets "DeviceNotFound" error it is a
special case as we're trying to remove a device which does not exists
any more.  Such occasion is indicated by the return value -2.

Callers of the aforementioned function ought to base their behaviour on
the return value.  However not all callers take as much care for the
return value as one could realistically anticipate.

Follow the usual direction of removing possible backend object (in case
of character devices), remove the device from its XML without waiting
for the device removal from QEMU (since it is already not there) and
basically follow the same algorithm as there is when the device was
removed, skipping over the wait for the device removal.

The overall return value also needs to be adjusted since
qemuDomainDeleteDevice() does not set an error on the -2 return value
and would otherwise trigger an unknown error being reported to the user
or management application.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
8 months agoDrop unused function declarations
Michal Privoznik [Tue, 12 Nov 2024 13:32:12 +0000 (14:32 +0100)] 
Drop unused function declarations

When moving function and/or renaming them sometimes corresponding
change to corresponding header file is not done. This leaves us
with functions that are declared in header files, but nowhere
implemented. Drop such declarations.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
8 months agovirnetserverclient.h: Fix typo in comment of virNetServerClientPrivPreExecRestart()
Michal Privoznik [Tue, 12 Nov 2024 13:33:07 +0000 (14:33 +0100)] 
virnetserverclient.h: Fix typo in comment of virNetServerClientPrivPreExecRestart()

The function the comment is referring to is
virNetServerClientPrivNew() not virNetServerClintPrivNew(). The
latter doesn't even exist.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
8 months agodocs: Add Sys::Async::Virt to apps.html
Martin Kletzander [Tue, 12 Nov 2024 09:57:48 +0000 (10:57 +0100)] 
docs: Add Sys::Async::Virt to apps.html

As requested on the libvirt users list I am adding this mention to the
apps page.

Reported-by: Erik Huelsmann <ehuels@gmail.com>
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
8 months agoTranslated using Weblate (Swedish)
Göran Uddeborg [Tue, 12 Nov 2024 09:21:47 +0000 (09:21 +0000)] 
Translated using Weblate (Swedish)

Currently translated at 95.7% (10079 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 [Tue, 12 Nov 2024 09:21:33 +0000 (09:21 +0000)] 
Translated using Weblate (Swedish)

Currently translated at 95.7% (10078 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 [Tue, 12 Nov 2024 09:21:26 +0000 (09:21 +0000)] 
Translated using Weblate (Swedish)

Currently translated at 95.7% (10078 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 [Tue, 12 Nov 2024 09:21:14 +0000 (09:21 +0000)] 
Translated using Weblate (Swedish)

Currently translated at 95.7% (10077 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 [Tue, 12 Nov 2024 09:21:09 +0000 (09:21 +0000)] 
Translated using Weblate (Swedish)

Currently translated at 95.7% (10077 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 [Tue, 12 Nov 2024 09:20:59 +0000 (09:20 +0000)] 
Translated using Weblate (Swedish)

Currently translated at 95.7% (10076 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 [Tue, 12 Nov 2024 09:16:52 +0000 (09:16 +0000)] 
Translated using Weblate (Swedish)

Currently translated at 95.7% (10076 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 [Tue, 12 Nov 2024 09:16:43 +0000 (09:16 +0000)] 
Translated using Weblate (Swedish)

Currently translated at 95.5% (10061 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 [Tue, 12 Nov 2024 09:16:30 +0000 (09:16 +0000)] 
Translated using Weblate (Swedish)

Currently translated at 95.5% (10061 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 agoci: Update with newer lcitool
Martin Kletzander [Tue, 12 Nov 2024 08:00:28 +0000 (09:00 +0100)] 
ci: Update with newer lcitool

This switches to newer freebsd 14.1 and implements the new RUN_PIPELINE
behaviour introduced by Daniel.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
8 months agoch_monitor: Report OS error when removing socket fails
Michal Privoznik [Mon, 11 Nov 2024 13:45:43 +0000 (14:45 +0100)] 
ch_monitor: Report OS error when removing socket fails

When removing a socket in virCHMonitorClose() fails, a warning is
printed. But it doesn't contain errno nor g_strerror() which may
shed more light into why removing of the socket failed.

Oh, and since virCHMonitorClose() is registered as autoptr
cleanup for virCHMonitor() it may happen that virCHMonitorClose()
is called with mon->socketpath allocated but file not existing
yet (see virCHMonitorNew()). Thus ignore ENOENT and do not print
warning in that case - the file doesn't exist anyways.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
8 months agoch_monitor: Avoid possible double free in virCHMonitorClose()
Michal Privoznik [Mon, 11 Nov 2024 13:40:32 +0000 (14:40 +0100)] 
ch_monitor: Avoid possible double free in virCHMonitorClose()

The virCHMonitorClose() is meant to be called when monitor to
cloud-hypervisor process closes. It removes the socket and frees
string containing path to the socket.

In general, there is a problem with the following pattern:

  if (var) {
      do_something();
      g_free(var);
  }

because if the pattern executes twice the variable is freed
twice. That's why we have VIR_FREE() macro. Well, replace plain
g_free() with g_clear_pointer(). Mind you, this is NOT a
destructor where clearing pointers is needless.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
8 months agotest_driver: provide basic disk hotunplug support
John Levon [Fri, 1 Nov 2024 22:31:57 +0000 (22:31 +0000)] 
test_driver: provide basic disk hotunplug support

Signed-off-by: John Levon <john.levon@nutanix.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
8 months agotest_driver: provide basic disk hotplug support
John Levon [Fri, 1 Nov 2024 22:31:56 +0000 (22:31 +0000)] 
test_driver: provide basic disk hotplug support

Add some basic plumbing, based on the qemu driver.

Signed-off-by: John Levon <john.levon@nutanix.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
8 months agoTranslated using Weblate (Swedish)
Göran Uddeborg [Mon, 11 Nov 2024 11:39:38 +0000 (11:39 +0000)] 
Translated using Weblate (Swedish)

Currently translated at 95.5% (10059 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 [Sun, 10 Nov 2024 16:12:45 +0000 (16:12 +0000)] 
Translated using Weblate (Swedish)

Currently translated at 95.3% (10039 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 [Sun, 10 Nov 2024 16:12:32 +0000 (16:12 +0000)] 
Translated using Weblate (Swedish)

Currently translated at 95.2% (10024 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 [Sun, 10 Nov 2024 16:11:15 +0000 (16:11 +0000)] 
Translated using Weblate (Swedish)

Currently translated at 95.2% (10024 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, 9 Nov 2024 11:34:06 +0000 (11:34 +0000)] 
Translated using Weblate (Swedish)

Currently translated at 95.1% (10017 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 [Fri, 8 Nov 2024 22:10:37 +0000 (22:10 +0000)] 
Translated using Weblate (Swedish)

Currently translated at 94.9% (9997 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, 8 Nov 2024 22:07:12 +0000 (22:07 +0000)] 
Translated using Weblate (Swedish)

Currently translated at 94.8% (9984 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, 8 Nov 2024 22:05:47 +0000 (22:05 +0000)] 
Translated using Weblate (Swedish)

Currently translated at 94.8% (9984 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, 8 Nov 2024 22:05:13 +0000 (22:05 +0000)] 
Translated using Weblate (Swedish)

Currently translated at 94.7% (9976 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, 8 Nov 2024 22:00:53 +0000 (22:00 +0000)] 
Translated using Weblate (Swedish)

Currently translated at 94.7% (9976 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, 8 Nov 2024 22:00:39 +0000 (22:00 +0000)] 
Translated using Weblate (Swedish)

Currently translated at 94.6% (9967 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, 8 Nov 2024 21:59:42 +0000 (21:59 +0000)] 
Translated using Weblate (Swedish)

Currently translated at 94.6% (9967 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 agoqemu_hotplug: Report better error message for platform serial devices
Martin Kletzander [Fri, 8 Nov 2024 11:21:09 +0000 (12:21 +0100)] 
qemu_hotplug: Report better error message for platform serial devices

This should be better than the current for both hotplug:

    error: internal error: Invalid target model for serial device

and hot-unplug:

    error: An error occurred, but the cause is unknown

which should not be reached at all.

Resolves: https://issues.redhat.com/browse/RHEL-66222
Resolves: https://issues.redhat.com/browse/RHEL-66223
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
8 months agoqemu: Expose qemuChrIsPlatformDevice outside from qemu_command
Martin Kletzander [Fri, 8 Nov 2024 11:18:46 +0000 (12:18 +0100)] 
qemu: Expose qemuChrIsPlatformDevice outside from qemu_command

Then it can be used from qemu_hotplug.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
8 months agoNEWS: qemu: add multi boot device support on s390x
Boris Fiuczynski [Fri, 8 Nov 2024 11:05:35 +0000 (12:05 +0100)] 
NEWS: qemu: add multi boot device support on s390x

Signed-off-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
8 months agoqemu: command: add multi boot device support on s390x
Boris Fiuczynski [Wed, 6 Nov 2024 07:51:03 +0000 (08:51 +0100)] 
qemu: command: add multi boot device support on s390x

If QEMU supports multi boot device make use of it instead of using the
single boot device machine parameter.

Signed-off-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
8 months agotests: add capabilities for QEMU 9.2.0 on s390x
Boris Fiuczynski [Wed, 6 Nov 2024 07:49:04 +0000 (08:49 +0100)] 
tests: add capabilities for QEMU 9.2.0 on s390x

Let us introduce the xml and reply files for QEMU 9.2.0 on s390x.

A QEMU at commit v9.1.0-1348-g11b8920ed2 was used to generate this data.

Signed-off-by: Shalini Chellathurai Saroja <shalini@linux.ibm.com>
Signed-off-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
8 months agoqemu: capabilities: Add QEMU_CAPS_VIRTIO_CCW_DEVICE_LOADPARM
Boris Fiuczynski [Wed, 6 Nov 2024 07:48:14 +0000 (08:48 +0100)] 
qemu: capabilities: Add QEMU_CAPS_VIRTIO_CCW_DEVICE_LOADPARM

Add capability QEMU_CAPS_VIRTIO_CCW_DEVICE_LOADPARM to detect multi boot
device support in QEMU by checking the virtio-blk-ccw device property
existence of loadparm.

Signed-off-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
8 months agovirnetdevopenvswitch: Warn on unsupported QoS settings
Michal Privoznik [Tue, 22 Oct 2024 07:11:33 +0000 (09:11 +0200)] 
virnetdevopenvswitch: Warn on unsupported QoS settings

Let me preface this with stating the obvious: documentation on
QoS in OVS is very sparse. This is all based on my observation
and OVS codebase analysis.

For the following QoS setting:

  <bandwidth>
    <inbound average="512" peak="1024" burst="32"/>
  </bandwidth>

the following QoS setting is generated into OVS (NB, our XML
values are in KiB/s, OVS has them in bits/s):

  # ovs-vsctl list qos
  _uuid               : a087226b-2da6-4575-ad4c-bf570cb812a9
  external_ids        : {ifname=vnet1, vm-id="7714e6b5-4885-4140-bc59-2f77cc99b3b5"}
  other_config        : {burst="262144", max-rate="8192000", min-rate="4096000"}
  queues              : {0=655bf3a7-e530-4516-9caf-ec9555dfbd4c}
  type                : linux-htb

from which the following topology is generated:

  # for i in qdisc class; do tc -s -d -g $i show dev vnet1; done
  qdisc htb 1: root refcnt 2 r2q 10 default 0x1 direct_packets_stat 0 ver 3.17 direct_qlen 1000
   Sent 2186 bytes 16 pkt (dropped 0, overlimits 0 requeues 0)
   backlog 0b 0p requeues 0

  +---(1:fffe) htb rate 8192Kbit ceil 8192Kbit linklayer ethernet burst 1499b/1mpu 60b cburst 1499b/1mpu 60b level 7
       |       Sent 2186 bytes 16 pkt (dropped 0, overlimits 0 requeues 0)
       |       backlog 0b 0p requeues 0
       |
       +---(1:1) htb prio 0 quantum 51200 rate 4096Kbit ceil 8192Kbit linklayer ethernet burst 32Kb/1mpu 60b cburst 32Kb/1mpu 60b level 0
                 Sent 2186 bytes 16 pkt (dropped 0, overlimits 0 requeues 0)
                 backlog 0b 0p requeues 0

Long story short, the default class (1:) for an OVS interface has
average and peak set exactly as requested. But since it's nested
under another class (1:fffe), it can borrow unused bandwidth. And
the parent is set to have rate = ceil = peak from our XML. From
[1]: htb_tc_install() calls htb_parse_qdisc_details__() which
sets: 'hc->min_rate = hc->max_rate;' and then calls
htb_setup_class_(..., tc_make_handle(1, 0xfffe), tc_make_handle(1, 0), &hc);
to set up the top parent class.

In other words - the interface is set up to so that it can always
consume 'peak' bandwidth and there is no way for us to set it up
differently. It's too late to deny setting 'peak' different to
'average' at XML validation phase so do the next best thing -
throw a warning, just like we do in case <bandwidth/> is set for
an unsupported <interface/> type.

1: https://github.com/openvswitch/ovs/blob/main/lib/netdev-linux.c#L5039
Resolves: https://issues.redhat.com/browse/RHEL-53963
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
8 months agoTranslated using Weblate (Chinese (Simplified) (zh_CN))
zk dc [Thu, 7 Nov 2024 12:53:23 +0000 (12:53 +0000)] 
Translated using Weblate (Chinese (Simplified) (zh_CN))

Currently translated at 95.5% (10058 of 10526 strings)

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

Signed-off-by: zk dc <zkdc2345@qq.com>
8 months agoqemu_domain: Automagically add IOMMU if needed
Michal Privoznik [Wed, 6 Nov 2024 11:57:21 +0000 (12:57 +0100)] 
qemu_domain: Automagically add IOMMU if needed

If a Q35 domain has huge number of vCPUS (over 255, currently), then
it needs IOMMU with Extended Interrupt Mode enabled (see check in
qemuValidateDomainVCpuTopology()).

Well, we already add some devices and to other tricks when
parsing new domain XML. Might as well add IOMMU device if above
condition is met.

Resolves: https://issues.redhat.com/browse/RHEL-65844
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
8 months agoqemu: Turn EIM IOMMU on automagically
Michal Privoznik [Wed, 6 Nov 2024 11:34:42 +0000 (12:34 +0100)] 
qemu: Turn EIM IOMMU on automagically

If a Q35 domain has huge number of vCPUS (over 255, currently), then
it needs IOMMU with Extended Interrupt Mode enabled (see check in
qemuValidateDomainVCpuTopology()).

Well, we already add some devices and to other tricks when
parsing new domain XML. Might as well turn the EIM on for IOMMU
device.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
8 months agolibvirt_private.syms: Export virDomainIOMMUDefNew()
Michal Privoznik [Wed, 6 Nov 2024 11:59:02 +0000 (12:59 +0100)] 
libvirt_private.syms: Export virDomainIOMMUDefNew()

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
9 months agoTranslated using Weblate (Swedish)
Göran Uddeborg [Wed, 6 Nov 2024 21:15:52 +0000 (21:15 +0000)] 
Translated using Weblate (Swedish)

Currently translated at 94.5% (9957 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>
9 months agoch: check return value of virJSONValueArrayAppend
Ján Tomko [Wed, 6 Nov 2024 13:03:27 +0000 (14:03 +0100)] 
ch: check return value of virJSONValueArrayAppend

It only errors out when presented with a non-array, but we do check
it everywhere else.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
9 months agoutil: json: check return value of virJSONValueFromJsonC
Ján Tomko [Wed, 6 Nov 2024 12:19:29 +0000 (13:19 +0100)] 
util: json: check return value of virJSONValueFromJsonC

In virJSONValueFromJsonC, the return value of virJSONValueFromJsonC
was not checked in one case.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
9 months agoqemu: chardev: avoid impossible overflow
Ján Tomko [Wed, 6 Nov 2024 12:15:26 +0000 (13:15 +0100)] 
qemu: chardev: avoid impossible overflow

In the rare case where int and long long are not the same size,
the multiplication of an int variable and an int constant might
overflow. Cast the constant to long long to avoid this.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Fixes: baa4edfb79d5ee861a08b5ec11416c5c156d8cd2
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
9 months agoTranslated using Weblate (French)
Léane GRASSER [Wed, 6 Nov 2024 10:21:23 +0000 (10:21 +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>
9 months agodocs: fix since tag for TPM with custom path
Ján Tomko [Tue, 5 Nov 2024 15:39:18 +0000 (16:39 +0100)] 
docs: fix since tag for TPM with custom path

The feature was pushed after the 10.9.0 release.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Fixes: 579fd44612d044981a5b81a70b03d4a8c0d8930e
9 months agodocs: formatdomain: fix XML snippets
Ján Tomko [Tue, 5 Nov 2024 14:34:33 +0000 (15:34 +0100)] 
docs: formatdomain: fix XML snippets

Fix indentation, missing slashes for unpaired tags and missing angle
brackets.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
9 months agoqemu: explicit swtpm state locking
Marc-André Lureau [Tue, 22 Oct 2024 14:15:21 +0000 (18:15 +0400)] 
qemu: explicit swtpm state locking

With upcoming v0.10 swtpm (commit
https://github.com/stefanberger/swtpm/commit/aa483aeb6df87ed56ccf3d5778d6fd8019089bda),
file locking with "lock" option is now supported and reflected in
"tpmstate-opt-lock" capability.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Stefan Berger <stefanb@linux.ibm.com>
9 months agoqemu_tpm: handle file/block storage source
Marc-André Lureau [Tue, 22 Oct 2024 14:15:20 +0000 (18:15 +0400)] 
qemu_tpm: handle file/block storage source

When swtpm reports "nvram-backend-dir", it can accepts a single file or
block device where TPM state will be stored. --tpmstate must be
backend-uri=file://<path>.

Teach the storage to use custom directory or file source location.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Stefan Berger <stefanb@linux.ibm.com>
9 months agoschema: add TPM emulator <source type='dir' path='..'>
Marc-André Lureau [Tue, 22 Oct 2024 14:15:19 +0000 (18:15 +0400)] 
schema: add TPM emulator <source type='dir' path='..'>

Learn to parse a directory for the TPM state.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Stefan Berger <stefanb@linux.ibm.com>
9 months agoschema: add TPM emulator <source type='file' path='..'>
Marc-André Lureau [Tue, 22 Oct 2024 14:15:18 +0000 (18:15 +0400)] 
schema: add TPM emulator <source type='file' path='..'>

Learn to parse a file path for the TPM state.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Stefan Berger <stefanb@linux.ibm.com>
9 months agotpm: rename 'storagepath' to 'source_path'
Marc-André Lureau [Tue, 22 Oct 2024 14:15:17 +0000 (18:15 +0400)] 
tpm: rename 'storagepath' to 'source_path'

Mechanically replace existing 'storagepath' with 'source_path', as the
following patches introduce <source path='..'> configuration.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Stefan Berger <stefanb@linux.ibm.com>
9 months agoutil: check swtpm nvram-backend-{dir,file} capabilities
Marc-André Lureau [Tue, 22 Oct 2024 14:15:16 +0000 (18:15 +0400)] 
util: check swtpm nvram-backend-{dir,file} capabilities

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Stefan Berger <stefanb@linux.ibm.com>
9 months agoTranslated using Weblate (Swedish)
Göran Uddeborg [Tue, 5 Nov 2024 08:33:40 +0000 (08:33 +0000)] 
Translated using Weblate (Swedish)

Currently translated at 94.4% (9937 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>
9 months agoTranslated using Weblate (Romanian)
Remus-Gabriel Chelu [Tue, 5 Nov 2024 00:17:58 +0000 (00:17 +0000)] 
Translated using Weblate (Romanian)

Currently translated at 15.0% (1580 of 10526 strings)

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

Signed-off-by: Remus-Gabriel Chelu <remusgabriel.chelu@disroot.org>
9 months agoqemu: Report supported panic device models in domcapabilities
Martin Kletzander [Fri, 1 Nov 2024 09:25:49 +0000 (10:25 +0100)] 
qemu: Report supported panic device models in domcapabilities

Domain capabilities include information about support for various
devices and models.

Panic devices are not included in the output which means that management
applications need to include the logic for choosing the right device
model or request a default model and try defining such a domain.

Add reporting of panic device models into the domain capabilities based
on the logic in qemuValidateDomainDefPanic() and also report whether
panic devices are supported based on whether at least one model is
supported.  That way consumers of the domain capability XML can
differentiate between libvirt not reporting the panic device models or
no model being supported.

Resolves: https://issues.redhat.com/browse/RHEL-65187
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
9 months agospec: Fix attributes for some qemu dirs in %{_rundir}
Jiri Denemark [Mon, 4 Nov 2024 12:17:45 +0000 (13:17 +0100)] 
spec: Fix attributes for some qemu dirs in %{_rundir}

The recent attempt to fix the attributes used wrong mode for some
directories used by the QEMU driver. Only dbus and swtpm directories use
770, all other directories are created with 755.

Fixes: 961fb8944d0c2d7d5cc0783888a20317e725a248
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
9 months agoTranslated using Weblate (Swedish)
Göran Uddeborg [Mon, 4 Nov 2024 10:30:09 +0000 (10:30 +0000)] 
Translated using Weblate (Swedish)

Currently translated at 94.2% (9917 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>
9 months agojson: do not call json_tokener_free with NULL
Ján Tomko [Mon, 4 Nov 2024 07:24:39 +0000 (08:24 +0100)] 
json: do not call json_tokener_free with NULL

Add an error message for the rare case if json_tokener_new
fails (allocation failure) and guard any use of json_tokener_free
where tok might be NULL (this was possible in libvirt-nss
when the json file could not be opened).

https://gitlab.com/libvirt/libvirt/-/issues/581

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reported-by: Simon Pilkington
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Richard W.M. Jones <rjones@redhat.com>
9 months agoTranslated using Weblate (Swedish)
Göran Uddeborg [Sun, 3 Nov 2024 13:08:56 +0000 (13:08 +0000)] 
Translated using Weblate (Swedish)

Currently translated at 94.0% (9897 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>
9 months agoTranslated using Weblate (Swedish)
Weblate [Sun, 3 Nov 2024 13:08:25 +0000 (13:08 +0000)] 
Translated using Weblate (Swedish)

Currently translated at 94.0% (9895 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>
9 months agoTranslated using Weblate (Swedish)
Göran Uddeborg [Sun, 3 Nov 2024 13:05:36 +0000 (13:05 +0000)] 
Translated using Weblate (Swedish)

Currently translated at 94.0% (9895 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>
9 months agoTranslated using Weblate (English (United Kingdom))
Andi Chandler [Sat, 2 Nov 2024 12:29:56 +0000 (12:29 +0000)] 
Translated using Weblate (English (United Kingdom))

Currently translated at 49.6% (5227 of 10526 strings)

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

Signed-off-by: Andi Chandler <andi@gowling.com>
9 months agoTranslated using Weblate (Swedish)
Göran Uddeborg [Sat, 2 Nov 2024 09:08:16 +0000 (09:08 +0000)] 
Translated using Weblate (Swedish)

Currently translated at 93.8% (9877 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>
9 months agoTranslated using Weblate (Swedish)
Göran Uddeborg [Fri, 1 Nov 2024 20:32:51 +0000 (20:32 +0000)] 
Translated using Weblate (Swedish)

Currently translated at 93.6% (9854 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>
9 months agodocs: domain: Be more upfront about 'sgio' not being actually supported
Peter Krempa [Wed, 30 Oct 2024 09:17:46 +0000 (10:17 +0100)] 
docs: domain: Be more upfront about 'sgio' not being actually supported

The support for the 'sgio' attribute for SCSI-backed devices was dropped
as there wasn't really ever any upstream support for it.

The docs do state that support for this depends on the hypervisor
itself, but we can be more clear that there is no hypervisor which does
support it.

There is also a suggestion to use 'sgio' instead of 'rawio' as being
more "secure" but since it no longer works drop this suggestion.

Resolves: https://issues.redhat.com/browse/RHEL-65268
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
9 months agovirstring: Use 'g_new0' instead of improper use of 'g_malloc0_n'
Peter Krempa [Fri, 25 Oct 2024 07:45:19 +0000 (09:45 +0200)] 
virstring: Use 'g_new0' instead of improper use of 'g_malloc0_n'

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
9 months agoReplace improper use of g_malloc(0) with g_new0
Peter Krempa [Fri, 25 Oct 2024 07:41:21 +0000 (09:41 +0200)] 
Replace improper use of g_malloc(0) with g_new0

Completely remove use of g_malloc (without zeroing of the allocated
memory) and forbid further use.

Replace use of g_malloc0 in cases where the variable holding the pointer
has proper type.

In all of the above cases we can use g_new0 instead.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
9 months agovirJSONValueFromString: Prefix error message from 'json-c'
Peter Krempa [Fri, 25 Oct 2024 14:12:50 +0000 (16:12 +0200)] 
virJSONValueFromString: Prefix error message from 'json-c'

The error message from 'json-c' was passed along without any libvirt
string which makes it hard to find in the source and isn't exactly clear
when present in logs:

 libvirtd[843]: internal error : invalid utf-8 string

Prefix the message with 'failed to parse JSON'.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
9 months agoqemu: Fix maximum physical address size in baseline CPU
Jiri Denemark [Thu, 31 Oct 2024 13:19:54 +0000 (14:19 +0100)] 
qemu: Fix maximum physical address size in baseline CPU

We should include maximum physical address size in the CPU definition
created by virConnectBaselineHypervisorCPU only if we know the value for
all input CPUs. Otherwise we would create a CPU definition that is not
usable on all hosts from which we gathered the CPU info.

https://issues.redhat.com/browse/RHEL-24850

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
9 months agoPost-release version bump to 10.10.0
Jiri Denemark [Fri, 1 Nov 2024 09:16:35 +0000 (10:16 +0100)] 
Post-release version bump to 10.10.0

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
9 months agoRelease of libvirt-10.9.0 v10.9.0
Jiri Denemark [Fri, 1 Nov 2024 09:13:14 +0000 (10:13 +0100)] 
Release of libvirt-10.9.0

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
9 months agoTranslated using Weblate (Swedish)
Göran Uddeborg [Thu, 31 Oct 2024 20:54:22 +0000 (20:54 +0000)] 
Translated using Weblate (Swedish)

Currently translated at 93.4% (9834 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>
9 months agospec: Fix attributes for ghosts directories in %{_rundir}
Jiri Denemark [Wed, 30 Oct 2024 11:28:00 +0000 (12:28 +0100)] 
spec: Fix attributes for ghosts directories in %{_rundir}

Directories which we dynamically create in %{_rundir} with non-default
attributes (i.e., the owner differs from root:root and/or mode is not
755) fail RPM verification. We should properly declare the expected
ownership and mode in the specfile.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
9 months agoRevert "network: add rule to nftables backend that zeroes checksum of DHCP responses" v10.9.0-rc2
Laine Stump [Wed, 30 Oct 2024 03:21:27 +0000 (23:21 -0400)] 
Revert "network: add rule to nftables backend that zeroes checksum of DHCP responses"

This reverts commit 42ab0148dd11727f7e3fd31dce4485469af290d5.

This patch was supposed to fix the checksum of dhcp response packets
by setting it to 0 (because having a non-0 but incorrect checksum was
causing the packets to be droppe on FreeBSD guests).

Early testing was positive, but after the patch was pushed upstream
and more people could test it, it turned out that while it fixed the
dhcp checksum problem for virtio-net interfaces on FreeBSD and
OpenBSD, it also *broke* dhcp checksums for the e1000 emulated NIC on
*all* guests (but not e1000e).

So we're reverting this fix and looking for something more universal
to be included in the next release.

Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
9 months agoTranslated using Weblate (Swedish)
Göran Uddeborg [Tue, 29 Oct 2024 09:12:52 +0000 (09:12 +0000)] 
Translated using Weblate (Swedish)

Currently translated at 93.2% (9814 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>
9 months agoTranslated using Weblate (Swedish)
Göran Uddeborg [Mon, 28 Oct 2024 19:57:35 +0000 (19:57 +0000)] 
Translated using Weblate (Swedish)

Currently translated at 92.8% (9774 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>
9 months agoTranslated using Weblate (Korean)
김인수 [Mon, 28 Oct 2024 12:19:32 +0000 (12:19 +0000)] 
Translated using Weblate (Korean)

Currently translated at 100.0% (10526 of 10526 strings)

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

Signed-off-by: 김인수 <simmon@nplob.com>
9 months agoTranslated using Weblate (Korean)
김인수 [Sun, 27 Oct 2024 15:34:56 +0000 (15:34 +0000)] 
Translated using Weblate (Korean)

Currently translated at 99.9% (10519 of 10526 strings)

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

Signed-off-by: 김인수 <simmon@nplob.com>
9 months agoTranslated using Weblate (Korean)
김인수 [Sun, 27 Oct 2024 09:48:57 +0000 (09:48 +0000)] 
Translated using Weblate (Korean)

Currently translated at 99.8% (10514 of 10526 strings)

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

Signed-off-by: 김인수 <simmon@nplob.com>
9 months agoTranslated using Weblate (Korean)
Weblate [Sun, 27 Oct 2024 09:48:43 +0000 (09:48 +0000)] 
Translated using Weblate (Korean)

Currently translated at 99.8% (10514 of 10526 strings)

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

Signed-off-by: Weblate <noreply-mt-weblate@weblate.org>
9 months agoTranslated using Weblate (Ukrainian)
Yuri Chornoivan [Sat, 26 Oct 2024 05:42:26 +0000 (05:42 +0000)] 
Translated using Weblate (Ukrainian)

Currently translated at 100.0% (10526 of 10526 strings)

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

Signed-off-by: Yuri Chornoivan <yurchor@ukr.net>
9 months agoUpdate translation files
Weblate [Fri, 25 Oct 2024 06:22:41 +0000 (08:22 +0200)] 
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>
9 months agoTranslated using Weblate (Swedish)
Göran Uddeborg [Thu, 24 Oct 2024 20:13:15 +0000 (20:13 +0000)] 
Translated using Weblate (Swedish)

Currently translated at 92.5% (9737 of 10516 strings)

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

Signed-off-by: Göran Uddeborg <goeran@uddeborg.se>
9 months agodocs: permit a user's chosen identity with SoB
Daniel P. Berrangé [Tue, 22 Oct 2024 09:38:58 +0000 (10:38 +0100)] 
docs: permit a user's chosen identity with SoB

The docs for submitting a patch describe using your "Legal Name" with
the Signed-off-by line.

In recent times, there's been a general push back[1] against the notion
that use of Signed-off-by in a project automatically requires / implies
the use of legal ("real") names and greater awareness of the downsides.

Full discussion of the problems of such policies is beyond the scope of
this commit message, but at a high level they are liable to marginalize,
disadvantage, and potentially result in harm, to contributors.

TL;DR: there are compelling reasons for a person to choose distinct
identities in different contexts & a decision to override that choice
should not be taken lightly.

A number of key projects have responded to the issues raised by making
it clear that a contributor is free to determine the identity used in
SoB lines:

 * Linux has clarified[2] that they merely expect use of the
   contributor's "known identity", removing the previous explicit
   rejection of pseudonyms.

 * CNCF has clarified[3] that the real name is simply the identity
   the contributor chooses to use in the context of the community
   and does not have to be a legal name, nor birth name, nor appear
   on any government ID.

Since we have no intention of ever routinely checking any form of ID
documents for contributors[4], realistically we have no way of knowing
anything about the name they are using, except through chance, or
through the contributor volunteering the information. IOW, we almost
certainly already have people using pseudonyms for contributions.

This proposes to accept that reality and eliminate unnecessary friction,
by following Linux & the CNCF in merely asking that a contributors'
commonly known identity, of their choosing, be used with the SoB line.

[1] Raised in many contexts at many times, but a decent overall summary
    can be read at https://drewdevault.com/2023/10/31/On-real-names.html
[2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=d4563201f33a022fc0353033d9dfeb1606a88330
[3] https://github.com/cncf/foundation/blob/659fd32c86dc/dco-guidelines.md
[4] Excluding the rare GPG key signing parties for regular maintainers

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
9 months agonetwork: add rule to nftables backend that zeroes checksum of DHCP responses
Laine Stump [Mon, 21 Oct 2024 03:02:56 +0000 (23:02 -0400)] 
network: add rule to nftables backend that zeroes checksum of DHCP responses

Many years ago (April 2010), soon after "vhost" in-kernel packet
processing was added to the virtio-net driver, people running RHEL5
virtual machines with a virtio-net interface connected via a libvirt
virtual network noticed that when vhost packet processing was enabled,
their VMs could no longer get an IP address via DHCP - the guest was
ignoring the DHCP response packets sent by the host.

(I've been informed by danpb that the same issue had been encountered,
and "fixed" even earlier than that, in 2006, with Xen as the
hypervisor.)

The "gory details" of the 2010 discussion are chronicled here:

  https://lists.isc.org/pipermail/dhcp-hackers/2010-April/001835.html

but basically it was because packet checksums weren't being fully
computed on the host side (because QEMU on the host and the NIC driver
in the guest had agreed between themselves to turn off checksums
because they were unnecessary due to the "link" between the two being
entirely in local memory rather than an error-prone physical cable),
but

1) a partial checksum was being put into the packets at some point by
   "someone"

2) the "don't use checksums" info was known by the guest kernel, which
   would properly ignore the "bad" checksum), and

3) the packets were being read by the dhclient application on the
   guest side with a "raw" socket (thus bypassing the guest kernel UDP
   processing that would have known the checksum was irrelevant and
   ignore it)),

The "fix" for this ended up being two-tiered:

1) The ISC DHCP package (which contains the aforementioned dhclient
program) made a fix to their dhclient code which caused it to accept
packets anyway even if they didn't have a proper checksum (NB: that's
not a full explanation, and possibly not accurate). This remedied the
problem for guests with an updated dhclient. Here is the code with the
fix to ISC DHCP:

  https://github.com/isc-projects/dhcp/blob/master/common/packet.c#L365

This eliminated the issue for any new/updated guests that had the
fixed dhclient, but it didn't solve the problem for existing/old guest
images that didn't/couldn't get their dhclient updated. This brings us
to:

2) iptables added a new "CHECKSUM" target and "--checksum-fill"
action:

  http://patchwork.ozlabs.org/patch/58525/

and libvirt added an iptables rule for each virtual network to match
DHCP response packets and perform --checksum-fill. This way by the
time dhclient on the guest read the raw packet, the checksum would be
corrected, and the packet would be accepted. This was pushed upstream
in libvirt commit v0.8.2-142-gfd5b15ff1a.

The word at the time from those more knowledgeable than me was that
the bad checksum problem was really specific to ISC's dhclient running
on Linux, and so once their fix was in use everywhere dhclient was
used, bad checksums would be a thing of the past and the
--checksum-fill iptables rules would no longer be needed (but would
otherwise be harmless if they were still there).

(Plot twist: the dhclient code in fix (1) above apparently is on a
Linux-only code path - this is very important later!)

Based on this information (and also due to the opinion that fixing it
by having iptables modify the packet checksum was really the wrong way
to permanently fix things, i.e. an "ugly hack"), the nftables
developers made the decision to not implement an equivalent to
--checksum-fill in nftables. As a result, when I wrote the nftables
firewall backend for libvirt virtual networks earlier this year, it
didn't add in any rule to "fix" broken UDP checksums (since there was
apparently no equivalent in nftables and, after all, that was fixed
somewhere else 14 years ago, right???)

But last week, when Rich Jones was doing routine testing using a Fedora
40 host (the first Fedora release to use the nftables backend of libvirt's
network driver by default) and a FreeBSD guest, for "some strange
reason", the FreeBSD guest was unable to get an IP address from DHCP!!

  https://www.spinics.net/linux/fedora/libvirt-users/msg14356.html

A few quick tests proved that it was the same old "bad checksum"
problem from 2010 come back to haunt us - it wasn't a Linux-only issue
after all.

Phil Sutter and Eric Garver (nftables people) pointed out that, while
nftables doesn't have an action that will *compute* the checksum of a
packet, it *does* have an action that will set the checksum to 0, and
suggested we try adding a "zero the checksum" rule for dhcp response
packets to our nftables ruleset. (Why? Because a checksum value of 0
in a IPv4 UDP packet is defined by RFC768 to mean "no checksum
generated", implying "checksum not needed").  It turns out that this
works - dhclient properly recognizes that a 0 checksum means "don't
bother with the checksum", and accepts the packet as valid.

So to once again fix this timeless bug, this patch adds such a
checksum zeroing rule to the nftables rules setup for each virtual
network.

This has been verified (on a Fedora 40 host) to fix DHCP with FreeBSD
and OpenBSD guests, while not breaking it for Fedora or Windows (10)
guests.

Fixes: b89c4991daa0ee9371f10937fab3b03c5ffdabc6
Reported-by: Rich Jones <rjones@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: Daniel P. Berrangé <berrange@redhat.com>
9 months agopo: Refresh potfile for v10.9.0 v10.9.0-rc1
Jiri Denemark [Fri, 25 Oct 2024 06:30:50 +0000 (08:30 +0200)] 
po: Refresh potfile for v10.9.0

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
9 months agoTranslated using Weblate (Swedish)
Göran Uddeborg [Wed, 23 Oct 2024 19:25:48 +0000 (19:25 +0000)] 
Translated using Weblate (Swedish)

Currently translated at 92.4% (9717 of 10516 strings)

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

Signed-off-by: Göran Uddeborg <goeran@uddeborg.se>
9 months agotests: add capabilities for QEMU 9.1.0 on s390x
Shalini Chellathurai Saroja [Mon, 14 Oct 2024 09:31:59 +0000 (11:31 +0200)] 
tests: add capabilities for QEMU 9.1.0 on s390x

Let us introduce the xml and reply files for QEMU 9.1.0 on s390x.

Signed-off-by: Shalini Chellathurai Saroja <shalini@linux.ibm.com>
Reviewed-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
9 months agonetwork: don't unset the firewalld zone if it's going to be immediately re-set
Laine Stump [Tue, 22 Oct 2024 01:31:37 +0000 (21:31 -0400)] 
network: don't unset the firewalld zone if it's going to be immediately re-set

Any time the firewalld zone for an interface is set, by definition
that removes it from any previous zone that it was in, so there is
really no point in unsetting the zone if it's just going to be
immediately set again.

This is useful because when firewalld reloads its rules, 3 things happen:

1) firewalld flushes *all* firewall rules (including those added by libvirt)

2) firewalld unsets the zones for all interfaces (including those set
   by libvirt)

3) firewalld re-adds its own rules, and sets the zone for all the
   interfaces it manages

4) firewalld sends a dbus message that libvirt is watching for, and
   when libvirt receives that message, it reloads all of the
   libvirt-generated rules, and also re-sets the firewalld zone for
   the bridge interfaces managed by libvirt.

libvirt accomplishes step 4 by a) calling
networkRemoveFirewallRules(), and then b) calling
networkAddFirewallRules(). But (because it is useful in other
contexts) networkRemoveFirewallRules() will attempt to *unset* the
zone for each bridge interface, and when firewalld receives this
request, it sees that the bridge interface *has no zone* (because it
was unset by firewalld in step (2) above), and thus logs an error
message.

There is no way for libvirt to suppress an error message that is
logged by firewalld when a request to firewalld fails. But what
libvirt *can* do is realize that in these cases, the firewalld zone is
about to be set again anyway, and so we don't need to unset the zone.

This patch handles that by adding a bool unsetZone to the arguments of
networkRemoveFirewallRules(); most calls to networkRemoveFirewallRules()
have unsetZone=true, but in two cases where the zone is about to be
reset, networkRemoveFirewallRules() is called with unsetZone=false,
which prevents the call to virFirewallDInterfaceUnsetZone() and thus
avoids the unnecessary (and confusing to users!) error message that
would have been logged by firewalld.

Signed-off-by: Laine Stump <laine@redat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
9 months agonetwork: ignore/don't log errors when unsetting firewalld zone
Laine Stump [Mon, 21 Oct 2024 17:55:16 +0000 (13:55 -0400)] 
network: ignore/don't log errors when unsetting firewalld zone

The most common "error" when trying to unset the firewalld zone of an
interface is for firewalld to tell us that the interface already isn't
in any zone. Since this is what we want, no need to alarm the user by
logging it as an error.

Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
9 months agoNEWS: Report CPU model blockers in domain capabilities
Jiri Denemark [Fri, 18 Oct 2024 15:12:50 +0000 (17:12 +0200)] 
NEWS: Report CPU model blockers in domain capabilities

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
9 months agodomain_capabilities: Report CPU blockers
Jiri Denemark [Fri, 18 Oct 2024 12:40:48 +0000 (14:40 +0200)] 
domain_capabilities: Report CPU blockers

When a CPU model is reported as usable='no' an additional
<blockers model='...'> element is added for that CPU model to show which
features are missing for the CPU model to become usable.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
9 months agodomain_capabilities: Sort CPU models
Jiri Denemark [Fri, 18 Oct 2024 12:17:13 +0000 (14:17 +0200)] 
domain_capabilities: Sort CPU models

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