]>
xenbits.xensource.com Git - libvirt.git/log
Ján Tomko [Thu, 11 Aug 2022 16:50:00 +0000 (18:50 +0200)]
qemu: always assume QEMU_CAPS_DUMP_GUEST_MEMORY
Introduced back in 2012 by QEMU commit:
commit
783e9b4826b95e53e33c42db6b4bd7d89bdff147
introduce a new monitor command 'dump-guest-memory' to dump guest's memory
Released in QEMU 1.2.0
Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Andrea Bolognani [Wed, 17 Aug 2022 13:41:57 +0000 (15:41 +0200)]
tests: Reset macOS dyld environment
This is needed to ensure the environment variables that we need
for the test program itself, specifically to load mock libraries,
do not interfere with any command that gets invoked by it, either
directly or indirectly. We already perform the same cleanup step
for LD_* variables.
This makes the test failures
error : virCommandWait:2752 : internal error: Child process
(/usr/libexec/qemu/vhost-user/test-vhost-user-gpu --print-capabilities)
unexpected fatal signal 6: dyld[8896]: symbol not found in flat
namespace '_virQEMUCapsGet'
error : qemuVhostUserFillDomainGPU:394 : operation failed: Unable to
find a satisfying vhost-user-gpu
that were showing up on macOS 12 go away.
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Andrea Bolognani [Wed, 17 Aug 2022 13:37:16 +0000 (15:37 +0200)]
util: Preserve macOS dyld environment by default
The DYLD_* environment variables on macOS have the same purpose
as the LD_* variables have on Linux. Since we're preserving the
latter by default, it makes sense to do the same for the former
as well.
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Jiri Denemark [Thu, 18 Aug 2022 14:13:45 +0000 (16:13 +0200)]
tests: Drop irrelevant CPU config from graphics-spice-timeout
Resolves: https://gitlab.com/libvirt/libvirt/-/issues/243
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
Michal Privoznik [Thu, 11 Aug 2022 18:57:02 +0000 (20:57 +0200)]
qemu_tpm: Don't crash if qemuTPMPcrBankBitmapToStr(NULL)
Historically, the tpm->data.emulator.activePcrBanks member was an
unsigned int but since it was used as a bitmap it was converted
to virBitmap type instead. Now, the virBitmap is allocated inside
of virDomainTPMDefParseXML() but only if <activePcrBanks/> was
found with at last one child element. Otherwise it stays NULL.
Fast forward to starting a domain with TPM 2.0 and no
<activePcrBanks/> configured. Eventually,
qemuTPMEmulatorBuildCommand() is called, which subsequently calls
qemuTPMEmulatorReconfigure() and finally
qemuTPMPcrBankBitmapToStr() passing the NULL value. Before
rewrite to virBitmap this function would return NULL for empty
activePcrBanks but now, well, now it crashes.
Fixes: 52c7c31c8038aa31d502f59a40e4fb4ba9f61113
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Martin Kletzander [Thu, 18 Aug 2022 13:43:13 +0000 (15:43 +0200)]
vmx: Fix leak in virVMXParseEthernet
Commit
580538c5dd7f forgot to free switchId.
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Amneesh Singh [Thu, 18 Aug 2022 03:17:20 +0000 (08:47 +0530)]
qemu_driver: use qemuMonitorQueryStats to extract halt poll time
This patch uses qemuMonitorQueryStats to query "halt_poll_success_ns"
and "halt_poll_fail_ns" for every vCPU. The respective values for each
vCPU are then added together.
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
Amneesh Singh [Thu, 18 Aug 2022 03:17:19 +0000 (08:47 +0530)]
qemu_capabilities: add "query-stats" QMP command to the QEMU capabilities
Related: https://gitlab.com/libvirt/libvirt/-/issues/276
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
Amneesh Singh [Thu, 18 Aug 2022 03:17:18 +0000 (08:47 +0530)]
qemu_monitor: add qemuMonitorQueryStats
Related: https://gitlab.com/libvirt/libvirt/-/issues/276
This patch adds an API for the "query-stats" QMP command.
The query returns a JSON containing the statistics based on the target,
which can either be vCPU or VM, and the providers. The API deserializes
the query result into an array of GHashMaps, which can later be used to
extract all the query statistics. GHashMaps are used to avoid traversing
the entire array to find the statistics you are looking for. This would
be a singleton array if the target is a VM since the returned JSON is
also a singleton array in that case.
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
Martin Kletzander [Thu, 18 Aug 2022 10:44:02 +0000 (12:44 +0200)]
news: Mention esx support for new interface types
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
Martin Kletzander [Wed, 17 Aug 2022 12:44:55 +0000 (14:44 +0200)]
vmx: Add support for VDS interface
Since we cannot properly plug a new VM into the distributed switch, we can at
least report the provided pieces of information, so that XML editing still works
even for VMs with such interfaces.
https://bugzilla.redhat.com/show_bug.cgi?id=
1988211
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Reviewed-by: Ján Tomko <jtomko@redhat.com>
Martin Kletzander [Wed, 17 Aug 2022 12:35:17 +0000 (14:35 +0200)]
conf, docs, schemas: Add support for interface type vds
This represents an interface connected to a VMWare Distributed Switch,
previously obscured as a dummy interface.
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Reviewed-by: Ján Tomko <jtomko@redhat.com>
Martin Kletzander [Tue, 9 Aug 2022 13:00:06 +0000 (15:00 +0200)]
vmx: Require networkName for bridged and custom NICs
Commit
70768cda9740 marked this particular config string optional, but
forgot that two of the interface types still require this name to
exist. Mark it as optional only if there is no connectionType.
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Reviewed-by: Ján Tomko <jtomko@redhat.com>
Martin Kletzander [Thu, 11 Aug 2022 12:59:09 +0000 (14:59 +0200)]
conf: Rewrite virNetDevVPortProfileCopy
This makes it nicer to use as since it cannot fail shortens the usage in all
callers.
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Reviewed-by: Ján Tomko <jtomko@redhat.com>
Martin Kletzander [Thu, 11 Aug 2022 13:16:36 +0000 (15:16 +0200)]
tests: Fix vmx/xml filenames
Commit
70768cda9740 added a functionality that was previously (in an unsubmitted
version of the commit) represented differently in the XML, but the filenames
kept the old name. Fix the name so they are not misleading.
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Reviewed-by: Ján Tomko <jtomko@redhat.com>
Lin Ma [Wed, 17 Aug 2022 08:19:42 +0000 (16:19 +0800)]
docs: Fix missing slashes in the maxphysaddr example
Signed-off-by: Lin Ma <lma@suse.com>
Reviewed-by: Jim Fehlig <jfehlig@suse.com>
Göran Uddeborg [Wed, 17 Aug 2022 08:19:11 +0000 (10:19 +0200)]
Translated using Weblate (Swedish)
Currently translated at 42.8% (4493 of 10480 strings)
Translation: libvirt/libvirt
Translate-URL: https://translate.fedoraproject.org/projects/libvirt/libvirt/sv/
Co-authored-by: Göran Uddeborg <goeran@uddeborg.se>
Signed-off-by: Göran Uddeborg <goeran@uddeborg.se>
Jim Fehlig [Thu, 11 Aug 2022 22:36:24 +0000 (16:36 -0600)]
schema: Add maxphysaddr element to hostcpu
The output of "virsh capabilities" was not conformant to the
capability.rng schema. Add the missing element to the schema.
Fixes: c647bf29afb9890c792172ecf7db2c9c27babbb6
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Signed-off-by: Jim Fehlig <jfehlig@suse.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Jim Fehlig [Thu, 11 Aug 2022 22:31:13 +0000 (16:31 -0600)]
schema: Don't enforce ordering of hostcpu capabilities elements
The change to caps-test.xml demonstrates the need for the change to
cputypes.rng.
Signed-off-by: Jim Fehlig <jfehlig@suse.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Jim Fehlig [Thu, 11 Aug 2022 22:13:36 +0000 (16:13 -0600)]
schema: Remove optional nesting in hostcpu rng
The hostcpu rng has an optional "model" element, with the remaining
elements each within a nested optional. Remove the optional nesting
and have each element explicitly listed as optional
Signed-off-by: Jim Fehlig <jfehlig@suse.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Göran Uddeborg [Mon, 15 Aug 2022 08:19:18 +0000 (10:19 +0200)]
Translated using Weblate (Swedish)
Currently translated at 42.4% (4453 of 10480 strings)
Translation: libvirt/libvirt
Translate-URL: https://translate.fedoraproject.org/projects/libvirt/libvirt/sv/
Co-authored-by: Göran Uddeborg <goeran@uddeborg.se>
Signed-off-by: Göran Uddeborg <goeran@uddeborg.se>
Jim Fehlig [Thu, 11 Aug 2022 17:21:11 +0000 (11:21 -0600)]
NEWS: Mention support for specifying vCPU address size
Signed-off-by: Jim Fehlig <jfehlig@suse.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Ján Tomko [Thu, 11 Aug 2022 13:34:59 +0000 (15:34 +0200)]
qemu: retire QEMU_CAPS_VIRTIO_TX_ALG
Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Jonathon Jongsma <jjongsma@redhat.com>
Ján Tomko [Thu, 11 Aug 2022 13:30:23 +0000 (15:30 +0200)]
qemu: always assume QEMU_CAPS_VIRTIO_TX_ALG
Introduced back in 2010 by QEMU commit:
commit
a697a334b3c4d3250e6420f5d38550ea10eb5319
virtio-net: Introduce a new bottom half packet TX
Released in QEMU 0.14.0
Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Jonathon Jongsma <jjongsma@redhat.com>
Ján Tomko [Thu, 11 Aug 2022 13:29:33 +0000 (15:29 +0200)]
tests: qemuxml2xmltest: remove interface from disk test
There is no need to specify an interface for a disk test.
Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Jonathon Jongsma <jjongsma@redhat.com>
Peter Krempa [Fri, 22 Jul 2022 09:47:36 +0000 (11:47 +0200)]
qemuDomainDetermineDiskChain: Remove 'report_broken' argument
All callers pass 'true'.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Fri, 22 Jul 2022 09:41:59 +0000 (11:41 +0200)]
qemu: Assume and retire QEMU_CAPS_BLOCKDEV_BACKUP
The blockdev-backup QMP command was introduced in qemu-2.3.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Fri, 22 Jul 2022 09:37:28 +0000 (11:37 +0200)]
qemu: Assume support and retire QEMU_CAPS_BLOCK_WRITE_THRESHOLD
The event was introduced in qemu-2.3
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Fri, 22 Jul 2022 09:34:59 +0000 (11:34 +0200)]
qemu: capabilities: Retire QEMU_CAPS_QUERY_NAMED_BLOCK_NODES
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Fri, 22 Jul 2022 09:29:54 +0000 (11:29 +0200)]
qemu: Setup disk throttling for SD cards via monitor
Set it same way we set throttling for other disks in
qemuProcessSetupDiskThrottling.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Thu, 21 Jul 2022 15:16:23 +0000 (17:16 +0200)]
qemu: Retire QEMU_CAPS_BLOCKDEV
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Thu, 21 Jul 2022 15:14:35 +0000 (17:14 +0200)]
qemuDomainDetermineDiskChain: Assume QEMU_CAPS_BLOCKDEV
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Thu, 21 Jul 2022 15:12:46 +0000 (17:12 +0200)]
qemuDomainValidateStorageSource: Remove 'maskBlockdev' argument
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Thu, 21 Jul 2022 15:07:38 +0000 (17:07 +0200)]
qemuDomainValidateStorageSource: Remove QEMU_CAPS_BLOCKDEV validation
While we assume that -blockdev is supported the validator had also some
corner cases for -drive. Since we use '-drive' exclusively for the
extremely rarely used SD cards it makes no sense to have the validation.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Thu, 21 Jul 2022 15:04:37 +0000 (17:04 +0200)]
qemuDomainDiskGetBackendAlias: Assume QEMU_CAPS_BLOCKDEV is supported
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Thu, 21 Jul 2022 14:58:50 +0000 (16:58 +0200)]
qemuDomainDiskBlockJobIsSupported: Assume QEMU_CAPS_BLOCKDEV is supported
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Thu, 21 Jul 2022 14:27:57 +0000 (16:27 +0200)]
qemuDomainSecretStorageSourcePrepare: Remove cabapbility check when preparing cookies
The capability is checked when we validate the source in the first
place. Also it won't make sense any more.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Thu, 21 Jul 2022 14:06:33 +0000 (16:06 +0200)]
qemu: domain: Assume QEMU_CAPS_BLOCKDEV for the domain private code
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Thu, 21 Jul 2022 13:28:23 +0000 (15:28 +0200)]
qemu: command: Remove unused qemuGetDriveSourceString
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Thu, 21 Jul 2022 13:25:24 +0000 (15:25 +0200)]
qemu: command: Generate -drive for SD cards via JSON props
Since we know we have a modern qemu at hand which can interpret the
dotted syntax, we can format the -drive needed for SD cards via the
common infrastructure we have for all blockdev stuff.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Thu, 21 Jul 2022 13:17:45 +0000 (15:17 +0200)]
qemu: command: Delegate qemuBuildDriveStr to SD cards only
Remove the generic frontend-less -drive code from qemuBuildDriveStr by
assuming that we support only blockdev-enabled qemus.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Thu, 21 Jul 2022 12:52:51 +0000 (14:52 +0200)]
qemu: monitor: Remove unused qemuMonitorAddDrive/qemuMonitorDriveDel
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Thu, 21 Jul 2022 12:51:08 +0000 (14:51 +0200)]
qemu: block: Remove support for legacy disk hotplug/unplug
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Thu, 21 Jul 2022 12:48:11 +0000 (14:48 +0200)]
qemu: Remove 'driveAlias' argument of qemuBlockStorageSourceDetachPrepare
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Thu, 21 Jul 2022 12:46:06 +0000 (14:46 +0200)]
qemu: block: Remove unused qemuBlockStorageSourceChainDetachPrepareLegacy
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Thu, 21 Jul 2022 12:15:51 +0000 (14:15 +0200)]
qemu: hotplug: Remove pre-blockdev code paths
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Thu, 21 Jul 2022 12:39:01 +0000 (14:39 +0200)]
qemuDomainRemoveDiskDevice: Remove special casing for disks on 'sd' bus
SD card disks can't be detached, so it makes no sense to special case
them in the unplug code.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Thu, 21 Jul 2022 12:33:06 +0000 (14:33 +0200)]
qemuhotplugtest: Switch to -blockdev mode
Enable blockdev mode and convert the expected commands to the modern
equivalents in preparation for removing the old-style hotplug code
paths.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Thu, 21 Jul 2022 11:10:56 +0000 (13:10 +0200)]
qemu: monitor: Remove unused qemuMonitor(Eject|Change)Media
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Thu, 21 Jul 2022 11:08:00 +0000 (13:08 +0200)]
qemu: hotplug: Remove pre-blockdev code path from qemuDomainChangeEjectableMedia
All media are changed in blockdev-instantiated cdroms now, remove the
old code.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Thu, 21 Jul 2022 11:06:00 +0000 (13:06 +0200)]
qemu: driver: Remove remaining QEMU_CAPS_BLOCKDEV capability checks
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Thu, 21 Jul 2022 11:03:53 +0000 (13:03 +0200)]
qemu: monitor: Remove unused qemuMonitorBlockStatsUpdateCapacity
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Thu, 21 Jul 2022 11:01:58 +0000 (13:01 +0200)]
qemuDomainBlocksStatsGather: Remove pre-blockdev code paths
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Thu, 21 Jul 2022 10:58:44 +0000 (12:58 +0200)]
qemuDomainBlockResize: Always refuse resize of empty/readonly disks
The operation makes no sense regardless of the way how we specify disks.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Wed, 20 Jul 2022 12:29:28 +0000 (14:29 +0200)]
qemu: Remove pre-blockdev PFLASH setup
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Wed, 20 Jul 2022 12:15:44 +0000 (14:15 +0200)]
qemu: command: Remove pre-blockdev floppy setup
With new qemu versions we setup floppies via -device.
Some legacy output tests were not modernized yet so the expected output
needs to be adjusted.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Wed, 20 Jul 2022 11:16:50 +0000 (13:16 +0200)]
qemu: monitor: Remove unused qemuMonitorDrivePivot
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Wed, 20 Jul 2022 11:09:21 +0000 (13:09 +0200)]
qemu: driver: Remove pre-blockdev code paths from qemuDomainBlockPivot
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Wed, 20 Jul 2022 10:42:14 +0000 (12:42 +0200)]
qemu: monitor: Remove unused qemuMonitorDiskNameLookup
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Wed, 20 Jul 2022 10:39:43 +0000 (12:39 +0200)]
qemu: monitor: Remove unused arguments of qemuMonitorBlockStream
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Wed, 20 Jul 2022 10:23:38 +0000 (12:23 +0200)]
qemu: driver: Remove pre-blockdev code paths from qemuDomainBlockPullCommon
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Wed, 20 Jul 2022 10:15:55 +0000 (12:15 +0200)]
qemu: monitor: Remove unused arguments of qemuMonitorBlockCommit
The 'persistjob' is always true and 'top' and 'base' are always NULL.
Adjust the functions to drop the arguments.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Wed, 20 Jul 2022 10:12:41 +0000 (12:12 +0200)]
qemu: driver: Remove pre-blockdev code paths from qemuDomainBlockCommit
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Wed, 20 Jul 2022 10:03:57 +0000 (12:03 +0200)]
qemu: monitor: Remove unused qemuMonitorDriveMirror
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Wed, 20 Jul 2022 10:01:14 +0000 (12:01 +0200)]
qemu: driver: Remove pre-blockdev code paths from qemuDomainBlockCopyCommon
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Wed, 20 Jul 2022 09:26:12 +0000 (11:26 +0200)]
qemu: monitor: Remove unused qemuMonitorQueryNamedBlockNodes and clean up
The top level API is unused so it can be removed but internally the JSON
version is called by other monitor commands which extract information
from the reply.
Thus qemuMonitorJSONQueryNamedBlockNodes is unexported and moved
appropriately.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Wed, 20 Jul 2022 09:20:47 +0000 (11:20 +0200)]
qemu: block: Remove unused qemuBlockGetNodeData
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Wed, 20 Jul 2022 09:19:05 +0000 (11:19 +0200)]
qemuDomainGetStatsBlock: Remove pre-blockdev code paths
This function and its callees were a bit more entangled so remove the
pre-blockdev code separately.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Wed, 20 Jul 2022 07:24:50 +0000 (09:24 +0200)]
qemu: alias: Remove check for QEMU_CAPS_BLOCKDEV
The only instance in this file can be simplified to avoid checking the
capability.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Wed, 20 Jul 2022 07:23:18 +0000 (09:23 +0200)]
qemu: blockjob: Remove pre-blockdev blockjob setup
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Tue, 19 Jul 2022 20:45:15 +0000 (22:45 +0200)]
qemu: block: Remove 'qemuBlockNodeNamesDetect' and related infrastructure
With blockdev we are generating the nodenames ourselves so all of this
infrastructure became obsolete. Remove it.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Tue, 19 Jul 2022 20:40:51 +0000 (22:40 +0200)]
qemuDomainSetBlockThreshold: Remove pre-blockdev node name detection
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Wed, 20 Jul 2022 08:56:55 +0000 (10:56 +0200)]
qemu: monitor: Remove infrastructure for BLOCK_JOB_* events
We no longer need it as we use the more modern job events.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Wed, 20 Jul 2022 08:55:02 +0000 (10:55 +0200)]
qemu: Remove legacy block job event processing handler
Previous patches removed the job submission for the handler so now even
the handler itself can be removed.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Tue, 19 Jul 2022 20:39:15 +0000 (22:39 +0200)]
qemu: blockjob: Remove legacy block job completion code
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Tue, 19 Jul 2022 19:21:54 +0000 (21:21 +0200)]
qemu: process: Remove pre-blockdev code paths
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Tue, 19 Jul 2022 19:10:33 +0000 (21:10 +0200)]
qemu: validate: Remove impossible validation checks
All supported qemu versions now work with blockdev.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Tue, 19 Jul 2022 19:09:23 +0000 (21:09 +0200)]
qemu: migration_cookie: Remove pre-blockdev code paths
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Tue, 19 Jul 2022 19:06:04 +0000 (21:06 +0200)]
qemu: block: Remove pre-blockdev code paths
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Tue, 19 Jul 2022 16:21:19 +0000 (18:21 +0200)]
qemu: Remove unused code for pre-blockdev disk snapshot monitor interaction
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Tue, 19 Jul 2022 16:17:59 +0000 (18:17 +0200)]
qemu: snapshot: Remove pre-blockdev code paths
Assume that QEMU_CAPS_BLOCKDEV is present and remove all code executed
when it's not.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Tue, 19 Jul 2022 16:09:43 +0000 (18:09 +0200)]
qemu: capabilities: Retire QEMU_CAPS_BLOCKDEV_DEL
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Tue, 19 Jul 2022 16:08:14 +0000 (18:08 +0200)]
qemu: migration: Assume support for QEMU_CAPS_BLOCKDEV_DEL
The migration code was using few blockdev bits before blockdev was
fully integrated to allow TLS with NBD.
Since we now always use blockdev we can remove the check.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Tue, 19 Jul 2022 16:06:01 +0000 (18:06 +0200)]
qemuMigrationSrcNBDStorageCopyBlockdev: Remove some arguments
We no longer need the arguments which were conditionally filled based on
presence of the QEMU_CAPS_BLOCKDEV feature.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Tue, 19 Jul 2022 16:02:34 +0000 (18:02 +0200)]
qemu: migration: Remove pre-blockdev code paths
Assume that QEMU_CAPS_BLOCKDEV is present and remove all code executed
when it's not.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Tue, 19 Jul 2022 13:45:22 +0000 (15:45 +0200)]
qemu: block: Remove legacy spellings for InetSocketAddress
In one of early iterations of the gluster driver 'tcp' was used instead
of 'inet' and 'socket' instead of 'path' for unix sockets. All of this
can be now removed.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Tue, 19 Jul 2022 12:07:03 +0000 (14:07 +0200)]
qemu: capabilities: Retire QEMU_CAPS_BLOCKDEV_HOSTDEV_SCSI
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Tue, 19 Jul 2022 11:04:16 +0000 (13:04 +0200)]
qemu: Remove code conditional on QEMU_CAPS_BLOCKDEV_HOSTDEV_SCSI
Now that QEMU_CAPS_BLOCKDEV_HOSTDEV_SCSI is always set we can remove the
code which handled cases when the capability was not set.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Mon, 18 Jul 2022 11:24:38 +0000 (13:24 +0200)]
qemu: capabilities: Retire capabilities used for -blockdev detection
Retire:
QEMU_CAPS_BLOCK_FILE_AUTO_READONLY_DYNAMIC
QEMU_CAPS_SCSI_DISK_DEVICE_ID
QEMU_CAPS_SAVEVM_MONITOR_NODES
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Mon, 18 Jul 2022 11:16:40 +0000 (13:16 +0200)]
qemu: command: Always assume support for QEMU_CAPS_SCSI_DISK_DEVICE_ID
The 'device_id' property of 'scsi_disk' was added in qemu-4.0 and it's
unconditionally present, thus we can now always assume its presence.
Update some fake-caps test which didn't yet assert the capability.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Wed, 20 Jul 2022 18:08:37 +0000 (20:08 +0200)]
qemu: Refactor access to 'qomName' field of the qemu disk private data
The code which fills 'qomName' does so only when the blockdev capability
is enabled so we don't have to check it separately as it can be only
non-NULL when blockdev is used.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Wed, 20 Jul 2022 13:37:19 +0000 (15:37 +0200)]
tests: Force QEMU_CAPS_BLOCKDEV(_HOSTDEV_SCSI) in fake caps tests
Until we finish removing the capabilities we need to force them in the
tests so that it's obvious that the code changes have no impact.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Fri, 15 Jul 2022 14:58:34 +0000 (16:58 +0200)]
qemu: capabilities: Unconditionally set QEMU_CAPS_BLOCKDEV/QEMU_CAPS_BLOCKDEV_HOSTDEV_SCSI
The cleanup of the code to always assume support for QEMU_CAPS_BLOCKDEV
will not be simple, so for now we hardcode the support and the code will
be cleaned up gradually.
We also disallow users to clear the flags via the namespace property or
qemu.conf configuration.
The change to the PPC64 test data originates from the fact that the
capability dump is not from the release version but is lacking one of
the necessary flags to enable -blockdev.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Fri, 15 Jul 2022 14:51:07 +0000 (16:51 +0200)]
qemu: capabilities: Retire QEMU_CAPS_QCOW2_LUKS
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Fri, 15 Jul 2022 14:49:59 +0000 (16:49 +0200)]
qemu: Always assume support for QEMU_CAPS_QCOW2_LUKS
luks-encrypted QCOW2 files were introduced in qemu-2.6 unconditionally.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Fri, 15 Jul 2022 14:35:27 +0000 (16:35 +0200)]
qemuxml2xmltest: Modernize all test cases using QEMU_CAPS_QCOW2_LUKS
Modernize 'disk-nvme', 'encrypted-disk-usage', 'encrypted-disk', and
'user-aliases' cases to use DO_TEST_CAPS_LATEST.
This will remove all uses of QEMU_CAPS_QCOW2_LUKS from the test suite.
Since the output files are done via symlinks to input files, the input
files need to be modernized with few auto-added XML bits.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Fri, 15 Jul 2022 14:48:22 +0000 (16:48 +0200)]
qemuxml2argvtest: Use DO_TEST_CAPS_LATEST for all 'user-aliases' tests
Modernize the tests as they mostly care that the aliases are properly
propagated to qemu.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Fri, 15 Jul 2022 14:28:50 +0000 (16:28 +0200)]
qemu: capabilities: Retire QEMU_CAPS_DRIVE_DISCARD and QEMU_CAPS_DRIVE_DETECT_ZEROES
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Fri, 15 Jul 2022 14:24:39 +0000 (16:24 +0200)]
qemu: Always assume support for QEMU_CAPS_DRIVE_DISCARD and QEMU_CAPS_DRIVE_DETECT_ZEROES
Discard and zero-detection for disk sources is supported since qemu-2.1
so we can always assume it's supported.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Peter Krempa [Fri, 15 Jul 2022 14:20:01 +0000 (16:20 +0200)]
qemu: capabilities: Retire QEMU_CAPS_GLUSTER_DEBUG_LEVEL
The debug level of gluster backend became configurable in qemu-2.8.
This also removes the only old-style syntax for the 'blockdev-add'
command prior to stabilization.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>