]>
git.ipfire.org Git - thirdparty/libvirt.git/log
Peter Krempa [Tue, 3 Nov 2020 08:16:30 +0000 (09:16 +0100)]
qemu: capabilities: Enable detection of QEMU_CAPS_BLOCKDEV_REOPEN
Base it on the presence of the "blockdev-reopen" QMP command.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Peter Krempa [Mon, 22 Feb 2021 16:59:28 +0000 (17:59 +0100)]
qemumonitorjsontest: Add test case for 'blockdev-reopen'
Export 'qemuBlockReopenFormatMon' and use it in a new test case wich
will validate the arguments against the QMP schema.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Peter Krempa [Mon, 22 Feb 2021 16:55:12 +0000 (17:55 +0100)]
qemuBlockReopenFormatMon: Adapt to new argument format of 'blockdev-reopen'
This function was added prior 'blockdev-reopen' being stable and qemu
changed the arguments to actually contain an array of block node
definitions to reopen.
In our case we are just changing between read-only and read-write modes
and thus we can keep operating on the nodes one-by-one.
Modify the code to add the wrapper array.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Peter Krempa [Mon, 22 Feb 2021 16:55:01 +0000 (17:55 +0100)]
qemuBlockReopenFormat: Extract @src handling and monitor invocation
This will simplify testing of the blockdev-reopen code once it's
enabled.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Peter Krempa [Thu, 22 Jul 2021 07:09:07 +0000 (09:09 +0200)]
tests: qemucapabilities: Update capabilities for qemu-6.1.0-rc0 on x86_64
Update to
v6.1.0-rc0-48-g7b7ca8ebde
Notable changes are:
- stabilization of 'blockdev-reopen'
- addition of the 'vmx-tsc-scaling' cpu flag
- Supported display types are now in the schema only if they are compiled in.
- rbd image encryption
- 'aio-max-batch' iothread property
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Cole Robinson [Fri, 23 Jul 2021 19:42:16 +0000 (15:42 -0400)]
qemu_vhost_user: don't raise error for unknown features
Similar to what was done for qemu_firmware.c in
61d95a1073 , don't
report an error for unknown vhost-user features, just log it and
correctly continue on
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Cole Robinson <crobinso@redhat.com>
Peter Krempa [Fri, 23 Jul 2021 08:55:20 +0000 (10:55 +0200)]
qemuDomainObjPrivateAlloc: Fix unlikely memory leak
Additional cleanup paths add the possibility of not freeing earlier
stuff. Add an AUTOPTR handler for qemuDomainObjPrivate and use it in
qemuDomainObjPrivateAlloc
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Tim Wiederhake <twiederh@redhat.com>
Peter Krempa [Fri, 23 Jul 2021 08:51:08 +0000 (10:51 +0200)]
qemu: domain: Move qemuDomainObjPrivateAlloc after qemuDomainObjPrivateFree
The freeing function will be needed to undo failures in allocation.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Tim Wiederhake <twiederh@redhat.com>
Peter Krempa [Fri, 23 Jul 2021 08:46:40 +0000 (10:46 +0200)]
virNetworkObjNew: Remove impossible error handling
'obj->classIdMap' is a bitmap with size of '16', thus the first 3 bits
are guaranteed to be available. Use 'virBitmapSetBit' instead of
'virBitmapSetBitExpand' since we don't need any expansion and ignore
errors as they are impossible.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Tim Wiederhake <twiederh@redhat.com>
Peter Krempa [Fri, 23 Jul 2021 08:43:12 +0000 (10:43 +0200)]
virDomainDefValidateAliases: Refactor to avoid cleanup section
Use a temporary auto-freed local variable to hold the hash table so that
the cleanup section can be removed.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Tim Wiederhake <twiederh@redhat.com>
Peter Krempa [Fri, 23 Jul 2021 08:39:54 +0000 (10:39 +0200)]
qemuBlockNodeNameGetBackingChain: Shuffle around variable initialization
Allocate the hash tables first so tat the 'data' struct can be directly
initialized removing the need for a memset and two additional
assignments.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Tim Wiederhake <twiederh@redhat.com>
Peter Krempa [Fri, 23 Jul 2021 08:38:08 +0000 (10:38 +0200)]
hypervCreateEmbeddedParam: Don't count elements needlessly
'count' is not used after calculating it.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Tim Wiederhake <twiederh@redhat.com>
Peter Krempa [Fri, 23 Jul 2021 08:36:36 +0000 (10:36 +0200)]
virHashNew: Ensure return value is used
Declare the function with G_GNUC_WARN_UNUSED_RESULT as we always want to
use the returned value.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Tim Wiederhake <twiederh@redhat.com>
Tim Wiederhake [Tue, 6 Jul 2021 11:33:59 +0000 (13:33 +0200)]
virStoragePoolObjListNew: `virHashNew` cannot return NULL
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Tim Wiederhake [Mon, 5 Jul 2021 15:02:17 +0000 (17:02 +0200)]
virLockSpaceNewPostExecRestart: `virHashNew` cannot return NULL
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Tim Wiederhake [Mon, 26 Jul 2021 08:10:12 +0000 (10:10 +0200)]
docs: Fix two spelling mistakes
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Michal Privoznik [Thu, 22 Jul 2021 12:26:00 +0000 (14:26 +0200)]
virSetUIDGIDWithCaps: Set bounding capabilities only with CAP_SETPCAP
In one of my previous patches I've tried to postpone dropping
CAP_SETPCAP until the very end because it's needed for
capng_apply(). What I did not realize back then was that we might
not have the capability to begin with. Because of unknown reasons
capng_apply() pollutes logs only for CAPNG_SELECT_BOUNDS and not
for CAPNG_SELECT_CAPS.
Reproducer is really simple: run libvirtd as a regular user.
During its initialization, libvirtd will spawn some binaries
(dnsmasq, qemu-*, etc.) and while doing so it will try to drop
capabilities.
Anyway, let's call capng_apply(CAPNG_SELECT_BOUNDS) only if we
have the CAP_SETPCAP (which is tracked in need_setpcap variable).
Fixes: 438b50dda8a863fdc988e9ab612f097cc1626e8a
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=
1924218
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Cole Robinson <crobinso@redhat.com>
Michal Privoznik [Thu, 22 Jul 2021 12:12:14 +0000 (14:12 +0200)]
virSetUIDGIDWithCaps: Drop redundant parenthesis around capng_apply()
After all capabilities were set (except for CAP_SETGID,
CAP_SETUID and CAP_SETPCAP) and after UID:GID was changed we drop
the last aforementioned capabilities (we couldn't drop them
before because we needed UID:GID and capabilities change).
Therefore, there's final capng_apply() call. However, it is
wrapped in one layer of parenthesis more than needed.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Christian Kirbach [Thu, 22 Jul 2021 13:07:58 +0000 (15:07 +0200)]
Translated using Weblate (German)
Currently translated at 49.6% (5132 of 10342 strings)
Translation: libvirt/libvirt
Translate-URL: https://translate.fedoraproject.org/projects/libvirt/libvirt/de/
Co-authored-by: Christian Kirbach <christian.kirbach@gmail.com>
Signed-off-by: Christian Kirbach <christian.kirbach@gmail.com>
Matej Cepl [Thu, 22 Jul 2021 13:07:58 +0000 (15:07 +0200)]
Translated using Weblate (Czech)
Currently translated at 88.2% (9124 of 10342 strings)
Translation: libvirt/libvirt
Translate-URL: https://translate.fedoraproject.org/projects/libvirt/libvirt/cs/
Co-authored-by: Matej Cepl <mcepl@cepl.eu>
Signed-off-by: Matej Cepl <mcepl@cepl.eu>
simmon [Thu, 22 Jul 2021 13:07:57 +0000 (15:07 +0200)]
Translated using Weblate (Korean)
Currently translated at 45.2% (4679 of 10342 strings)
Translation: libvirt/libvirt
Translate-URL: https://translate.fedoraproject.org/projects/libvirt/libvirt/ko/
Translated using Weblate (Korean)
Currently translated at 45.1% (4674 of 10342 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>
Daniel P. Berrangé [Fri, 23 Jul 2021 12:41:02 +0000 (13:41 +0100)]
src: workaround warning triggered in glib 2.69
Libvirt is using the G_GNUC_FALLTHROUGH macro provided by glib since
version 2.60. Since we need to support older glib, we also have some
compatibility code to define it if missing.
We set the GLIB_VERSION_MAX_ALLOWED macro to ensure we get warnings
when we use an API that dates from a glib version newer than our
minimum benchmark. Historically this didn't get enforced for (most)
macros, but GLib 2.69 has addressed that gap.
This causes our usage of G_GNUC_FALLTHROUGH to trigger warnings.
GLib is right to warn, because it does not know that we have added
our own fallback for older versions.
The only way to squelch this warning though, is to fully undefine
the GLib provided G_GNUC_FALLTHROUGH and use our own in its place.
We'll be able to remove all this compat burden when we finally
update the min glib version to be >= 2.60
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Kristina Hanicova [Thu, 22 Jul 2021 09:45:52 +0000 (11:45 +0200)]
storage: create logical volume with --yes option
If lvcreate found an existing signature when trying to create a
new logical volume (E.g. left after some deleted volume), the
action failed due to inability to answer interactive question to
wiping it (lvcreate assumed 'no' was the answer). With added
option --yes to the command line, the answer to any interactive
question is assumed to be yes. Therefore, lvcreate wipes the
signature and the new volume is created successfully.
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=
1940413
Signed-off-by: Kristina Hanicova <khanicov@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Tim Wiederhake [Tue, 6 Jul 2021 11:34:44 +0000 (13:34 +0200)]
virStorageVolObjListNew: `virHashNew` cannot return NULL
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Tim Wiederhake [Tue, 6 Jul 2021 11:33:09 +0000 (13:33 +0200)]
virSecuritySELinuxQEMUInitialize: `virHashNew` cannot return NULL
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Tim Wiederhake [Tue, 6 Jul 2021 11:32:29 +0000 (13:32 +0200)]
virSecuritySELinuxLXCInitialize: `virHashNew` cannot return NULL
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Tim Wiederhake [Tue, 6 Jul 2021 11:31:12 +0000 (13:31 +0200)]
virQEMUCapsProbeQMPHostCPU: `virHashNew` cannot return NULL
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Tim Wiederhake [Tue, 6 Jul 2021 08:06:35 +0000 (10:06 +0200)]
virNodeDeviceObjListNew: `virHashNew` cannot return NULL
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Tim Wiederhake [Tue, 6 Jul 2021 07:16:06 +0000 (09:16 +0200)]
virNetworkObjNew: `virHashNew` cannot return NULL
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Tim Wiederhake [Tue, 6 Jul 2021 07:13:54 +0000 (09:13 +0200)]
virNetworkObjListNew: `virHashNew` cannot return NULL
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Tim Wiederhake [Tue, 6 Jul 2021 07:13:02 +0000 (09:13 +0200)]
virNetDaemonNew: `virHashNew` cannot return NULL
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Tim Wiederhake [Mon, 5 Jul 2021 15:01:54 +0000 (17:01 +0200)]
virLockSpaceNew: `virHashNew` cannot return NULL
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Tim Wiederhake [Mon, 5 Jul 2021 15:01:25 +0000 (17:01 +0200)]
virLockDaemonNewPostExecRestart: `virHashNew` cannot return NULL
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Tim Wiederhake [Mon, 5 Jul 2021 15:00:47 +0000 (17:00 +0200)]
virLockDaemonNew: `virHashNew` cannot return NULL
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Tim Wiederhake [Mon, 5 Jul 2021 14:59:53 +0000 (16:59 +0200)]
virInterfaceObjListNew: `virHashNew` cannot return NULL
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Tim Wiederhake [Mon, 5 Jul 2021 14:59:17 +0000 (16:59 +0200)]
virHashAtomicNew: `virHashNew` cannot return NULL
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Tim Wiederhake [Mon, 5 Jul 2021 14:58:22 +0000 (16:58 +0200)]
virFileCacheNew: `virHashNew` cannot return NULL
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Tim Wiederhake [Mon, 5 Jul 2021 14:57:21 +0000 (16:57 +0200)]
virDomainObjListNew: `virHashNew` cannot return NULL
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Tim Wiederhake [Mon, 5 Jul 2021 14:56:09 +0000 (16:56 +0200)]
virDomainMomentObjListNew: `virHashNew` cannot return NULL
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Tim Wiederhake [Mon, 5 Jul 2021 14:55:37 +0000 (16:55 +0200)]
virDomainDefValidateAliases: `virHashNew` cannot return NULL
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Tim Wiederhake [Mon, 5 Jul 2021 14:54:01 +0000 (16:54 +0200)]
virDomainDefBootOrderPostParse: `virHashNew` cannot return NULL
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Tim Wiederhake [Mon, 5 Jul 2021 14:53:01 +0000 (16:53 +0200)]
virDomainCCWAddressSetCreate: `virHashNew` cannot return NULL
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Tim Wiederhake [Mon, 5 Jul 2021 14:52:11 +0000 (16:52 +0200)]
virCloseCallbacksNew: `virHashNew` cannot return NULL
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Tim Wiederhake [Mon, 5 Jul 2021 14:51:35 +0000 (16:51 +0200)]
virChrdevAlloc: `virHashNew` cannot return NULL
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Tim Wiederhake [Mon, 5 Jul 2021 13:56:00 +0000 (15:56 +0200)]
qemuInteropFetchConfigs: `virHashNew` cannot return NULL
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Tim Wiederhake [Mon, 5 Jul 2021 13:55:20 +0000 (15:55 +0200)]
qemuDomainObjPrivateAlloc: `virHashNew` cannot return NULL
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Tim Wiederhake [Mon, 5 Jul 2021 13:53:56 +0000 (15:53 +0200)]
qemuBlockNodeNameGetBackingChain: `virHashNew` cannot return NULL
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Tim Wiederhake [Mon, 5 Jul 2021 13:49:26 +0000 (15:49 +0200)]
qemuBlockNodeNamesDetect: `virHashNew` cannot return NULL
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Tim Wiederhake [Mon, 5 Jul 2021 13:47:52 +0000 (15:47 +0200)]
libxlLoggerNew: `virHashNew` cannot return NULL
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Tim Wiederhake [Mon, 5 Jul 2021 13:42:46 +0000 (15:42 +0200)]
qemusecuritymock: init_hash: `virHashNew` cannot return NULL
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Tim Wiederhake [Mon, 5 Jul 2021 13:41:27 +0000 (15:41 +0200)]
hypervCreateEmbeddedParam: `virHashNew` cannot return NULL
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Tim Wiederhake [Mon, 5 Jul 2021 13:40:33 +0000 (15:40 +0200)]
ebiptablesApplyNewRules: `virHashNew` cannot return NULL
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Tim Wiederhake [Tue, 6 Jul 2021 11:29:59 +0000 (13:29 +0200)]
virNWFilterRuleDefToRuleInst: `virHashNew` cannot return NULL
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Tim Wiederhake [Tue, 6 Jul 2021 11:43:28 +0000 (13:43 +0200)]
virNWFilterCreateVarsFrom: Remove superfluous `goto`s
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Tim Wiederhake [Tue, 6 Jul 2021 08:20:38 +0000 (10:20 +0200)]
virNWFilterCreateVarsFrom: Use automatic memory management
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Tim Wiederhake [Tue, 6 Jul 2021 08:20:07 +0000 (10:20 +0200)]
virNWFilterCreateVarsFrom: `virHashNew` cannot return NULL
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Tim Wiederhake [Tue, 6 Jul 2021 11:38:53 +0000 (13:38 +0200)]
virSystemdActivationNew: Remove superfluous `goto`s
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Tim Wiederhake [Tue, 6 Jul 2021 11:38:05 +0000 (13:38 +0200)]
virSystemdActivationNew: Use automatic memory management
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Tim Wiederhake [Tue, 6 Jul 2021 11:36:19 +0000 (13:36 +0200)]
virSystemdActivationNew: `virHashNew` cannot return NULL
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Tim Wiederhake [Tue, 6 Jul 2021 08:27:16 +0000 (10:27 +0200)]
virNWFilterLearnInit: `virHashNew` cannot return NULL
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Tim Wiederhake [Tue, 6 Jul 2021 08:26:21 +0000 (10:26 +0200)]
virNWFilterIPAddrMapInit: `virHashNew` cannot return NULL
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Tim Wiederhake [Tue, 6 Jul 2021 08:25:30 +0000 (10:25 +0200)]
virNWFilterDoInstantiate: `virHashNew` cannot return NULL
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Tim Wiederhake [Wed, 14 Jul 2021 09:11:01 +0000 (11:11 +0200)]
virNWFilterParseParamAttributes: Remove superfluous `goto`s
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Tim Wiederhake [Wed, 14 Jul 2021 09:08:50 +0000 (11:08 +0200)]
virNWFilterParseParamAttributes: Simplify loop body
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Tim Wiederhake [Wed, 14 Jul 2021 08:49:23 +0000 (10:49 +0200)]
virNWFilterParseParamAttributes: Use automatic memory management
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Tim Wiederhake [Wed, 14 Jul 2021 08:42:58 +0000 (10:42 +0200)]
virNWFilterParseParamAttributes: Remove tautological `if`
`cur` is guaranteed to be of type `XML_ELEMENT_NODE` by using
`xmlFirstElementChild()` and `xmlNextElementSibling()`.
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Tim Wiederhake [Tue, 6 Jul 2021 08:35:27 +0000 (10:35 +0200)]
virNWFilterParseParamAttributes: Iterate over "element" children
"xmlNextElementSibling()" skips attribute nodes, making the explicit
check for the type of `cur` redundant. This prepares for the removal
of this check in the next commit.
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Tim Wiederhake [Tue, 6 Jul 2021 08:30:34 +0000 (10:30 +0200)]
virNWFilterParseParamAttributes: `virHashNew` cannot return NULL
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Tim Wiederhake [Tue, 6 Jul 2021 09:09:56 +0000 (11:09 +0200)]
conf: Add AUTOPTR_CLEANUP_FUNC for virNWFilterVarValue
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Pavel Hrdina [Thu, 22 Jul 2021 19:00:50 +0000 (21:00 +0200)]
virsh: fix setmem flags logic
When we dropped virDomainSetMemory usage it got kind of tricky to
figure out the flags correctly.
Originally the logic was following:
no option | --current | --live | --config | --live --config
----------+-----------+--------+----------+----------------
LIVE | CURRENT | LIVE | CONFIG | LIVE & CONFIG
But after the commit removing virDomainSetMemory usage it changed to:
no option | --current | --live | --config | --live --config
----------+-----------+--------+-----------------+----------------
LIVE | CURRENT | LIVE | LIVE & CONFIG | LIVE & CONFIG
This commit fixes the logic back to the original behavior except for
ESX, HyperV and Virtuozzo drivers where virDomainSetMemory() default
behavior was CURRENT instead of LIVE.
Fixes: ce8138564bba0def7d7195814fba4555915d60d5
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=
1980199
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Justin Gatzen [Thu, 22 Jul 2021 06:58:45 +0000 (02:58 -0400)]
conf: Add grabToggle to evdev input
Add support for customizable grabToggle key combinations with
<input type='evdev'>.
Signed-off-by: Justin Gatzen <justin.gatzen@gmail.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Peter Krempa [Tue, 20 Jul 2021 10:25:46 +0000 (12:25 +0200)]
qemu: process: Extract code for submitting event handling to separate thread
The submission of the event to the helper thread has a verbose cleanup
path which was duplicated in all the event handlers. Simplify it by
extracting the code into a helper named 'qemuProcessEventSubmit' and
reuse it where appropriate.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Tue, 20 Jul 2021 08:05:06 +0000 (10:05 +0200)]
qemu: Remove return value from qemuMonitorDomainMemoryFailureCallback
Change the callback prototype and fix the callback registered in the
process code.
The removed error messages are impossible as the enum values are
converted via VIR_ENUM helpers and guarded by compiler checks.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Tue, 20 Jul 2021 08:05:06 +0000 (10:05 +0200)]
qemu: Remove return value from qemuMonitorDomainGuestCrashloadedCallback
Change the callback prototype and fix the callback registered in the
process code.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Tue, 20 Jul 2021 08:05:06 +0000 (10:05 +0200)]
qemu: Remove return value from qemuMonitorDomainRdmaGidStatusChangedCallback
Change the callback prototype and fix the callback registered in the
process code.
It is also impossible for @info to be non-NULL in the cleanup section so
the cleanup can be completely removed.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Tue, 20 Jul 2021 08:05:06 +0000 (10:05 +0200)]
qemu: Remove return value from qemuMonitorDomainPRManagerStatusChangedCallback
Change the callback prototype and fix the callback registered in the
process code.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Tue, 20 Jul 2021 08:05:06 +0000 (10:05 +0200)]
qemu: Remove return value from qemuMonitorDomainDumpCompletedCallback
Change the callback prototype and fix the callback registered in the
process code.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Tue, 20 Jul 2021 08:05:06 +0000 (10:05 +0200)]
qemu: Remove return value from qemuMonitorDomainBlockThresholdCallback
Change the callback prototype and fix the callback registered in the
process code.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Tue, 20 Jul 2021 08:05:06 +0000 (10:05 +0200)]
qemu: Remove return value from qemuMonitorDomainAcpiOstInfoCallback
Change the callback prototype and fix the callback registered in the
process code.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Tue, 20 Jul 2021 08:05:06 +0000 (10:05 +0200)]
qemu: Remove return value from qemuMonitorDomainMigrationPassCallback
Change the callback prototype and fix the callback registered in the
process code.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Tue, 20 Jul 2021 08:05:06 +0000 (10:05 +0200)]
qemu: Remove return value from qemuMonitorDomainMigrationStatusCallback
Change the callback prototype and fix the callback registered in the
process code.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Tue, 20 Jul 2021 08:05:06 +0000 (10:05 +0200)]
qemu: Remove return value from qemuMonitorDomainSpiceMigratedCallback
Change the callback prototype and fix the callback registered in the
process code.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Tue, 20 Jul 2021 08:05:06 +0000 (10:05 +0200)]
qemu: Remove return value from qemuMonitorDomainSerialChangeCallback
Change the callback prototype and fix the callback registered in the
process code.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Tue, 20 Jul 2021 08:05:06 +0000 (10:05 +0200)]
qemu: Remove return value from qemuMonitorDomainNicRxFilterChangedCallback
Change the callback prototype and fix the callback registered in the
process code.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Tue, 20 Jul 2021 08:05:06 +0000 (10:05 +0200)]
qemu: Remove return value from qemuMonitorDomainDeviceDeletedCallback
Change the callback prototype and fix the callback registered in the
process code.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Tue, 20 Jul 2021 08:05:06 +0000 (10:05 +0200)]
qemu: Remove return value from qemuMonitorDomainGuestPanicCallback
Change the callback prototype and fix the callback registered in the
process code.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Tue, 20 Jul 2021 08:05:06 +0000 (10:05 +0200)]
qemu: Remove return value from qemuMonitorDomainPMSuspendDiskCallback
Change the callback prototype and fix the callback registered in the
process code.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Tue, 20 Jul 2021 08:05:06 +0000 (10:05 +0200)]
qemu: Remove return value from qemuMonitorDomainBalloonChangeCallback
Change the callback prototype and fix the callback registered in the
process code.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Tue, 20 Jul 2021 08:05:06 +0000 (10:05 +0200)]
qemu: Remove return value from qemuMonitorDomainPMSuspendCallback
Change the callback prototype and fix the callback registered in the
process code.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Tue, 20 Jul 2021 08:05:06 +0000 (10:05 +0200)]
qemu: Remove return value from qemuMonitorDomainPMWakeupCallback
Change the callback prototype and fix the callback registered in the
process code.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Tue, 20 Jul 2021 08:05:06 +0000 (10:05 +0200)]
qemu: Remove return value from qemuMonitorDomainTrayChangeCallback
Change the callback prototype and fix the callback registered in the
process code.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Tue, 20 Jul 2021 08:05:06 +0000 (10:05 +0200)]
qemu: Remove return value from qemuMonitorDomainJobStatusChangeCallback
Change the callback prototype and fix the callback registered in the
process code.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Tue, 20 Jul 2021 08:05:06 +0000 (10:05 +0200)]
qemu: Remove return value from qemuMonitorDomainBlockJobCallback
Change the callback prototype and fix the callback registered in the
process code.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Tue, 20 Jul 2021 08:05:06 +0000 (10:05 +0200)]
qemu: Remove return value from qemuMonitorDomainGraphicsCallback
Change the callback prototype and fix the callback registered in the
process code.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Tue, 20 Jul 2021 08:05:06 +0000 (10:05 +0200)]
qemu: Remove return value from qemuMonitorDomainIOErrorCallback
Change the callback prototype and fix the callback registered in the
process code.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Tue, 20 Jul 2021 08:05:06 +0000 (10:05 +0200)]
qemu: Remove return value from qemuMonitorDomainWatchdogCallback
Change the callback prototype and fix the callback registered in the
process code.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Tue, 20 Jul 2021 08:05:06 +0000 (10:05 +0200)]
qemu: Remove return value from qemuMonitorDomainRTCChangeCallback
Change the callback prototype and fix the callback registered in the
process code.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Tue, 20 Jul 2021 08:05:06 +0000 (10:05 +0200)]
qemu: Remove return value from qemuMonitorDomainResumeCallback
Change the callback prototype and fix the callback registered in the
process code.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Tue, 20 Jul 2021 08:05:06 +0000 (10:05 +0200)]
qemu: Remove return value from qemuMonitorDomainStopCallback
Change the callback prototype and fix the callback registered in the
process code.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Tue, 20 Jul 2021 08:05:06 +0000 (10:05 +0200)]
qemu: Remove return value from qemuMonitorDomainResetCallback
Change the callback prototype and fix the callback registered in the
process code.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>