]> xenbits.xensource.com Git - libvirt.git/log
libvirt.git
4 years agovirsh: add "nodedev-start" command
Jonathon Jongsma [Thu, 9 Jul 2020 21:05:41 +0000 (16:05 -0500)]
virsh: add "nodedev-start" command

This virsh command maps to virNodeDeviceCreate(), which starts a node
device that has been previously defined by virNodeDeviceDefineXML().
This is only supported for mediated devices.

Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
4 years agoapi: add virNodeDeviceCreate()
Jonathon Jongsma [Thu, 18 Jun 2020 15:21:13 +0000 (10:21 -0500)]
api: add virNodeDeviceCreate()

This new API function provides a way to start a persistently-defined
mediate device that was defined by virNodeDeviceDefineXML() (or one that
was defined externally via mdevctl)

Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
4 years agovirsh: add nodedev-undefine command
Jonathon Jongsma [Mon, 13 Jul 2020 21:56:48 +0000 (16:56 -0500)]
virsh: add nodedev-undefine command

Add a virsh command that maps to virNodeDeviceUndefine().

Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
4 years agovirsh: Factor out function to find node device
Jonathon Jongsma [Mon, 17 Aug 2020 21:21:48 +0000 (16:21 -0500)]
virsh: Factor out function to find node device

Several functions accept providing a node device by name or by wwnn,wwpn
pair. Extract the logic to do this into a function that can be used by
both callers.

Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
4 years agoapi: add virNodeDeviceUndefine()
Jonathon Jongsma [Thu, 2 Jul 2020 20:14:30 +0000 (15:14 -0500)]
api: add virNodeDeviceUndefine()

This interface allows you to undefine a persistently defined (but
inactive) mediated devices. It is implemented via 'mdevctl'

Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
4 years agonodedev: refactor tests to support mdev undefine
Jonathon Jongsma [Fri, 13 Nov 2020 16:45:33 +0000 (10:45 -0600)]
nodedev: refactor tests to support mdev undefine

mdevctl 'stop' and 'undefine' commands take the same uuid parameter, so
refactor the test infrastructure to share common implementation for both
of these commands. The 'undefine' command will be introduced in a
following patch.

Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
4 years agovirsh: add nodedev-define command
Jonathon Jongsma [Mon, 13 Jul 2020 21:40:47 +0000 (16:40 -0500)]
virsh: add nodedev-define command

Add a virsh command that maps to virNodeDeviceDefineXML().

Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
4 years agovirsh: Add --inactive, --all to nodedev-list
Jonathon Jongsma [Fri, 10 Jul 2020 19:47:01 +0000 (14:47 -0500)]
virsh: Add --inactive, --all to nodedev-list

Now that we can filter active and inactive node devices in
virConnectListAllNodeDevices(), add these switches to the virsh command.

Eventual output (once everything is hooked up):

    virsh # nodedev-list --cap mdev
    mdev_bd2ea955_3402_4252_8c17_7468083a0f26

    virsh # nodedev-list --inactive --cap mdev
    mdev_07d8b8b0_7e04_4c0f_97ed_9214ce12723c
    mdev_927c040f_ae7d_4a35_966e_286ba6ebbe1c

    virsh # nodedev-list --all --cap mdev
    mdev_07d8b8b0_7e04_4c0f_97ed_9214ce12723c
    mdev_927c040f_ae7d_4a35_966e_286ba6ebbe1c
    mdev_bd2ea955_3402_4252_8c17_7468083a0f26

Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
4 years agoapi: add virNodeDeviceDefineXML()
Jonathon Jongsma [Mon, 11 May 2020 16:40:26 +0000 (11:40 -0500)]
api: add virNodeDeviceDefineXML()

With mediated devices, we can now define persistent node devices that
can be started and stopped. In order to take advantage of this, we need
an API to define new node devices.

Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
4 years agonodedev: add function to generate mdevctl define command
Jonathon Jongsma [Wed, 27 Jan 2021 16:55:07 +0000 (10:55 -0600)]
nodedev: add function to generate mdevctl define command

Abstract out the function used to generate the commandline for 'mdevctl
start' since they take the same arguments. Add tests to ensure that
we're generating the command properly.

Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
4 years agonodedev: Refresh mdev devices when changes are detected
Jonathon Jongsma [Thu, 9 Jul 2020 21:16:57 +0000 (16:16 -0500)]
nodedev: Refresh mdev devices when changes are detected

We need to query mdevctl for changes to device definitions since an
administrator can define new devices by executing mdevctl outside of
libvirt.

In the future, mdevctl may add a way to signal device add/remove via
events, but for now we resort to a bit of a workaround: monitoring the
mdevctl config directory for changes to files. When a change is
detected, we query mdevctl and update our device list. The mdevctl
querying is handled in a throwaway thread, and these threads are
synchronized with a mutex.

Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
4 years agonodedev: handle mdevs that disappear from mdevctl
Jonathon Jongsma [Thu, 9 Jul 2020 21:34:36 +0000 (16:34 -0500)]
nodedev: handle mdevs that disappear from mdevctl

mdevctl does not currently provide any events when the list of defined
devices changes, so we will need to poll mdevctl for the list of defined
devices periodically. When a mediated device no longer exists from one
iteration to the next, we need to treat it as an "undefine" event.

When we get such an event, we remove the device from the list if it's
not active. Otherwise, we simply mark it as non-persistent.

Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
4 years agonodedev: add helper functions to remove node devices
Jonathon Jongsma [Thu, 15 Oct 2020 16:30:35 +0000 (11:30 -0500)]
nodedev: add helper functions to remove node devices

When a mediated device is stopped or undefined by an application outside
of libvirt, we need to remove it from our list of node devices within
libvirt. This patch introduces virNodeDeviceObjListRemoveLocked() and
virNodeDeviceObjListForEachRemove() (which are analogous to other types
of object lists in libvirt) to facilitate that. They will be used in
coming commits.

Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
4 years agonodedev: add mdevctl devices to node device list
Jonathon Jongsma [Tue, 30 Jun 2020 22:02:48 +0000 (17:02 -0500)]
nodedev: add mdevctl devices to node device list

At startup, query devices that are defined by 'mdevctl' and add them to
the node device list.

This adds a complication: we now have two potential sources of
information for a node device:
 - udev for all devices and for activated mediated devices
 - mdevctl for persistent mediated devices

Unfortunately, neither backend returns full information for a mediated
device. For example, if a persistent mediated device in the list (with
information provided from mdevctl) is 'started', that same device will
now be detected by udev. If we simply overwrite the existing device
definition with the new one provided by the udev backend, we will lose
extra information that was provided by mdevctl (e.g. attributes, etc).
To avoid this, make sure to copy the extra information into the new
device definition.

Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
4 years agonodedev: add DEFINED/UNDEFINED lifecycle events
Jonathon Jongsma [Thu, 9 Jul 2020 15:56:51 +0000 (10:56 -0500)]
nodedev: add DEFINED/UNDEFINED lifecycle events

Since a mediated device can be persistently defined by the mdevctl
backend, we need additional lifecycle events beyond CREATED/DELETED to
indicate that e.g. the device has been stopped but the device definition
still exists.

Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
4 years agonodedev: add persistence to virNodeDeviceObj
Jonathon Jongsma [Fri, 15 Jan 2021 22:41:51 +0000 (16:41 -0600)]
nodedev: add persistence to virNodeDeviceObj

Consistent with other objects (e.g. virDomainObj), add a field to
indicate whether the node device is persistent or transient.

Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
4 years agonodedev: add ability to list defined mdevs
Jonathon Jongsma [Fri, 10 Jul 2020 22:12:18 +0000 (17:12 -0500)]
nodedev: add ability to list defined mdevs

This adds an internal API to query for persistent mediated devices
that are defined by mdevctl. Upcoming commits will make use of this
information.

Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
4 years agonodedev: add ability to parse mdevs from mdevctl
Jonathon Jongsma [Fri, 10 Jul 2020 22:12:18 +0000 (17:12 -0500)]
nodedev: add ability to parse mdevs from mdevctl

This function will parse the list of mediated devices that are returned
by mdevctl and convert it into our internal node device representation.

Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
4 years agotests: trivial change to mdevctl test macro
Jonathon Jongsma [Tue, 30 Mar 2021 16:05:59 +0000 (11:05 -0500)]
tests: trivial change to mdevctl test macro

In order to be able to pass a string as user data to the test function,
change the DO_TEST_FULL() macro to expect a pointer and pass it directly
to virTestRun(). Previously we expected the caller to pass a struct
variable and then passed the address of that to virTestRun().

Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
4 years agonodedev: expose internal helper for naming devices
Jonathon Jongsma [Fri, 6 Nov 2020 18:02:50 +0000 (12:02 -0600)]
nodedev: expose internal helper for naming devices

Expose a helper function that can be used by udev and mdevctl to
generate device names for node devices.

Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
4 years agonodedev: fix docs for virConnectListAllNodeDevices()
Jonathon Jongsma [Thu, 18 Feb 2021 22:13:34 +0000 (16:13 -0600)]
nodedev: fix docs for virConnectListAllNodeDevices()

It doesn't make sense to list all of the flag values in the function
documentation. This is unnecessary duplication, we already refer to the
enum type.  Also, remove reference to exclusive groups of flags, since
that does not apply to this API.

Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
4 years agonodedev: Add ability to filter by active state
Jonathon Jongsma [Fri, 10 Jul 2020 18:54:50 +0000 (13:54 -0500)]
nodedev: Add ability to filter by active state

Add two flag values for virConnectListAllNodeDevices() so that we can
list only node devices that are active or inactive.

Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
4 years agonodedev: introduce concept of 'active' node devices
Jonathon Jongsma [Thu, 9 Jul 2020 15:39:34 +0000 (10:39 -0500)]
nodedev: introduce concept of 'active' node devices

we will be able to define mediated devices that can be started or
stopped, so we need to be able to indicate whether the device is active
or not, similar to other resources (storage pools, domains, etc.)

Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
4 years agotests: remove extra trailing semicolon
Jonathon Jongsma [Wed, 1 Jul 2020 16:08:34 +0000 (11:08 -0500)]
tests: remove extra trailing semicolon

The macro should not have a trailing semicolon so that when the macro is
used, the user can add a semicolon themselves.

Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
4 years agonodedev: capture and report stderror from mdevctl
Jonathon Jongsma [Tue, 23 Feb 2021 20:24:14 +0000 (14:24 -0600)]
nodedev: capture and report stderror from mdevctl

When an mdevctl command fails, there is not much information available
to the user about why it failed. This is partly because we were not
making use of the error message that mdevctl itself prints upon failure.

Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
4 years agoqemu: wire up command line support for ACPI index
Daniel P. Berrangé [Tue, 6 Apr 2021 14:01:20 +0000 (15:01 +0100)]
qemu: wire up command line support for ACPI index

This makes it possible to enable stable NIC device names in most modern
Linux distros.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
4 years agoqemu: probe for "acpi-index" property
Daniel P. Berrangé [Tue, 6 Apr 2021 10:41:20 +0000 (11:41 +0100)]
qemu: probe for "acpi-index" property

This property is exposed by QEMU on any PCI device, but we have to pick
some specific device(s) to probe it against. We expect that at least one
of the virtio devices will be present, so probe against them.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
4 years agoqemu: use a switch when building device addresses
Daniel P. Berrangé [Tue, 6 Apr 2021 14:33:45 +0000 (15:33 +0100)]
qemu: use a switch when building device addresses

The compiler can more easily optimize a switch, and more importantly can
also warn when new address types are added which are not handled.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
4 years agoqemu: fix indentation off-by-1
Daniel P. Berrangé [Tue, 6 Apr 2021 14:29:16 +0000 (15:29 +0100)]
qemu: fix indentation off-by-1

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
4 years agoconf: add support for <acpi index='NNN'/> for PCI devices
Daniel P. Berrangé [Tue, 6 Apr 2021 10:07:44 +0000 (11:07 +0100)]
conf: add support for <acpi index='NNN'/> for PCI devices

PCI devices can be associated with a unique integer index that is
exposed via ACPI. In Linux OS with systemd, this value is used for
provide a NIC device naming scheme that is stable across changes
in PCI slot configuration.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
4 years agoconf: add ABI stability check for disk rotation rate
Daniel P. Berrangé [Wed, 7 Apr 2021 12:45:18 +0000 (13:45 +0100)]
conf: add ABI stability check for disk rotation rate

Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
4 years agoNEWS: Mention Xen support for domains with more than 4TB
Jim Fehlig [Mon, 5 Apr 2021 16:28:53 +0000 (10:28 -0600)]
NEWS: Mention Xen support for domains with more than 4TB

Signed-off-by: Jim Fehlig <jfehlig@suse.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
4 years agotests: qemucapabilitiesdata: Update qemu capabilities on x86_64 to 6.0.0-rc2
Peter Krempa [Fri, 5 Mar 2021 15:05:34 +0000 (16:05 +0100)]
tests: qemucapabilitiesdata: Update qemu capabilities on x86_64 to 6.0.0-rc2

'block_passwd' command was removed 'display-reload' command was added
and the 'acpi-index' property for PCI devices was added.

There are no noticable changes for us.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
4 years agotests: add warning that qemucapsprobe prefers native host/guest arch
Daniel P. Berrangé [Tue, 6 Apr 2021 11:00:00 +0000 (12:00 +0100)]
tests: add warning that qemucapsprobe prefers native host/guest arch

Generally we want the QEMU capabilities data in git to report KVM
related features, and thus we strongly prefer that the capabilities are
generated on a native host.

Reviewed-by: Andrea Bolognani <abologna@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
4 years agorun: fix spawning of daemons
Daniel P. Berrangé [Tue, 6 Apr 2021 14:40:53 +0000 (15:40 +0100)]
run: fix spawning of daemons

The "args" array already contains the binary name, so does not need to
be concatenated with "prog".

Reviewed-by: Andrea Bolognani <abologna@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
4 years agoTranslated using Weblate (Korean)
simmon [Wed, 7 Apr 2021 06:02:02 +0000 (08:02 +0200)]
Translated using Weblate (Korean)

Currently translated at 31.7% (3356 of 10581 strings)

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

Co-authored-by: simmon <simmon@nplob.com>
Signed-off-by: simmon <simmon@nplob.com>
4 years agoqemu: command: Handle formatting of '-compat' options
Peter Krempa [Thu, 30 Apr 2020 11:34:28 +0000 (13:34 +0200)]
qemu: command: Handle formatting of '-compat' options

Enable '-compat' if requested in qemu.conf and supported by qemu to
instruct qemu to crash when a deprecated command is used and stop
returning deprecated fields.

This setting is meant for libvirt developers and such.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
4 years agoqemu: Add per-VM control of deprecation behavior
Peter Krempa [Mon, 15 Mar 2021 14:06:29 +0000 (15:06 +0100)]
qemu: Add per-VM control of deprecation behavior

Similar to the qemu.conf knob 'deprecation_behavior' add a per-VM knob
in the QEMU namespace:

  <qemu:deprecation behavior='...'/>

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
4 years agoqemuxml2xmltest: Enable 'qemu-ns' case
Peter Krempa [Mon, 15 Mar 2021 15:35:52 +0000 (16:35 +0100)]
qemuxml2xmltest: Enable 'qemu-ns' case

The XML formatter validation was missing for this code path.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
4 years agoqemu: conf: Add 'deprecation_behavior' setting to qemu.conf
Peter Krempa [Thu, 30 Apr 2020 11:27:58 +0000 (13:27 +0200)]
qemu: conf: Add 'deprecation_behavior' setting to qemu.conf

New QEMU supports a harsh, but hard to ignore way to notify that the
QMP user used a deprecated command. This is useful e.g. for developers
to see that something needs to be fixed.

This patch introduces a qemu.conf option to enable the setting in cases
when qemu supports it so that developers and continiuous integration
efforts are notified about use of deprecated fields before it's too
late.

The option is deliberately stored as string and not validated to prevent
failures when downgrading qemu or libvirt versions. While we don't
support this, the knob isn't meant for public consumption anyways.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
4 years agoqemu: capabilities: Introduce QEMU_CAPS_COMPAT_DEPRECATED
Peter Krempa [Thu, 30 Apr 2020 11:14:32 +0000 (13:14 +0200)]
qemu: capabilities: Introduce QEMU_CAPS_COMPAT_DEPRECATED

The capability is asserted if qemu supports the -compat
deprecated-input= and deprecated-output= settings to control what should
happen if deprecated fields are used in QMP.

This will be used for a developer/tester-oriented setting which will
aid us in catching use of deprecated settings sooner.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
4 years agodocs/drvqemu: Convert to RST
Peter Krempa [Mon, 15 Mar 2021 09:58:10 +0000 (10:58 +0100)]
docs/drvqemu: Convert to RST

There are two links to this document using anchors so they need to be
updated as well.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
4 years agosyntax-check: Remove GFDL format check
Peter Krempa [Wed, 31 Mar 2021 08:37:31 +0000 (10:37 +0200)]
syntax-check: Remove GFDL format check

Our docs don't use the GFDL so checking its format is pointless.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
4 years agosyntax-check: Remove unused header check for 'strings.h'
Peter Krempa [Wed, 31 Mar 2021 08:36:11 +0000 (10:36 +0200)]
syntax-check: Remove unused header check for 'strings.h'

Libvirt doesn't use it and we also require use of wrappers for such
string operations. Remove the pointless check.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
4 years agosyntax-check: Remove check for prohibited 'WITH_MBRTOWC'
Peter Krempa [Wed, 31 Mar 2021 08:31:55 +0000 (10:31 +0200)]
syntax-check: Remove check for prohibited 'WITH_MBRTOWC'

While our code uses mbrtowc, we don't do any detection of it.
Additionally it was recently changed from HAVE_MBRTOWC to WITH_MBRTOWC
so even if it came from an included file it would no longer work.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
4 years agosyntax-check: Remove used header checks for gnulib modules
Peter Krempa [Wed, 31 Mar 2021 08:29:02 +0000 (10:29 +0200)]
syntax-check: Remove used header checks for gnulib modules

We removed gnulib support, so all the checks whether a header is
included only when it's used are pointless now.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
4 years agosyntax-check: Clean up check for g_auto*
Peter Krempa [Wed, 31 Mar 2021 08:18:54 +0000 (10:18 +0200)]
syntax-check: Clean up check for g_auto*

Remove the old libvirt variants that are no longer in use and include
g_autostringlist.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
4 years agosyntax-check: Remove check for proper spelling of 'Red Hat'
Peter Krempa [Wed, 31 Mar 2021 08:14:50 +0000 (10:14 +0200)]
syntax-check: Remove check for proper spelling of 'Red Hat'

Don't single out this one, and also don't waste computational resources
on it.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
4 years agoTranslated using Weblate (Korean)
simmon [Sun, 4 Apr 2021 07:02:01 +0000 (09:02 +0200)]
Translated using Weblate (Korean)

Currently translated at 31.3% (3313 of 10581 strings)

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

Co-authored-by: simmon <simmon@nplob.com>
Signed-off-by: simmon <simmon@nplob.com>
4 years agolibxl: use API 4.13 to support domUs with more than 4TB
Olaf Hering [Thu, 25 Mar 2021 16:26:12 +0000 (17:26 +0100)]
libxl: use API 4.13 to support domUs with more than 4TB

To support domUs with more than 4TB memory it is required to use
LIBXL_API_VERSION >= 0x040800, which uses uint64_t for certained guest
memory related quantities.

Unfortunately this change is not straight forward. While most of the
code in libxl.h handles the various LIBXL_API_VERSION variants
correctly, the check for valid a LIBXL_API_VERSION at the beginning of
the file was broken between Xen 4.7 and 4.13 - it did not cover for
API changes introduced in Xen 4.7 and 4.8. This was fixed with
xen-project/xen@c3999835df, which for libvirt means in practice either
the libxl API from Xen 4.5 or 4.13+ can be used.

This change uses pkgconfig to decide which API can be safely selected.
Xen provides a pkgconfig file since Xen 4.6, which is also the lowest
version expected by libvirt.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Reviewed-by: Jim Fehlig <jfehlig@suse.com>
4 years agolibxl: add API wrapper for libxl_set_memory_target
Olaf Hering [Thu, 25 Mar 2021 16:26:11 +0000 (17:26 +0100)]
libxl: add API wrapper for libxl_set_memory_target

Upcoming changes will use different LIBXL_API_VERSION variants.

Prepare libxl_set_memory_target, which changed the storage size of
parameter "target_memkb" in Xen 4.8.

No functional change intended.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Reviewed-by: Jim Fehlig <jfehlig@suse.com>
4 years agolibxl: add API wrapper for libxl_send_trigger
Olaf Hering [Thu, 25 Mar 2021 16:26:10 +0000 (17:26 +0100)]
libxl: add API wrapper for libxl_send_trigger

Upcoming changes will use different LIBXL_API_VERSION variants.

Prepare libxl_send_trigger, which got a new parameter
"ao_how" in Xen 4.12. libvirt does not use this parameter.

No functional change intended.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Reviewed-by: Jim Fehlig <jfehlig@suse.com>
4 years agolibxl: add API wrapper for libxl_set_vcpuonline
Olaf Hering [Thu, 25 Mar 2021 16:26:09 +0000 (17:26 +0100)]
libxl: add API wrapper for libxl_set_vcpuonline

Upcoming changes will use different LIBXL_API_VERSION variants.

Prepare libxl_set_vcpuonline, which got a new parameter
"ao_how" in Xen 4.12. libvirt does not use this parameter.

No functional change intended.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Reviewed-by: Jim Fehlig <jfehlig@suse.com>
4 years agolibxl: add API wrapper for libxl_get_free_memory
Olaf Hering [Thu, 25 Mar 2021 16:26:08 +0000 (17:26 +0100)]
libxl: add API wrapper for libxl_get_free_memory

Upcoming changes will use different LIBXL_API_VERSION variants.

Prepare libxl_get_free_memory, which changed storage size of parameter
"memkb" in Xen 4.8.

No functional change intended.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Reviewed-by: Jim Fehlig <jfehlig@suse.com>
4 years agolibxl: add API wrapper for libxl_domain_need_memory
Olaf Hering [Thu, 25 Mar 2021 16:26:07 +0000 (17:26 +0100)]
libxl: add API wrapper for libxl_domain_need_memory

Upcoming changes will use different LIBXL_API_VERSION variants.

Prepare libxl_domain_need_memory, which changed the storage size of
"need_memkb" in Xen 4.8. With Xen 4.12 the libxl_domain_config
parameter was changed

No functional change intended.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Reviewed-by: Jim Fehlig <jfehlig@suse.com>
4 years agolibxl: add API wrapper for libxl_domain_unpause
Olaf Hering [Thu, 25 Mar 2021 16:26:06 +0000 (17:26 +0100)]
libxl: add API wrapper for libxl_domain_unpause

Upcoming changes will use different LIBXL_API_VERSION variants.

Prepare libxl_domain_unpause, which got a new parameter
"ao_how" in Xen 4.12. libvirt does not use this parameter.

No functional change intended.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Reviewed-by: Jim Fehlig <jfehlig@suse.com>
4 years agolibxl: add API wrapper for libxl_domain_pause
Olaf Hering [Thu, 25 Mar 2021 16:26:05 +0000 (17:26 +0100)]
libxl: add API wrapper for libxl_domain_pause

Upcoming changes will use different LIBXL_API_VERSION variants.

Prepare libxl_domain_pause, which got a new parameter
"ao_how" in Xen 4.12. libvirt does not use this parameter.

No functional change intended.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Reviewed-by: Jim Fehlig <jfehlig@suse.com>
4 years agolibxl: add API wrapper for libxl_domain_reboot
Olaf Hering [Thu, 25 Mar 2021 16:26:04 +0000 (17:26 +0100)]
libxl: add API wrapper for libxl_domain_reboot

Upcoming changes will use different LIBXL_API_VERSION variants.

Prepare libxl_domain_reboot, which got a new parameter
"ao_how" in Xen 4.12. libvirt does not use this parameter.

No functional change intended.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Reviewed-by: Jim Fehlig <jfehlig@suse.com>
4 years agolibxl: add API wrapper for libxl_domain_shutdown
Olaf Hering [Thu, 25 Mar 2021 16:26:03 +0000 (17:26 +0100)]
libxl: add API wrapper for libxl_domain_shutdown

Upcoming changes will use different LIBXL_API_VERSION variants.

Prepare libxl_domain_shutdown, which got a new parameter
"ao_how" in Xen 4.12. libvirt does not use this parameter.

No functional change intended.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Reviewed-by: Jim Fehlig <jfehlig@suse.com>
4 years agolibxl: add API wrapper for libxl_retrieve_domain_configuration
Olaf Hering [Thu, 25 Mar 2021 16:26:02 +0000 (17:26 +0100)]
libxl: add API wrapper for libxl_retrieve_domain_configuration

Upcoming changes will use different LIBXL_API_VERSION variants.

Prepare libxl_retrieve_domain_configuration, which got a new parameter
"libxl_asyncop_how" in Xen 4.12. libvirt does not use this parameter.

No functional change intended.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Reviewed-by: Jim Fehlig <jfehlig@suse.com>
4 years agolibxl: add API wrapper for libxl_domain_create_restore
Olaf Hering [Thu, 25 Mar 2021 16:26:01 +0000 (17:26 +0100)]
libxl: add API wrapper for libxl_domain_create_restore

Upcoming changes will use different LIBXL_API_VERSION variants.

Prepare libxl_domain_create_restore, which got a new parameter
"send_back_fd" in Xen 4.7. libvirt does not use this parameter.

No functional change intended.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Reviewed-by: Jim Fehlig <jfehlig@suse.com>
4 years agotests: Fix qemuxml2xmltest with audio driver defined in env
Jim Fehlig [Thu, 1 Apr 2021 16:57:36 +0000 (10:57 -0600)]
tests: Fix qemuxml2xmltest with audio driver defined in env

If QEMU_AUDIO_DRV is defined in the build host environment, several tests
in qemuxml2xmltest fail.

$ env | grep -i audio
AUDIODRIVER=pulseaudio
QEMU_AUDIO_DRV=pa
SDL_AUDIODRIVER=pulse

An example test failure with the above environment

907) QEMU XML-2-XML-active video-virtio-gpu-sdl-gl
In 'libvirt/tests/qemuxml2xmloutdata/video-virtio-gpu-sdl-gl.xml':
Offset 1244
Expect [v]
Actual [audio id='1' type='pulseaudio'/>
    <v]

Scrub QEMU_AUDIO_DRV from the environment before executing the tests in
qemuxml2xmltest. SDL_AUDIODRIVER also needs scrubbed since it will be
examined if QEMU_AUDIO_DRV=sdl.

Signed-off-by: Jim Fehlig <jfehlig@suse.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
4 years agoqemu: implement setting of rotation rate for SCSI/IDE disks
Daniel P. Berrangé [Wed, 31 Mar 2021 09:17:07 +0000 (10:17 +0100)]
qemu: implement setting of rotation rate for SCSI/IDE disks

This is available in QEMU with "ide-hd" and "scsi-hd" device
types. It was originally mistakenly added to the "scsi-block"
device type too, but later removed. This doesn't affect libvirt
since we restrict usage to device=disk.

When this property is not set then QEMU's default behaviour
is to not report any rotation rate information, which
causes most guest OS to assume rotational storage.

https://bugzilla.redhat.com/show_bug.cgi?id=1498955

Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
4 years agoconf: add support for disk "rotation_rate" property
Daniel P. Berrangé [Wed, 31 Mar 2021 09:14:12 +0000 (10:14 +0100)]
conf: add support for disk "rotation_rate" property

This lets the app expose the virtual SCSI or IDE disks as solid state
devices by setting a rate of '1', or rotational media by setting a
rate between 1025 and 65534.

https://bugzilla.redhat.com/show_bug.cgi?id=1498955

Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
4 years agorun: fix flake8 violations
Daniel P. Berrangé [Thu, 1 Apr 2021 14:10:33 +0000 (15:10 +0100)]
run: fix flake8 violations

Two blank lines are needed either side of functions.

Comments must have a single space character immediately after
the "#".

The unused exception variable can be removed.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
4 years agomeson: Don't check whether /usr/local/bin/grep is GNU grep
Andrea Bolognani [Thu, 1 Apr 2021 12:11:09 +0000 (14:11 +0200)]
meson: Don't check whether /usr/local/bin/grep is GNU grep

Since /usr/local is where ports live, it's reasonable to assume
that a grep binary found in there will have been installed via
ports and will thus be GNU grep.

Suggested-by: Erik Skultety <eskultet@redhat.com>
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
4 years agomeson: Look for GNU tools on macOS too
Andrea Bolognani [Wed, 24 Mar 2021 10:33:15 +0000 (11:33 +0100)]
meson: Look for GNU tools on macOS too

macOS is similar to FreeBSD in that it ships non-GNU versions
of several utilities that we need in the base system.

macOS actually includes GNU make already, but unfortunately due
to licensing reasons the tool is permanently stuck in 2006, so
even in that case users are better off installing a recent
version from Homebrew along with the dozens of other libvirt
dependencies that already need to be obtained that way.

Note that, unlike FreeBSD ports, Homebrew is fully consistent
in adding the 'g' prefix to the name of the GNU tools, so we
can detect GNU grep without additional hacks.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
4 years agomeson: Check GNU sed's availability
Andrea Bolognani [Wed, 24 Mar 2021 09:10:20 +0000 (10:10 +0100)]
meson: Check GNU sed's availability

As explained in the comment in build-aux/Makefile.in, the
version of sed included in the FreeBSD base system is not GNU
sed, which our syntax-check rules expect; as a result, many
checks will fail with

  gmake: gsed: No such file or directory
  /bin/sh: gsed: not found

Similarly to what we're already doing with GNU make and GNU
grep, look for GNU sed during the configuration step and fail
early if it's not available.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
4 years agomeson: Reorganize looking for programs
Andrea Bolognani [Wed, 24 Mar 2021 08:36:19 +0000 (09:36 +0100)]
meson: Reorganize looking for programs

While this change doesn't look like it would improve things and
actually introduces a tiny bit of duplication, it's necessary in
order to prepares the stage for further changes.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
4 years agomeson: Print custom message when GNU grep is not installed
Andrea Bolognani [Wed, 24 Mar 2021 08:45:29 +0000 (09:45 +0100)]
meson: Print custom message when GNU grep is not installed

Currently, if GNU grep is not installed on a FreeBSD system the
configuration step will fail with

  Program grep found: YES (/usr/bin/grep)
  Program /usr/local/bin/grep found: NO

  ERROR: Program '/usr/local/bin/grep' not found

which is confusing and not very useful; after this change, the
message will be

  Program grep found: YES (/usr/bin/grep)
  Program /usr/local/bin/grep found: NO

  ERROR: Problem encountered: GNU grep not found

instead, which should do a better job helping the user figure
out that they need to install GNU grep from ports to proceed.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
4 years agoci: Call meson consistently
Andrea Bolognani [Wed, 24 Mar 2021 13:35:58 +0000 (14:35 +0100)]
ci: Call meson consistently

We should always pass --werror and display the contents of the
log file in case of failure.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
4 years agoci: Don't use --prefix with meson for Cirrus CI builds
Andrea Bolognani [Fri, 26 Mar 2021 09:44:39 +0000 (10:44 +0100)]
ci: Don't use --prefix with meson for Cirrus CI builds

It's no longer used.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
4 years agoTranslated using Weblate (Korean)
simmon [Tue, 30 Mar 2021 07:01:58 +0000 (09:01 +0200)]
Translated using Weblate (Korean)

Currently translated at 30.5% (3236 of 10581 strings)

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

Co-authored-by: simmon <simmon@nplob.com>
Signed-off-by: simmon <simmon@nplob.com>
4 years agoXML <source bridge='VMnet0'/> update in <interface type='bridge'/>
Kristina Hanicova [Wed, 24 Mar 2021 16:47:44 +0000 (17:47 +0100)]
XML <source bridge='VMnet0'/> update in <interface type='bridge'/>

Previously, we accepted empty bridge name, because some old versions of
VMWare Workstation did not put it into the config. But this doesn't make
much sense - to have an interface type bridge with no name. We
circumvented this problem by generating an empty name but that is
equally wrong.

Therefore, fill in missing bridge names (according to the documentation
[1] the default bridge name is VMnet0) and error out if bridge name is
missing.

This partially reverts f246cdb5aca13ac9409b2ad43087e3078615ffcb

1: https://docs.vmware.com/en/VMware-Workstation-Player-for-Linux/16.0/com.vmware.player.linux.using.doc/GUID-BAFA66C3-81F0-4FCA-84C4-D9F7D258A60A.html

Signed-off-by: Kristina Hanicova <khanicov@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Ján Tomko <jtomko@redhat.com>
4 years agodocs: formatnetworkport: Fix typos
Han Han [Thu, 1 Apr 2021 03:55:42 +0000 (11:55 +0800)]
docs: formatnetworkport: Fix typos

Signed-off-by: Han Han <hhan@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
4 years agobuild: teach run script how to temporarily stop systemd units
Daniel P. Berrangé [Thu, 18 Mar 2021 18:22:32 +0000 (18:22 +0000)]
build: teach run script how to temporarily stop systemd units

When testing locally built daemons on a systemd host there can be quite
a few systemd units that need temporarily stopping, and ideally
restarting after the test is complete. This becomes a massive burden
when modular daemons are running and you want to test libvirtd, as a
huge number of units need stopping.

The run script can facilitate this usage by looking at what units are
running and automatically stopping any that are known to conflict with
the daemon that is about to be run. This is only done when running as
root, since non-root libvirtd does not (currently) use systemd.

Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
4 years agobuild: convert the run script to use Python
Daniel P. Berrangé [Thu, 18 Mar 2021 17:51:49 +0000 (17:51 +0000)]
build: convert the run script to use Python

This fits with the goal of eliminating non-Python scripting languages,
and makes forthcoming changes far easier.

Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
4 years agoPost-release version bump to 7.3.0
Jiri Denemark [Thu, 1 Apr 2021 10:21:23 +0000 (12:21 +0200)]
Post-release version bump to 7.3.0

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
4 years agoRelease of libvirt-7.2.0
Jiri Denemark [Thu, 1 Apr 2021 10:17:47 +0000 (12:17 +0200)]
Release of libvirt-7.2.0

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
4 years agodocs: Fix broken link in migrationinternals
Han Han [Thu, 25 Mar 2021 08:57:27 +0000 (16:57 +0800)]
docs: Fix broken link in migrationinternals

Signed-off-by: Han Han <hhan@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Ján Tomko <jtomko@redhat.com>
4 years agoNEWS: Fix typo swtmp -> swtpm
Andrea Bolognani [Wed, 31 Mar 2021 17:13:57 +0000 (19:13 +0200)]
NEWS: Fix typo swtmp -> swtpm

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
4 years agonews: Update for upcoming release
Michal Privoznik [Wed, 31 Mar 2021 14:08:47 +0000 (16:08 +0200)]
news: Update for upcoming release

Mention some of the stuff we dealt with in this release.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
4 years agoNEWS: Mention fix for exec-restart of virtlo(g|ck)d and 'object_add' improvements
Peter Krempa [Tue, 30 Mar 2021 08:28:35 +0000 (10:28 +0200)]
NEWS: Mention fix for exec-restart of virtlo(g|ck)d and 'object_add' improvements

Mention that libvirt-7.2 will be needed to do stuff that executes
'object-add'/'object-del' QMP commands with the upcoming qemu-6.0 and
that exec-restart of virtlockd and virtlogd was fixed.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
4 years agoconf: remove duplicated firmware type attribute
Daniel P. Berrangé [Mon, 29 Mar 2021 18:00:05 +0000 (19:00 +0100)]
conf: remove duplicated firmware type attribute

The

  <os firmware='efi'>
    <firmware type='efi'>
      <feature enabled='no' name='enrolled-keys'/>
    </firmware>
  </os>

repeats the firmware attribute twice. This has no functional benefit, as
evidenced by fact that we use a single struct field to store both
attributes, while needlessly introducing an error scenario. The XML can
just be simplified to:

  <os firmware='efi'>
    <firmware>
      <feature enabled='no' name='enrolled-keys'/>
    </firmware>
  </os>

which also means that we don't need to emit the empty element
<firmware type='efi'/> for all existing configs too.

Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
4 years agoqemu_driver: Acquire MODIFY job in qemuDomainStartDirtyRateCalc()
Michal Privoznik [Mon, 29 Mar 2021 11:53:50 +0000 (13:53 +0200)]
qemu_driver: Acquire MODIFY job in qemuDomainStartDirtyRateCalc()

This API talks to QEMU and changes its internal state. Therefore,
it should acquire QEMU_JOB_MODIFY instead of QEMU_JOB_QUERY.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
4 years agoremote: don't allow dirty rate API with read permission
Daniel P. Berrangé [Mon, 29 Mar 2021 10:27:42 +0000 (11:27 +0100)]
remote: don't allow dirty rate API with read permission

This API interacts with the hypervisor and makes changes to its
behaviour, so must be protected by the write permission.

Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
4 years agoTranslated using Weblate (Ukrainian)
Yuri Chornoivan [Sat, 27 Mar 2021 14:02:05 +0000 (15:02 +0100)]
Translated using Weblate (Ukrainian)

Currently translated at 100.0% (10581 of 10581 strings)

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

Co-authored-by: Yuri Chornoivan <yurchor@ukr.net>
Signed-off-by: Yuri Chornoivan <yurchor@ukr.net>
4 years agoUpdate translation files
Weblate [Sat, 27 Mar 2021 14:02:03 +0000 (15:02 +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>
4 years agoTranslated using Weblate (Finnish)
Ricky Tigg [Sat, 27 Mar 2021 14:01:59 +0000 (15:01 +0100)]
Translated using Weblate (Finnish)

Currently translated at 20.4% (2161 of 10545 strings)

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

Translated using Weblate (Finnish)

Currently translated at 20.2% (2140 of 10545 strings)

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

Translated using Weblate (Finnish)

Currently translated at 19.9% (2100 of 10545 strings)

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

Translated using Weblate (Finnish)

Currently translated at 19.1% (2020 of 10545 strings)

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

Translated using Weblate (Finnish)

Currently translated at 19.0% (2011 of 10545 strings)

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

Translated using Weblate (Finnish)

Currently translated at 19.0% (2011 of 10545 strings)

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

Co-authored-by: Ricky Tigg <ricky.tigg@gmail.com>
Signed-off-by: Ricky Tigg <ricky.tigg@gmail.com>
4 years agoTranslated using Weblate (Korean)
simmon [Sat, 27 Mar 2021 14:01:58 +0000 (15:01 +0100)]
Translated using Weblate (Korean)

Currently translated at 30.7% (3238 of 10545 strings)

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

Translated using Weblate (Korean)

Currently translated at 30.7% (3238 of 10545 strings)

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

Translated using Weblate (Korean)

Currently translated at 30.6% (3229 of 10545 strings)

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

Co-authored-by: simmon <simmon@nplob.com>
Signed-off-by: simmon <simmon@nplob.com>
4 years agopo: Refresh potfile for v7.2.0
Jiri Denemark [Fri, 26 Mar 2021 11:59:30 +0000 (12:59 +0100)]
po: Refresh potfile for v7.2.0

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
4 years agoqemuProcessUpdateGuestCPU: Check host cpu for forbidden features
Tim Wiederhake [Tue, 23 Mar 2021 10:01:55 +0000 (11:01 +0100)]
qemuProcessUpdateGuestCPU: Check host cpu for forbidden features

See https://bugzilla.redhat.com/show_bug.cgi?id=1840770

Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com
4 years agocpu: Introduce virCPUCheckForbiddenFeatures
Tim Wiederhake [Tue, 23 Mar 2021 10:01:54 +0000 (11:01 +0100)]
cpu: Introduce virCPUCheckForbiddenFeatures

Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com
4 years agovirCPUDefFindFeature: Make first argument const ptr
Tim Wiederhake [Tue, 23 Mar 2021 10:01:53 +0000 (11:01 +0100)]
virCPUDefFindFeature: Make first argument const ptr

Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com
4 years agonode_device_udev: Serialize access to pci_get_strings)_
wangjian [Fri, 26 Mar 2021 03:21:16 +0000 (11:21 +0800)]
node_device_udev: Serialize access to pci_get_strings)_

Since the functions provided by libpciaccess are not thread-safe,
when the udev-event and nodedev-init threads of libvirt call the
pci_get_strings function provided by libpaciaccess at the same
time the following can happen:

nodedev-init thread:
nodeStateInitializeEnumerate ->
  udevEnumerateDevices->
    udevProcessDeviceListEntry ->
      udevAddOneDevice ->
        udevGetDeviceDetails->
          udevProcessPCI ->
            udevTranslatePCIIds ->
              pci_get_strings -> (libpciaccess)
                find_device_name ->
                  populate_vendor ->
                    d = realloc( vend->devices, (vend->num_devices + 1), * sizeof( struct pci_device_leaf ) );
                    vend->num_devices++;

udev-event thread:
udevEventHandleThread ->
  udevHandleOneDevice ->
    udevAddOneDevice->
      udevGetDeviceDetails->
        udevProcessPCI ->
          udevTranslatePCIIds ->
            pci_get_strings -> (libpciaccess)
              find_device_name ->
                populate_vendor ->
                  d = realloc( vend->devices, (vend->num_devices + 1), * sizeof( struct pci_device_leaf ) );
                  vend->num_devices++;

Signed-off-by: WangJian <wangjian161@huawei.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
4 years agolib: Undo some g_steal_pointer() changes
Michal Privoznik [Wed, 24 Mar 2021 16:33:14 +0000 (17:33 +0100)]
lib: Undo some g_steal_pointer() changes

Recently, a few commits back I've switched bunch of code to
g_steal_pointer() using coccinelle. Problem was that the semantic
patch used was slightly off:

  @@
  expression a, b;
  @@

  + b = g_steal_pointer(&a);
  - b = a;
    ... when != a
  - a = NULL;

Problem is that, "... when != a" is supposed to jump over those
lines, which don't contain expression a. My idea was to replace
the following pattern too:

  ptrX = ptrY;
  if (something(ptrZ) < 0) goto error;
  ptrY = NULL;

But what I missed is that the following pattern is also matched
and replaced:

  ptrX = ptrY;
  if (something(ptrX) < 0) goto error;
  ptrY = NULL;

This is not necessarily correct - as demonstrated by our hotplug
code. The real problem is ambiguous memory ownership transfer
(functions which add device to domain def take ownership only on
success), but to not tackle the real issue let's revert those
parts.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
4 years agovirnetsocket: Revert part of g_steal_pointer() rewrite
Michal Privoznik [Wed, 24 Mar 2021 15:49:39 +0000 (16:49 +0100)]
virnetsocket: Revert part of g_steal_pointer() rewrite

Turns out, the way that glib implements g_steal_pointer() is not
compatible with function callbacks. And that's what my recent
patch did in virNetSocketEventFree(). Revert that part.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
4 years agoci: Refresh information
Andrea Bolognani [Tue, 23 Mar 2021 14:33:33 +0000 (15:33 +0100)]
ci: Refresh information

Notable changes:

  * HAL is no longer installed on FreeBSD;

  * the native version of libwsman is no longer installed in
    containers intended for cross-compilation;

  * Meson 0.55 rather than 0.54 is requested when installing
    it from PyPI;

  * GNU sed and GNU grep are installed explicitly everywhere.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
4 years agovz: Add case for VIR_DRV_FEATURE_NETWORK_UPDATE_HAS_CORRECT_ORDER
Michal Privoznik [Thu, 25 Mar 2021 11:12:13 +0000 (12:12 +0100)]
vz: Add case for VIR_DRV_FEATURE_NETWORK_UPDATE_HAS_CORRECT_ORDER

In one of my recent patches I've introduced new connection
feature VIR_DRV_FEATURE_NETWORK_UPDATE_HAS_CORRECT_ORDER.
However, I forgot to add corresponding case into a switch in
vzConnectSupportsFeature().

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
4 years agolib: Fix calling of virNetworkUpdate() driver callback
Michal Privoznik [Tue, 16 Mar 2021 09:33:26 +0000 (10:33 +0100)]
lib: Fix calling of virNetworkUpdate() driver callback

The order in which virNetworkUpdate() accepts @section and
@command arguments is not the same as in which it passes them
onto networkUpdate() callback. Until recently, it did not really
matter, because calling the API on client side meant arguments
were encoded in reversed order (compared to the public API), but
then on the server it was fixed again - because the server
decoded RPC (still swapped), called public API (still swapped)
and in turn called the network driver callback (with reversing
the order - so magically fixing the order).

Long story short, if the public API is called even number of
times those swaps cancel each other out. The problem is when the
API is called an odd numbed of times - which happens with split
daemons and the right URI. There's one call in the client (e.g.
virsh net-update), the other in a hypervisor daemon (say
virtqemud) which ends up calling the API in the virnetworkd.

The fix is obvious - fix the order in which arguments are passed
to the callback.

But, to maintain compatibility with older, yet unfixed, daemons
new connection feature is introduced. The feature is detected
just before calling the callback and allows client to pass
arguments in correct order (talking to fixed daemon) or in
reversed order (talking to older daemon).

Unfortunately, older client talking to newer daemon can't be
fixed. Let's hope that it's less frequent scenario.

Fixes: 574b9bc66b6b10cc4cf50f299c3f0ff55f2cbefb
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1870552
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>