]> git.ipfire.org Git - thirdparty/libvirt.git/log
thirdparty/libvirt.git
3 years agoTranslated using Weblate (Finnish)
Jan Kuparinen [Fri, 1 Oct 2021 15:05:10 +0000 (17:05 +0200)] 
Translated using Weblate (Finnish)

Currently translated at 23.0% (2387 of 10374 strings)

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

Co-authored-by: Jan Kuparinen <copper_fin@hotmail.com>
Signed-off-by: Jan Kuparinen <copper_fin@hotmail.com>
3 years agoNEWS: document new hotplug enable/disable option on pci-root controller
Ani Sinha [Fri, 1 Oct 2021 09:29:48 +0000 (14:59 +0530)] 
NEWS: document new hotplug enable/disable option on pci-root controller

A new 'target' subelement of the pci-root controller has been
introduced having a 'hotplug' property. This property can be used to
turn off or turn on the ability to hotplug/unplug devices to the slots
of the pci-root.

The new element can be used like this:

<controller type='pci' model='pci-root'>
   <target hotplug='off'/>
</controller>

This will turn off hotplug capability on the pci-root ports. To turn
the capability on, we set hotplug='on' above (which is also the
default).

Signed-off-by: Ani Sinha <ani@anisinha.ca>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Laine Stump <laine@redhat.com>
3 years agoqemu: command: add support to enable/disable hotplug on pci-root controller
Ani Sinha [Fri, 1 Oct 2021 09:29:47 +0000 (14:59 +0530)] 
qemu: command: add support to enable/disable hotplug on pci-root controller

This change adds qemu backend command line support for enabling or disabling
hotplug on the pci-root controller using the 'target' sub-element of the
pci-root controller as shown below:

<controller type='pci' model='pci-root'>
  <target hotplug='off'/>
</controller>

'<target hotplug='off/on'/>' is only valid for pc (i440fx-based x86)
machinetypes and turns on the following command line option that is passed
to qemu for x86 guests:

-global PIIX4_PM.acpi-root-pci-hotplug=<off/on>

Before introduction of this attribute, hotplug was always enabled for
pci-root of an i440fx-based machinetype, and since its introduction
the default setting has always been "on" for those machinetypes.

This change also adds the required qemuxml2argv unit tests in order to test
correct qemu arguments. Unit tests have also been added to test qemu capability
validation checks.

Signed-off-by: Ani Sinha <ani@anisinha.ca>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Laine Stump <laine@redhat.com>
3 years agoconf: introduce option to enable/disable pci hotplug on pci-root controller
Ani Sinha [Fri, 1 Oct 2021 09:29:46 +0000 (14:59 +0530)] 
conf: introduce option to enable/disable pci hotplug on pci-root controller

This change introduces libvirt xml support to enable/disable hotplug on the
pci-root controller. It adds a 'target' subelement for the pci-root controller
with a 'hotplug' property. This property can be used to enable or disable
hotplug for the pci-root controller. For example, in order to disable hotplug
on the pci-root controller, one has to use set '<target hotplug='off'>' as
shown below:

<controller type='pci' model='pci-root'>
  <target hotplug='off'/>
</controller>

'<target hotplug='on'>' option would enable hotplug for pci-root controller.
This is also the default value. This option is only available for pc machine
types and is applicable for qemu/kvm accelerator only.This feature was
introduced from qemu version 5.2 with the following change in qemu repository:

3d7e78aa7777f ("Introduce a new flag for i440fx to disable PCI hotplug on the root bus")

The above qemu commit describes some reasons why users might to disable hotplug
on PCI root buses.

Related unit tests to exercise the new conf option has also been added.

Signed-off-by: Ani Sinha <ani@anisinha.ca>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Laine Stump <laine@redhat.com>
3 years agoqemu: capablities: detect presence of acpi-root-pci-hotplug for i440fx machines
Ani Sinha [Fri, 1 Oct 2021 09:29:45 +0000 (14:59 +0530)] 
qemu: capablities: detect presence of acpi-root-pci-hotplug for i440fx machines

The following change in qemu added support for a global boolean flag specific
to i440fx machines that would turn off or on acpi based hotplug for pci root
bus:

3d7e78aa7777f ("Introduce a new flag for i440fx to disable PCI hotplug on the root bus")

The option is passed as "-global PIIX4_PM.acpi-root-pci-hotplug=on" etc in qemu
commandline. It is enabled by default. This patch adds the corresponding qemu
capabilities in libvirt as QEMU_CAPS_PIIX_ACPI_ROOT_PCI_HOTPLUG.

Please note that the test specific qemu capabilities .replies files has already
been updated as a part of regular refreshing them when a new qemu version is
released. Hence, no updates to those files are required.

Signed-off-by: Ani Sinha <ani@anisinha.ca>
Reviewed-by: Laine Stump <laine@redhat.com>
3 years agovshCmddefCheckInternals: Fix typo
Tim Wiederhake [Wed, 22 Sep 2021 12:37:49 +0000 (14:37 +0200)] 
vshCmddefCheckInternals: Fix typo

Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agokbase: Document virtio-mem
Michal Privoznik [Sun, 7 Feb 2021 19:52:08 +0000 (20:52 +0100)] 
kbase: Document virtio-mem

This commit adds new memorydevices.rst page which should serve
all models of memory devices. Yet, I'm documenting virtio-mem
quirks only.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agonews: document recent virtio memory addition
Michal Privoznik [Thu, 3 Dec 2020 08:55:35 +0000 (09:55 +0100)] 
news: document recent virtio memory addition

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agovirsh: Introduce update-memory-device command
Michal Privoznik [Thu, 21 Jan 2021 16:51:31 +0000 (17:51 +0100)] 
virsh: Introduce update-memory-device command

New 'update-memory-device' command is introduced which aims on
making it user friendly to change <memory/> device. So far I just
need to change <requested/> so I'm introducing --requested-size
only; but the idea is that this is extensible for other cases
too. For instance, want to change <myElement/>? A new
--my-element argument can be easily introduced.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoqemuDomainSetMemoryFlags: Take virtio-mem into consideration
Michal Privoznik [Tue, 16 Mar 2021 18:09:27 +0000 (19:09 +0100)] 
qemuDomainSetMemoryFlags: Take virtio-mem into consideration

The qemuDomainSetMemoryFlags() allows for memballoon
(<currentMemory/>) changes for both active and inactive guests.
And just before doing any change, we have to make sure that the
new size is not greater than the total memory (<memory/>).

However, the total memory includes not only the regular guest
memory, but also sum of maximum sizes of all virtio-mems (in fact
all memory devices for that matter). But virtio-mem devices are
modified differently (via virDomainUpdateDevice()) and thus the
upper limit for new balloon size has to be lowered.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoqemu: Account for both memballoon and virtio-mem
Michal Privoznik [Mon, 15 Mar 2021 16:18:56 +0000 (17:18 +0100)] 
qemu: Account for both memballoon and virtio-mem

Reporting how much memory is exposed to the guest happens under
<currentMemory/> which is taken from def->mem.cur_balloon. The
reported amount should account for both balloon size and the sum
of @currentsize of all virtio-mems. For instance, if domain has
4GiB via balloon and additional 2GiB via virtio-mem, then the
domain XML should report 6GiB. The same applies for domain
statistics.

The way to achieve this is to account for either balloon or
virtio-mem when the size of the other is changed, e.g. on balloon
change we have to add all @currentsize (for non virtio-mem these
will be zero, so the check for memory model is needless, but
makes it more obvious what's happening), and vice versa.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoqemu: Refresh the current size of virtio-mem on monitor reconnect
Michal Privoznik [Wed, 25 Nov 2020 10:35:00 +0000 (11:35 +0100)] 
qemu: Refresh the current size of virtio-mem on monitor reconnect

If the QEMU driver restarts it loses the track of the current size
of virtio-mem (because it's runtime type of information and thus
not stored in XML) and therefore, we have to refresh it when
reconnecting to the domain monitor.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoqemu: Wire up MEMORY_DEVICE_SIZE_CHANGE event
Michal Privoznik [Thu, 21 Jan 2021 13:16:44 +0000 (14:16 +0100)] 
qemu: Wire up MEMORY_DEVICE_SIZE_CHANGE event

As advertised in previous commit, this event is delivered to us
when virtio-mem module changes the allocation inside the guest.
It comes with one attribute - size - which holds the new size of
the virtio-mem (well, allocated size), in bytes.
Mind you, this is not necessarily the same number as 'requested
size'. It almost certainly will be when sizing the memory up, but
it might not be when sizing the memory down - the guest kernel
might be unable to free some blocks.

This current size is reported in the domain XML as an output
element only.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoconf: Introduce virDomainMemoryFindByDeviceAlias()
Michal Privoznik [Mon, 21 Jun 2021 09:58:37 +0000 (11:58 +0200)] 
conf: Introduce virDomainMemoryFindByDeviceAlias()

This function will be needed in the next commit where we will
want to find virtio-mem given its alias by QEMU on the monitor.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoIntroduce <current/> property to virtio-mem
Michal Privoznik [Mon, 21 Jun 2021 09:56:07 +0000 (11:56 +0200)] 
Introduce <current/> property to virtio-mem

The virtio-mem has another property that isn't exposed yet:
current size exposed to the guest. Please note, that this is
different to <requested/> because esp. on sizing the memory
down guest may refuse to release some blocks. Therefore, let's
have another size to report in the XML. But because of its
nature, the <current/> won't be parsed and is report only (for
live XMLs).

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoqemu: Wire up <memory/> offline update
Michal Privoznik [Fri, 10 Sep 2021 14:41:43 +0000 (16:41 +0200)] 
qemu: Wire up <memory/> offline update

Updating offline XML of <memory/> devices might come handy when
dealing with virtio-mem devices. But it's implemented to just
replace one virDomainMemoryDef with another so it can be used to
change almost anything.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoqemu: Wire up <memory/> live update
Michal Privoznik [Mon, 23 Nov 2020 16:29:00 +0000 (17:29 +0100)] 
qemu: Wire up <memory/> live update

As advertised in one of previous commits, we want to be able to
change 'requested-size' attribute of virtio-mem on the fly. This
commit does exactly that. Changing anything else is checked for
and forbidden.

Once guest has changed the allocation, QEMU emits an event which
we will use to track the allocation. In the next commit.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoqemu: Build command line for virtio-mem
Michal Privoznik [Tue, 19 Jan 2021 09:16:55 +0000 (10:16 +0100)] 
qemu: Build command line for virtio-mem

Nothing special is happening here. All important changes were
done when for 'virtio-pmem' (adjusting the code to put virtio
memory on PCI bus, generating alias using
qemuDomainDeviceAliasIndex(). The only bit that might look
suspicious is no prealloc for virtio-mem. But if you think about
it, the whole purpose of this device is to change amount of
memory exposed to guest on the fly. There is no point in locking
the whole backend in memory.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoconf: Introduce virtio-mem <memory/> model
Michal Privoznik [Mon, 18 Jan 2021 15:13:12 +0000 (16:13 +0100)] 
conf: Introduce virtio-mem <memory/> model

The virtio-mem is paravirtualized mechanism of adding/removing
memory to/from a VM. A virtio-mem-pci device is split into blocks
of equal size which are then exposed (all or only a requested
portion of them) to the guest kernel to use as regular memory.
Therefore, the device has two important attributes:

  1) block-size, which defines the size of a block
  2) requested-size, which defines how much memory (in bytes)
     is the device requested to expose to the guest.

The 'block-size' is configured on command line and immutable
throughout device's lifetime. The 'requested-size' can be set on
the command line too, but also is adjustable via monitor. In
fact, that is how management software places its requests to
change the memory allocation. If it wants to give more memory to
the guest it changes 'requested-size' to a bigger value, and if it
wants to shrink guest memory it changes the 'requested-size' to a
smaller value. Note, value of zero means that guest should
release all memory offered by the device. Of course, guest has to
cooperate. Therefore, there is a third attribute 'size' which is
read only and reflects how much memory the guest still has. This
can be different to 'requested-size', obviously. Because of name
clash, I've named it 'current' and it is dealt with in future
commits (it is a runtime information anyway).

In the backend, memory for virtio-mem is backed by usual objects:
memory-backend-{ram,file,memfd} and their size puts the cap on
the amount of memory that a virtio-mem device can offer to a
guest. But we are already able to express this info using <size/>
under <target/>.

Therefore, we need only two more elements to cover 'block-size'
and 'requested-size' attributes. This is the XML I've came up
with:

  <memory model='virtio-mem'>
    <source>
      <nodemask>1-3</nodemask>
      <pagesize unit='KiB'>2048</pagesize>
    </source>
    <target>
      <size unit='KiB'>2097152</size>
      <node>0</node>
      <block unit='KiB'>2048</block>
      <requested unit='KiB'>1048576</requested>
    </target>
    <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
  </memory>

I hope by now it is obvious that:

  1) 'requested-size' must be an integer multiple of
     'block-size', and
  2) virtio-mem-pci device goes onto PCI bus and thus needs PCI
     address.

Then there is a limitation that the minimal 'block-size' is
transparent huge page size (I'll leave this without explanation).

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoqemu_capabilities: Introduce QEMU_CAPS_MEMORY_BACKEND_RESERVE
Michal Privoznik [Mon, 13 Sep 2021 07:44:42 +0000 (09:44 +0200)] 
qemu_capabilities: Introduce QEMU_CAPS_MEMORY_BACKEND_RESERVE

This capability tracks whether memory-backend-* supports .reserve
attribute which is going to be important for backends associated
with virtio-mem devices.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoqemu_capabilities: Introduce QEMU_CAPS_DEVICE_VIRTIO_MEM_PCI
Michal Privoznik [Mon, 2 Nov 2020 11:43:39 +0000 (12:43 +0100)] 
qemu_capabilities: Introduce QEMU_CAPS_DEVICE_VIRTIO_MEM_PCI

This commit introduces a new capability that reflects virtio-mem-pci
device support in QEMU:

  QEMU_CAPS_DEVICE_VIRTIO_MEM_PCI, /* -device virtio-mem-pci */

The virtio-mem-pci device was introduced in QEMU 5.1.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agovirhostmem: Introduce virHostMemGetTHPSize()
Michal Privoznik [Wed, 20 Jan 2021 10:30:34 +0000 (11:30 +0100)] 
virhostmem: Introduce virHostMemGetTHPSize()

New virHostMemGetTHPSize() is introduced which allows caller to
obtain THP PMD (Page Middle Directory) size, which is equal to
the minimal size that THP can use, taken from kernel doc
(Documentation/admin-guide/mm/transhuge.rst):

  Some userspace (such as a test program, or an optimized memory allocation
  library) may want to know the size (in bytes) of a transparent hugepage::

    cat /sys/kernel/mm/transparent_hugepage/hpage_pmd_size

Since this size depends on the host architecture and the kernel
it won't change whilst libvirtd is running. Therefore, we can use
virOnce() and cache the value. Of course, we can be running under
kernel that has THP disabled or has no notion of THP at all. In
that case a negative value is returned to signal error.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoqemuBuildNumaCommandLine: Separate out building of CPU list
Michal Privoznik [Wed, 20 May 2020 10:00:23 +0000 (12:00 +0200)] 
qemuBuildNumaCommandLine: Separate out building of CPU list

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
3 years agoqemuBuildNumaCommandLine: Move vars into loops
Michal Privoznik [Wed, 20 May 2020 09:32:14 +0000 (11:32 +0200)] 
qemuBuildNumaCommandLine: Move vars into loops

There are two variables that are used only in a single
loop. Move their definitions into their respective blocks.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
3 years agovirCPUDefParseXML: Prefer virXMLPropUInt over virXPathUInt
Michal Privoznik [Tue, 21 Sep 2021 14:26:48 +0000 (16:26 +0200)] 
virCPUDefParseXML: Prefer virXMLPropUInt over virXPathUInt

When parsing CPU topology, which is described in <topology/>
attributes we can use virXMLPropUInt() instead of virXPathUInt()
as the former results in shorter code.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
3 years agovirCPUDefParseXML: Parse uint using virXPathUInt()
Michal Privoznik [Wed, 20 May 2020 13:36:17 +0000 (15:36 +0200)] 
virCPUDefParseXML: Parse uint using virXPathUInt()

There is no need to use virXPathULong() and a temporary UL
variable if we can use virXPathUInt() directly.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
3 years agoPost-release version bump to 7.9.0
Jiri Denemark [Fri, 1 Oct 2021 08:38:45 +0000 (10:38 +0200)] 
Post-release version bump to 7.9.0

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
3 years agoRelease of libvirt-7.8.0 v7.8.0
Jiri Denemark [Fri, 1 Oct 2021 08:34:54 +0000 (10:34 +0200)] 
Release of libvirt-7.8.0

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
3 years agoTranslated using Weblate (Ukrainian) v7.8.0-rc2
Yuri Chornoivan [Wed, 29 Sep 2021 08:05:11 +0000 (10:05 +0200)] 
Translated using Weblate (Ukrainian)

Currently translated at 100.0% (10374 of 10374 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>
3 years agoTranslated using Weblate (Polish)
Piotr Drąg [Wed, 29 Sep 2021 08:05:10 +0000 (10:05 +0200)] 
Translated using Weblate (Polish)

Currently translated at 22.6% (2345 of 10374 strings)

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

Co-authored-by: Piotr Drąg <piotrdrag@gmail.com>
Signed-off-by: Piotr Drąg <piotrdrag@gmail.com>
3 years agoTranslated using Weblate (Korean)
simmon [Wed, 29 Sep 2021 08:05:10 +0000 (10:05 +0200)] 
Translated using Weblate (Korean)

Currently translated at 99.7% (10345 of 10374 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>
3 years agoUpdate translation files
Weblate [Wed, 29 Sep 2021 08:05:07 +0000 (10:05 +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/

Co-authored-by: Weblate <noreply@weblate.org>
Signed-off-by: Fedora Weblate Translation <i18n@lists.fedoraproject.org>
3 years agopo: Refresh potfile for v7.8.0 v7.8.0-rc1
Jiri Denemark [Mon, 27 Sep 2021 09:38:35 +0000 (11:38 +0200)] 
po: Refresh potfile for v7.8.0

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
3 years agoTranslated using Weblate (Korean)
simmon [Mon, 27 Sep 2021 07:55:01 +0000 (09:55 +0200)] 
Translated using Weblate (Korean)

Currently translated at 100.0% (10353 of 10353 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>
3 years agoTranslated using Weblate (Korean)
jason lee [Mon, 27 Sep 2021 07:55:00 +0000 (09:55 +0200)] 
Translated using Weblate (Korean)

Currently translated at 100.0% (10353 of 10353 strings)

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

Co-authored-by: jason lee <ppark5237@gmail.com>
Signed-off-by: jason lee <ppark5237@gmail.com>
3 years agoTranslated using Weblate (Korean)
simmon [Mon, 27 Sep 2021 07:54:59 +0000 (09:54 +0200)] 
Translated using Weblate (Korean)

Currently translated at 100.0% (10353 of 10353 strings)

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

Translated using Weblate (Korean)

Currently translated at 92.4% (9576 of 10353 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>
3 years agoTranslated using Weblate (Korean)
jason lee [Mon, 27 Sep 2021 07:54:58 +0000 (09:54 +0200)] 
Translated using Weblate (Korean)

Currently translated at 92.4% (9576 of 10353 strings)

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

Translated using Weblate (Korean)

Currently translated at 91.6% (9484 of 10353 strings)

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

Co-authored-by: jason lee <ppark5237@gmail.com>
Signed-off-by: jason lee <ppark5237@gmail.com>
3 years agoqemu: deprecate QEMU_CAPS_FSDEV_CREATEMODE
Ján Tomko [Fri, 24 Sep 2021 15:23:33 +0000 (17:23 +0200)] 
qemu: deprecate QEMU_CAPS_FSDEV_CREATEMODE

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 years agoqemu: assume QEMU_CAPS_FSDEV_CREATEMODE
Ján Tomko [Fri, 24 Sep 2021 15:20:37 +0000 (17:20 +0200)] 
qemu: assume QEMU_CAPS_FSDEV_CREATEMODE

Added by QEMU commit:
b96feb2cb9 "9pfs: local: Add support for custom fmode/dmode in 9ps
mapped security modes"
in 2.10.0

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 years agoqemu: Deprecate QEMU_CAPS_MACHINE_KERNEL_IRQCHIP
Ján Tomko [Fri, 24 Sep 2021 15:09:56 +0000 (17:09 +0200)] 
qemu: Deprecate QEMU_CAPS_MACHINE_KERNEL_IRQCHIP

Now that it's no longer used, remove probing for it
and mark it as deprecated.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 years agoqemu: assume QEMU_CAPS_MACHINE_KERNEL_IRQCHIP
Ján Tomko [Fri, 24 Sep 2021 15:07:06 +0000 (17:07 +0200)] 
qemu: assume QEMU_CAPS_MACHINE_KERNEL_IRQCHIP

Even though we only allow this option on x86,
all QEMUs report the command line option.

Added in QEMU v1.1:
6a48ffaaa7 "kvm: Activate in-kernel irqchip support"

Remove the pointless capability.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 years agoqemu: capabilities: do not look at parameters for sandbox
Ján Tomko [Fri, 24 Sep 2021 14:23:32 +0000 (16:23 +0200)] 
qemu: capabilities: do not look at parameters for sandbox

Assume the presence of the 'sandbox' option is enough,
no need to look at the parameters.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 years agoqemu: capabilities: deprecate QEMU_CAPS_SECCOMP_BLACKLIST
Ján Tomko [Fri, 24 Sep 2021 14:22:06 +0000 (16:22 +0200)] 
qemu: capabilities: deprecate QEMU_CAPS_SECCOMP_BLACKLIST

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 years agoqemu: seccomp: remove dead code
Ján Tomko [Fri, 24 Sep 2021 14:20:01 +0000 (16:20 +0200)] 
qemu: seccomp: remove dead code

There is no QEMU we support that would need the old syntax
for -sandbox on.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 years agoqemu: conf: simplify seccomp_sandbox comment
Ján Tomko [Fri, 24 Sep 2021 14:15:30 +0000 (16:15 +0200)] 
qemu: conf: simplify seccomp_sandbox comment

It contains too many negations and conditions that are
no longer relevant now that we only support QEMU >= 2.11.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 years agoqemu: always assume QEMU_CAPS_SECCOMP_BLACKLIST
Ján Tomko [Fri, 24 Sep 2021 14:04:30 +0000 (16:04 +0200)] 
qemu: always assume QEMU_CAPS_SECCOMP_BLACKLIST

elevateprivileges was introduced by QEMU commit:
73a1e64725 "seccomp: add elevateprivileges argument to command line"
released in 2.11.0
and later made conditional on SECCOMP support by:
9d0fdecbad sandbox: disable -sandbox if CONFIG_SECCOMP undefined

Use the existence of the sandbox option as a witness for its support.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 years agoqemu: ingore the transient domain state in fake reboot
Zhenzhong Duan [Sun, 26 Sep 2021 09:06:38 +0000 (17:06 +0800)] 
qemu: ingore the transient domain state in fake reboot

When action for 'on_poweroff' is set to 'restart', 'fake reboot'
is triggered and qemu shutdown state is transient. Domain state
need not to be changed and events not sent in this case.

Fixes: 4ffc807214cb80086d57e1d3e7b60959a41d2874
Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 years agovirsh: domain: remove else branch
Kristina Hanicova [Fri, 24 Sep 2021 15:17:50 +0000 (17:17 +0200)] 
virsh: domain: remove else branch

I removed else branches after return/break as they are not
necessary and the code looks cleaner without them.

Signed-off-by: Kristina Hanicova <khanicov@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 years agovirsh: domain: remove 'ret' variable and use 'count' instead
Kristina Hanicova [Fri, 24 Sep 2021 15:17:49 +0000 (17:17 +0200)] 
virsh: domain: remove 'ret' variable and use 'count' instead

This patch also includes use of an early return in case of an
error. I think the changes make the functions more readable.

Signed-off-by: Kristina Hanicova <khanicov@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 years agovirsh: domain: use early return when possible
Kristina Hanicova [Fri, 24 Sep 2021 15:17:48 +0000 (17:17 +0200)] 
virsh: domain: use early return when possible

Signed-off-by: Kristina Hanicova <khanicov@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 years agovirsh: domain: remove 'ret' variable, use early return when possible
Kristina Hanicova [Fri, 24 Sep 2021 15:17:47 +0000 (17:17 +0200)] 
virsh: domain: remove 'ret' variable, use early return when possible

Signed-off-by: Kristina Hanicova <khanicov@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 years agovirsh: domain: remove 'ret' variable and use direct return when possible
Kristina Hanicova [Fri, 24 Sep 2021 15:17:46 +0000 (17:17 +0200)] 
virsh: domain: remove 'ret' variable and use direct return when possible

Signed-off-by: Kristina Hanicova <khanicov@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 years agovirsh: domain: remove nested 'if' in cmdAttachDisk()
Kristina Hanicova [Fri, 24 Sep 2021 15:17:45 +0000 (17:17 +0200)] 
virsh: domain: remove nested 'if' in cmdAttachDisk()

Signed-off-by: Kristina Hanicova <khanicov@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 years agovirsh: domain: use early return in virshDomainDefine()
Kristina Hanicova [Fri, 24 Sep 2021 15:17:44 +0000 (17:17 +0200)] 
virsh: domain: use early return in virshDomainDefine()

Signed-off-by: Kristina Hanicova <khanicov@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 years agovirsh: domain: remove unnecessary variable and label in cmdMigrateSetMaxDowntime()
Kristina Hanicova [Thu, 23 Sep 2021 23:30:49 +0000 (01:30 +0200)] 
virsh: domain: remove unnecessary variable and label in cmdMigrateSetMaxDowntime()

Signed-off-by: Kristina Hanicova <khanicov@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 years agovirsh: domain: fix mistake in cmdMigrateSetMaxDowntime()
Kristina Hanicova [Thu, 23 Sep 2021 23:30:48 +0000 (01:30 +0200)] 
virsh: domain: fix mistake in cmdMigrateSetMaxDowntime()

If there was added a new return value indicating success to the
function virDomainMigrateSetMaxDowntime() in the future, because
of the way the function is called it would be treated it as an
error state and would return false (indicating failure). This
patch fixes it, so that the call of the function follows the same
pattern as is currently set in libvirt.

Signed-off-by: Kristina Hanicova <khanicov@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 years agomeson: Increase stack size limit for sanitizer builds
Tim Wiederhake [Thu, 23 Sep 2021 09:16:32 +0000 (11:16 +0200)] 
meson: Increase stack size limit for sanitizer builds

When building with "CC=clang", "-Db_sanitize=address,undefined", and
"-Dbuildtype=debug", the following error occurs:

    ../src/conf/nwfilter_conf.c:2190:1: error: stack frame size of 10616
    bytes in function 'virNWFilterRuleDefFixup' [-Werror,-Wframe-larger-than=]
    virNWFilterRuleDefFixup(virNWFilterRuleDef *rule)
    ^
    1 error generated.

Enforcing stack frame only makes sense on normal builds when stack usage
is deterministic.

Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
3 years agovsh: Don't check for OOM in vshGetTypedParamValue()
Michal Privoznik [Fri, 24 Sep 2021 09:15:10 +0000 (11:15 +0200)] 
vsh: Don't check for OOM in vshGetTypedParamValue()

Both function description and function itself mention check for
OOM which can't happen really. There was a bug in glib where
g_strdup_*() might have not aborted on OOM, but we have our own
implementation when dealing with broken glib (see
vir_g_strdup_printf()). Therefore, checking for OOM is redundant
and can never be true.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agolibvirt.spec.in: Replace %global with %define
Erik Skultety [Tue, 21 Sep 2021 16:48:19 +0000 (18:48 +0200)] 
libvirt.spec.in: Replace %global with %define

Commit b5e8db8f14d tuned the SPEC file so that libvirt daemons restart
on package upgrade. In order to do that it added a bunch of
parametrized macros using the %global directive. This caused a problem
when running RPM builds on CentOS Stream 8 resulting in:

error: Too many levels of recursion in macro expansion. It is likely
       caused by recursive macro declaration.
error: Macro %libvirt_daemon_perform_restart failed to expand
error: line 1275: %global libvirt_daemon_perform_restart() \
       if test %libvirt_daemon_needs_restart %1 \
       then \
           /bin/systemctl try-restart %1.service >/dev/null 2>&1 || : \
       fi \
       %libvirt_daemon_finish_restart %1

There are 2 important differences between %global and %define
directives:
1) %define is local-only and does have scope - in reality though, its
   scope is apparently not really enforced because it behaves exactly
   the same way as %global
2) %define is evaluated at the time of use while %global is evaluated
   at the time of definition

The latter and the fact the macro is parametrized is the reason why the
RPM builds fails on CentOS. Strangely enough this only happens on
CentOS Stream, but not Fedora (which is also the main proponent of
replacing %define with %global). Anyhow, replacing %global with %define
makes the rpmbuild to pass on both and along with package upgrades.

Signed-off-by: Erik Skultety <eskultet@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 years agoqemu: capabilities: Retire QEMU_CAPS_SPICE_FILE_XFER_DISABLE
Peter Krempa [Thu, 23 Sep 2021 07:12:13 +0000 (09:12 +0200)] 
qemu: capabilities: Retire QEMU_CAPS_SPICE_FILE_XFER_DISABLE

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoqemu: validate: Always assume QEMU_CAPS_SPICE_FILE_XFER_DISABLE
Peter Krempa [Thu, 23 Sep 2021 07:11:29 +0000 (09:11 +0200)] 
qemu: validate: Always assume QEMU_CAPS_SPICE_FILE_XFER_DISABLE

QEMU added the capability to disable file transfers via spice in commit
5ad24e5f3b ("spice: Add -spice disable-agent-file-transfer cmdline
option (rhbz#961850)") released in qemu-v1.6.0 and the option can't be
disabled.

Remove the unnecessary validation.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoqemuxml2argvtest: Modernize the rest of 'graphics-vnc' tests
Peter Krempa [Thu, 23 Sep 2021 15:15:16 +0000 (17:15 +0200)] 
qemuxml2argvtest: Modernize the rest of 'graphics-vnc' tests

As with previous test replace the fake caps versions with a combination
of DO_TEST_CAPS_VER(..., "2.11.0") and DO_TEST_CAPS_LATEST().

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoqemuxml2argvtest: Add DO_TEST_CAPS_LATEST for the vnc unix socket tests
Peter Krempa [Thu, 23 Sep 2021 15:12:53 +0000 (17:12 +0200)] 
qemuxml2argvtest: Add DO_TEST_CAPS_LATEST for the vnc unix socket tests

Now that the code is refactored add the DO_TEST_CAPS_LATEST versions as
promised in the commit adding the pinned versions.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoqemu: capabilities: Retire QEMU_CAPS_VNC_MULTI_SERVERS
Peter Krempa [Thu, 23 Sep 2021 07:26:41 +0000 (09:26 +0200)] 
qemu: capabilities: Retire QEMU_CAPS_VNC_MULTI_SERVERS

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoqemu: command: Always QEMU_CAPS_VNC_MULTI_SERVERS
Peter Krempa [Thu, 23 Sep 2021 07:25:32 +0000 (09:25 +0200)] 
qemu: command: Always QEMU_CAPS_VNC_MULTI_SERVERS

All supported qemu versions now use the new commandline parser
functions, thus we can remove the old-style commandline generator.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoqemuxml2argvtest: Replace vnc unix socket tests with pinned versions
Peter Krempa [Thu, 23 Sep 2021 14:57:43 +0000 (16:57 +0200)] 
qemuxml2argvtest: Replace vnc unix socket tests with pinned versions

Replace the 3 unix socket tests with real caps versions to demonstrate
that supported qemus no longer use the old syntax.

DO_TEST_CAPS_LATEST versions will be added later.

This also removes duplicate invocation of 'graphics-vnc-socket'.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoqemu: capabilities: Retire QEMU_CAPS_VNC_OPTS
Peter Krempa [Thu, 23 Sep 2021 08:11:39 +0000 (10:11 +0200)] 
qemu: capabilities: Retire QEMU_CAPS_VNC_OPTS

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoqemu: command: Always assume QEMU_CAPS_VNC_OPTS
Peter Krempa [Thu, 23 Sep 2021 08:10:05 +0000 (10:10 +0200)] 
qemu: command: Always assume QEMU_CAPS_VNC_OPTS

The switch to QemuOpts parser which brought the long-form options
happened in qemu commit 4db14629c3 ("vnc: switch to QemuOpts, allow
multiple servers") released in v2.3.0.

We can always assume this capability and remove the old-style
generators.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoqemu: command: Simplify 'vnc' commandline generator
Peter Krempa [Thu, 23 Sep 2021 08:09:20 +0000 (10:09 +0200)] 
qemu: command: Simplify 'vnc' commandline generator

'qemuDomainSecretGraphicsPrepare' always populates 'gfxPriv->tlsAlias'
when 'cfg->vncTLS' is enabled.

This means we can remove the fallback code setting up TLS for vnc via
the 'x509=' parameter.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoqemuBuildTLSx509BackendProps: Remove unused 'qemuCaps'
Peter Krempa [Thu, 23 Sep 2021 13:51:21 +0000 (15:51 +0200)] 
qemuBuildTLSx509BackendProps: Remove unused 'qemuCaps'

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoqemu: capabilities: Retire QEMU_CAPS_OBJECT_TLS_CREDS_X509
Peter Krempa [Thu, 23 Sep 2021 08:05:06 +0000 (10:05 +0200)] 
qemu: capabilities: Retire QEMU_CAPS_OBJECT_TLS_CREDS_X509

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoqemu: Always assume presence of QEMU_CAPS_OBJECT_TLS_CREDS_X509
Peter Krempa [Thu, 23 Sep 2021 08:01:45 +0000 (10:01 +0200)] 
qemu: Always assume presence of QEMU_CAPS_OBJECT_TLS_CREDS_X509

The 'tls-creds-x509' object is always registered even when qemu is built
without gnutls for all supported qemu versions. This means we cannot
probe for its support and thus simplify the code using TLS.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoqemuxml2argvtest: Use real caps in "graphics-vnc-tls" case
Peter Krempa [Thu, 23 Sep 2021 13:31:18 +0000 (15:31 +0200)] 
qemuxml2argvtest: Use real caps in "graphics-vnc-tls" case

Replace the fake caps invocation with invocation binding it to the
oldest supported qemu version.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agovirsh: util: remove 'else' branch after return
Kristina Hanicova [Thu, 23 Sep 2021 23:49:11 +0000 (01:49 +0200)] 
virsh: util: remove 'else' branch after return

Signed-off-by: Kristina Hanicova <khanicov@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 years agovirsh: remove variable 'ret' and 'inactive'
Kristina Hanicova [Thu, 23 Sep 2021 23:49:10 +0000 (01:49 +0200)] 
virsh: remove variable 'ret' and 'inactive'

Signed-off-by: Kristina Hanicova <khanicov@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 years agovirsh: remove variable 'ret' in cmdVersion()
Kristina Hanicova [Thu, 23 Sep 2021 23:49:09 +0000 (01:49 +0200)] 
virsh: remove variable 'ret' in cmdVersion()

Signed-off-by: Kristina Hanicova <khanicov@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 years agovirsh: remove variable 'ret' and use early return if possible
Kristina Hanicova [Thu, 23 Sep 2021 23:49:08 +0000 (01:49 +0200)] 
virsh: remove variable 'ret' and use early return if possible

Signed-off-by: Kristina Hanicova <khanicov@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 years agovirsh: volume: refactor cmdVolInfo()
Kristina Hanicova [Thu, 23 Sep 2021 23:25:12 +0000 (01:25 +0200)] 
virsh: volume: refactor cmdVolInfo()

Signed-off-by: Kristina Hanicova <khanicov@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 years agovirsh: host: refactor cmdNodeCpuStats()
Kristina Hanicova [Thu, 23 Sep 2021 23:25:11 +0000 (01:25 +0200)] 
virsh: host: refactor cmdNodeCpuStats()

Signed-off-by: Kristina Hanicova <khanicov@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 years agovirsh: host: refactor cmdFreecell()
Kristina Hanicova [Thu, 23 Sep 2021 23:25:10 +0000 (01:25 +0200)] 
virsh: host: refactor cmdFreecell()

Signed-off-by: Kristina Hanicova <khanicov@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 years agovirsh: domain: refactor cmdLxcEnterNamespace()
Kristina Hanicova [Thu, 23 Sep 2021 23:25:09 +0000 (01:25 +0200)] 
virsh: domain: refactor cmdLxcEnterNamespace()

Signed-off-by: Kristina Hanicova <khanicov@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 years agovirsh: domain: refactor virshCPUCountCollect()
Kristina Hanicova [Thu, 23 Sep 2021 23:25:08 +0000 (01:25 +0200)] 
virsh: domain: refactor virshCPUCountCollect()

Signed-off-by: Kristina Hanicova <khanicov@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 years agovirsh: domain: refactor cmdSchedinfo()
Kristina Hanicova [Thu, 23 Sep 2021 23:25:07 +0000 (01:25 +0200)] 
virsh: domain: refactor cmdSchedinfo()

Signed-off-by: Kristina Hanicova <khanicov@redhat.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 years agoTranslated using Weblate (Korean)
simmon [Fri, 24 Sep 2021 00:05:04 +0000 (02:05 +0200)] 
Translated using Weblate (Korean)

Currently translated at 82.9% (8591 of 10353 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>
3 years agoscripts: include function versions in API definition
Daniel P. Berrangé [Thu, 23 Sep 2021 10:40:01 +0000 (11:40 +0100)] 
scripts: include function versions in API definition

In order to auto-generate more of the language binding code, it is
desirable to know what libvirt version an API was introduced in.
We can extract this information from the .syms files and expose
it in the API description

eg instead of

  <function name='virNodeNumOfDevices' file='libvirt-nodedev'
            module='libvirt-nodedev'>

we now have

  <function name='virNodeNumOfDevices' file='libvirt-nodedev'
            module='libvirt-nodedev' version='0.5.0'>

This will benefit this proposal:

  https://gitlab.com/libvirt/libvirt-go-module/-/merge_requests/7

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Tested-by: Victor Toso <victortoso@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
3 years agoch: use g_auto in virCHMonitorBuildVMJson
Ján Tomko [Wed, 22 Sep 2021 20:50:48 +0000 (22:50 +0200)] 
ch: use g_auto in virCHMonitorBuildVMJson

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Laine Stump <laine@redhat.com>
3 years agoch: use g_auto in virCHMonitorBuildNetsJson
Ján Tomko [Wed, 22 Sep 2021 20:50:22 +0000 (22:50 +0200)] 
ch: use g_auto in virCHMonitorBuildNetsJson

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Laine Stump <laine@redhat.com>
3 years agoch: use g_auto in virCHMonitorBuildNetJson
Ján Tomko [Wed, 22 Sep 2021 20:49:57 +0000 (22:49 +0200)] 
ch: use g_auto in virCHMonitorBuildNetJson

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Laine Stump <laine@redhat.com>
3 years agoch: use g_auto in virCHMonitorBuildDisksJson
Ján Tomko [Wed, 22 Sep 2021 20:49:27 +0000 (22:49 +0200)] 
ch: use g_auto in virCHMonitorBuildDisksJson

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Laine Stump <laine@redhat.com>
3 years agoch: use g_auto in virCHMonitorBuildDiskJson
Ján Tomko [Wed, 22 Sep 2021 20:48:58 +0000 (22:48 +0200)] 
ch: use g_auto in virCHMonitorBuildDiskJson

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Laine Stump <laine@redhat.com>
3 years agoch: use g_auto in virCHMonitorBuildCPUJson
Ján Tomko [Wed, 22 Sep 2021 20:45:51 +0000 (22:45 +0200)] 
ch: use g_auto in virCHMonitorBuildCPUJson

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Laine Stump <laine@redhat.com>
3 years agoqemuxml2argvtest: remove 'fs9p' cases with fake capabilities.
Peter Krempa [Wed, 22 Sep 2021 10:56:23 +0000 (12:56 +0200)] 
qemuxml2argvtest: remove 'fs9p' cases with fake capabilities.

The filesystem commandline doesn't differ in the '-latest' cases.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoqemuxml2argvtest: Pin old-style '-no-reboot' usage to qemu-5.2
Peter Krempa [Wed, 22 Sep 2021 10:50:51 +0000 (12:50 +0200)] 
qemuxml2argvtest: Pin old-style '-no-reboot' usage to qemu-5.2

After qemu-5.2 we always use -no-shutdown.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoqemuxml2argvtest: Use versioned ("4.1.0") capabilities for pre '-audiodev' cases
Peter Krempa [Wed, 22 Sep 2021 10:45:23 +0000 (12:45 +0200)] 
qemuxml2argvtest: Use versioned ("4.1.0") capabilities for pre '-audiodev' cases

Use real caps instead of fake caps for the legacy cases. This will also
show us when we can remove the old-style code.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agotests: qemu: Remove 's390-ccw' machine type from fake capabilities
Peter Krempa [Wed, 22 Sep 2021 09:15:00 +0000 (11:15 +0200)] 
tests: qemu: Remove 's390-ccw' machine type from fake capabilities

Modern QEMUs don't support the machine type at all. Remove it from our
fake caps generator too and adjust test cases which depend on it.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoqemuxml2argvtest: Modernize s390x disk tests
Peter Krempa [Wed, 22 Sep 2021 08:58:22 +0000 (10:58 +0200)] 
qemuxml2argvtest: Modernize s390x disk tests

An update to the machine type was necessary as 's390-ccw' is no longer
supported.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoqemuxml2argvtest: Modernize 'disk-floppy-pseries' case
Peter Krempa [Wed, 22 Sep 2021 08:46:06 +0000 (10:46 +0200)] 
qemuxml2argvtest: Modernize 'disk-floppy-pseries' case

Use real caps. The flooppy device still is forbidden for ppc64.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoqemuxml2argvtest: Modernize outstanding disk-backend related tests
Peter Krempa [Wed, 22 Sep 2021 08:41:52 +0000 (10:41 +0200)] 
qemuxml2argvtest: Modernize outstanding disk-backend related tests

For backend related tests we need to cover the pre-blockdev and
post-blockdev era, so the fake-capability test is converted to a
combination of DO_TEST_CAPS_VER(..., "4.1.0") and DO_TEST_CAPS_LATEST.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoqemuxml2argvtest: Modernize 'disk-network-rbd-no-colon' case
Peter Krempa [Wed, 22 Sep 2021 08:30:56 +0000 (10:30 +0200)] 
qemuxml2argvtest: Modernize 'disk-network-rbd-no-colon' case

The test case fails in pre-blockdev scenarios as it would pass RBD
parameters behind our back but succeeds after as we pass it in JSON form
which doesn't have that defect.

Cover both cases instead of the fake-caps version.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
3 years agoqemuxml2argvtest: Merge 'disk-iscsi' case into 'disk-cache'
Peter Krempa [Wed, 22 Sep 2021 08:08:27 +0000 (10:08 +0200)] 
qemuxml2argvtest: Merge 'disk-iscsi' case into 'disk-cache'

Use the iSCSI disk path in one of the disks of the 'disk-cache' test as
it's the only specialty of 'disk-iscsi' case and remove the now
pointless files.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>