Commit Graph

41877 Commits

Author SHA1 Message Date
Tim Wiederhake
b3a6daa36d virDomainShmemDef: Change type of model to virDomainShmemModel
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Ján Tomko <jtomko@redhat.com>
2021-05-06 12:34:41 +02:00
Tim Wiederhake
cacde05ad3 virDomainMemballoonDefParseXML: Use virXMLProp*
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Ján Tomko <jtomko@redhat.com>
2021-05-06 12:34:41 +02:00
Tim Wiederhake
dcf5d641ec virDomainMemballoonDef: Change type of model to virDomainMemballoonModel
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Ján Tomko <jtomko@redhat.com>
2021-05-06 12:34:41 +02:00
Tim Wiederhake
38180f87f5 virDomainAudioCommonParse: Use virXMLProp*
This strictens the parser to disallow negative values (interpreted as
`UINT_MAX + value + 1`) for attributes `voices` (typically 1),
`bufferLength` (measured in milliseconds), `frequency` (in Hz, typically
44100), and `channels` (typically 2 for stereo).

None of these properties benefit from or have a sensible use-case for
wrap-around behavior.

Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Ján Tomko <jtomko@redhat.com>
2021-05-06 12:34:41 +02:00
Tim Wiederhake
c9876ccf56 virDomainAudioIOCommon: Change type of format to virDomainAudioFormat
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Ján Tomko <jtomko@redhat.com>
2021-05-06 12:34:41 +02:00
Tim Wiederhake
bb94b3d28d virDomainGraphicsDefParseXMLSpice: Use virXMLProp*
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2021-05-06 12:16:32 +02:00
Tim Wiederhake
4ecf7ff393 virDomainGraphicsDefParseXMLSpice: Make name and mode mandatory
Attributes are mandatory and were incorrectly made optional recently.

Fixes: 2a5e16398e
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2021-05-06 12:16:32 +02:00
Tim Wiederhake
4647ac4205 virDomainGraphicsDefParseXMLSpice: Fix variable type
Fixes: 2a5e16398e
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2021-05-06 12:16:32 +02:00
Andrea Bolognani
69c8d5954e spec: Drop supported_platform variable
It's only used in one place, and it's nicer to keep the error
message close to the check that causes it to be emitted.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2021-05-06 11:06:08 +02:00
Andrea Bolognani
0f601d2f86 spec: Bump min_fedora and min_rhel
According to our platform support policy

  https://libvirt.org/platforms.html

RHEL 7 and all versions of Fedora older than 33 are going to
be out of scope by the time libvirt 7.4.0 is released.

Dropping RHEL 7 in particular allows us to greatly simplify
many parts of the spec file.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2021-05-06 11:06:06 +02:00
Andrea Bolognani
d9f4470549 spec: Don't disable LTO in Fedora 34
The bug that caused this to be added

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

has since been resolved.

Reverts: a16c0402ba
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2021-05-06 11:06:00 +02:00
Michal Privoznik
a573f21f32 virDomainVideoDriverDefParseXML: Allow zero value for @vgaconf
It was always allowed, but in a very unusual and weird way. Just
look at the original commit that introduced it (78fc843c7b).
Also, we document that "io" value is accepted (which translates
to VIR_DOMAIN_VIDEO_VGACONF_IO with value of zero).

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2021-05-06 09:10:30 +02:00
Michal Privoznik
1edf9f7b0a virDomainChrSourceDefParseXML: Fix attribute names for nmdm type
While reworking the patch I've mistakenly mangled the attribute
names for VIR_DOMAIN_CHR_TYPE_NMDM.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2021-05-06 09:10:30 +02:00
Daniel P. Berrangé
68e8fbe6b1 gitlab: enable debug output for test suite
When CI jobs fail on the test suite, we don't see much helpful
information by default:

stderr:
TEST: bhyvexml2argvtest
      ......!!.............!......!........... 40
      ........................!......          71  FAIL
Some tests failed. Run them using:
VIR_TEST_DEBUG=1 VIR_TEST_RANGE=7-8,22,29,65
/tmp/cirrus-ci-build/build/meson-private/dist-build/tests/bhyvexml2argvtest

Following the instructions to re-run the test with VIR_TEST_DEBUG=1 is
quite unfriendly when we could have had that set for CI already.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-05-05 14:45:34 +01:00
Peter Krempa
7f71a641d0 virDomainVideoDriverDefParseXML: Fix use of uninitialized variable
Commit fc7e1b2f03 which refactored the
video driver parse helper introduced a use of uninitialized variable,
which caused test failure at least when compiled with clang.

Pass 'def->vgaconf' directly to virXMLPropEnum. 'def' needs to be
converted to use g_autofree to handle error scenarios.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
2021-05-05 14:08:29 +02:00
Tim Wiederhake
4a4c2a4f24 virDomainFSDefParseXML: Remove unused variables
Fixes: 8f05664ed3
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2021-05-05 14:04:41 +02:00
Andrea Bolognani
d35003aee7 ci: Drop CentOS 7
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2021-05-05 13:25:21 +02:00
Andrea Bolognani
eabfb73356 ci: Drop Fedora 32
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2021-05-05 13:25:20 +02:00
Andrea Bolognani
b488200a92 ci: Add Fedora 34
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2021-05-05 13:25:19 +02:00
Andrea Bolognani
7f2f7ef23b ci: Add FreeBSD 13
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2021-05-05 13:25:17 +02:00
Andrea Bolognani
103d019a4f ci: Add openSUSE Tumbleweed
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2021-05-05 13:25:16 +02:00
Andrea Bolognani
a3fef27fb5 ci: Refresh contents
Notable changes:

  * the CentOS Stream 8 container is now using a proper base
    image instead of starting from a CentOS 8 image and then
    adding the CentOS Stream 8 repositories on top;

  * distributions that have a perl-base package are now using
    that one instead of the regular perl package, which
    contains a bunch of features we don't need, resulting in
    smaller containers.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2021-05-05 13:25:14 +02:00
Andrea Bolognani
043adb8b50 ci: Rename CentOS Stream 8 and openSUSE Leap 15.2 containers
The names have been recently changed in libvirt-ci to be more
accurate, so we should follow along.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2021-05-05 13:25:12 +02:00
Andrea Bolognani
12dda05b7d ci: Remove Fedora Rawhide dwarf4 hack
It's no longer needed.

Reverts: e603efb6ec
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2021-05-05 13:25:03 +02:00
Kristina Hanicova
8391cfbc2d Refactoring virDomainVideoDefParseXML() to use XPath
Signed-off-by: Kristina Hanicova <khanicov@redhat.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2021-05-05 09:12:15 +02:00
Kristina Hanicova
fc7e1b2f03 Refactoring virDomainVideoDriverDefParseXML() to use XPath
Signed-off-by: Kristina Hanicova <khanicov@redhat.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2021-05-05 09:12:14 +02:00
Kristina Hanicova
bcce7f2e3a conf: Propagate xmlXPathContextPtr into virDomainVideoDriverDefParseXML()
Signed-off-by: Kristina Hanicova <khanicov@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2021-05-05 09:12:14 +02:00
Kristina Hanicova
2a5e16398e Refactoring virDomainGraphicsDefParseXMLSpice() to use XPath
Signed-off-by: Kristina Hanicova <khanicov@redhat.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2021-05-05 09:12:13 +02:00
Kristina Hanicova
17ae6e8d64 Refactoring virDomainSmartcardDefParseXML() to use XPath
Signed-off-by: Kristina Hanicova <khanicov@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2021-05-05 09:12:12 +02:00
Kristina Hanicova
7fefde1f44 Refactoring virDomainChrDefParseXML() to use XPath
Signed-off-by: Kristina Hanicova <khanicov@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2021-05-05 09:12:11 +02:00
Kristina Hanicova
d705f5b4f2 Refactoring virDomainChrSourceDefParseXML() to use XPath
Signed-off-by: Kristina Hanicova <khanicov@redhat.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2021-05-05 09:12:10 +02:00
Kristina Hanicova
3ee51e1b56 Refactoring virDomainChrDefParseTargetXML() to use XPath
Signed-off-by: Kristina Hanicova <khanicov@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2021-05-05 09:12:09 +02:00
Kristina Hanicova
d1c8ee235a conf: Propagate xmlXPathContextPtr into virDomainChrDefParseTargetXML()
Signed-off-by: Kristina Hanicova <khanicov@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2021-05-05 09:12:08 +02:00
Kristina Hanicova
fdd06824e3 Refactoring virDomainNetDefParseXML() to use XPath
Signed-off-by: Kristina Hanicova <khanicov@redhat.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2021-05-05 09:12:06 +02:00
Kristina Hanicova
8f05664ed3 Refactoring virDomainFSDefParseXML() to use XPath
Signed-off-by: Kristina Hanicova <khanicov@redhat.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2021-05-05 09:12:05 +02:00
Kristina Hanicova
1810562e11 Refactoring virDomainControllerDefParseXML() to use XPath
Signed-off-by: Kristina Hanicova <khanicov@redhat.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2021-05-05 09:12:03 +02:00
Kristina Hanicova
8d635a0bf2 Refactoring virDomainLeaseDefParseXML() to use XPath
Signed-off-by: Kristina Hanicova <khanicov@redhat.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2021-05-05 09:12:00 +02:00
Kristina Hanicova
997b920433 conf: Propagate xmlXPathContextPtr into virDomainLeaseDefParseXML()
Signed-off-by: Kristina Hanicova <khanicov@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2021-05-05 09:11:59 +02:00
Kristina Hanicova
bd8f53bcab Refactoring virDomainHostdevSubsysPCIDefParseXML() to use XPath
Signed-off-by: Kristina Hanicova <khanicov@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2021-05-05 09:11:58 +02:00
Kristina Hanicova
56cbdb858e conf: Propagate xmlXPathContextPtr into virDomainHostdevSubsysPCIDefParseXML()
Signed-off-by: Kristina Hanicova <khanicov@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2021-05-05 09:11:58 +02:00
Kristina Hanicova
2cf6a488d1 Refactoring virDomainBlkioDeviceParseXML() to use XPath
Signed-off-by: Kristina Hanicova <khanicov@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2021-05-05 09:11:57 +02:00
Kristina Hanicova
6ec66671da conf: Propagate xmlXPathContextPtr into virDomainBlkioDeviceParseXML()
Signed-off-by: Kristina Hanicova <khanicov@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2021-05-05 09:11:56 +02:00
Kristina Hanicova
9f27f12282 Refactoring virDomainHostdevSubsysUSBDefParseXML() to use XPath
Signed-off-by: Kristina Hanicova <khanicov@redhat.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2021-05-05 09:11:55 +02:00
Kristina Hanicova
c9178c86cb conf: Propagate xmlXPathContextPtr into virDomainHostdevSubsysUSBDefParseXML()
Signed-off-by: Kristina Hanicova <khanicov@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2021-05-05 09:11:53 +02:00
Olaf Hering
dbc50839ba docs: cputune is also supported by the xen driver
Since commit 68c5b6fb2b libxl also handles
a domain/cputune/vcpupin element in domU.xml.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Reviewed-by: Jim Fehlig <jfehlig@suse.com>
2021-05-04 16:37:17 -06:00
Olaf Hering
6de6767b56 libxl: remove obsolete check for result of xc_get_max_cpus
xc_get_max_cpus from Xen version 4.3 may return 0 in case xc_physinfo
fails. This has been fixed in Xen 4.4. Remove the obsolete result check
from libvirt. Just convert libxl error codes to plain -1.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Reviewed-by: Jim Fehlig <jfehlig@suse.com>
2021-05-04 16:24:57 -06:00
Olaf Hering
70492e33e3 libxl: remove obsolete VIR_LIBXL_EVENT_CONST
In Xen 4.2 struct libxl_event_hooks had a member which was erroneously
declared const. Since libvirt requires at least Xen 4.6, remove the dead
code.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Reviewed-by: Jim Fehlig <jfehlig@suse.com>
2021-05-04 16:23:54 -06:00
Peter Krempa
b6a02345dc qemucapabilitiesdata: Update x86_64 capabilities for qemu-6.0 release
Update to the final state now that qemu 6.0 was released.

Notable changes are the addition of 'EPYC-Rome-v2' cpu type and removal
of 'query-netdev' which we didn't use.

The rest is the usual churn caused by random registration of objects at
compile time.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
2021-05-03 12:14:45 +02:00
Peter Krempa
4a0d9a123c qemu: capabilities: Retire QEMU_CAPS_NUMA_DIST
The feature is present in all supported qemu versions (>2.11) and there
isn't a reasonable way to detect it.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2021-05-03 12:14:45 +02:00
Peter Krempa
f20f266e66 qemu: capabilities: Retire QEMU_CAPS_EGL_HEADLESS
The feature is present in all supported qemu versions (>2.11) and there
isn't a reasonable way to detect it.

In addition the capability wasn't even used to gate any functionality
except for reporting the presence in the domain capabilities XML.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2021-05-03 12:14:45 +02:00