Commit Graph

8490 Commits

Author SHA1 Message Date
Andrea Bolognani
b645f0fcb4 qemu: Move capability checks for IOMMU features
All current IOMMU features are specific to Intel IOMMU, so
understandably we check for the corresponding capabilities
inside the Intel-specific switch() branch; however, we want
to make sure SMMUv3 IOMMU users get an error if they try to
enable any of those features in their guest, and performing
the capability checks unconditionally is both the easiest
way to achieve that, as well as the one least likely to
result in us inadvertently letting users enable some new
Intel-specific IOMMU feature for ARM guests later on.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2019-06-03 17:40:54 +02:00
Andrea Bolognani
fc660ae315 qemu: Add validation for SMMUv3 IOMMU
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2019-06-03 17:40:52 +02:00
Andrea Bolognani
60f4c41377 conf: Parse and format SMMUv3 IOMMU
SMMUv3 is an IOMMU implementation for ARM virt guests.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2019-06-03 17:40:48 +02:00
Andrea Bolognani
124eb803fc qemu: Introduce QEMU_CAPS_MACHINE_VIRT_IOMMU
This capability can be used to figure out whether the
QEMU binary at hand supports the machine type property
we need in order to enable SMMUv3 IOMMU support.

Unfortunately we can't avoid probing the RISC-V binaries
along with the ARM ones, since both architectures have
their own 'virt' machine type.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2019-06-03 17:40:45 +02:00
Andrea Bolognani
21bb887abc qemu: Move capability checks inside switch() statements
Current capability checks are specific to Intel IOMMU, so
we need to move them inside the switch() statement before
we can introduce more virDomainIOMMUModel values.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2019-06-03 17:40:43 +02:00
Andrea Bolognani
70cdf1b52e qemu: Move virBuffer inside switch() statement
This doesn't make a whole lot of difference now, but once
we introduce more virDomainIOMMUModel values the current
structure will no longer work.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2019-06-03 17:40:41 +02:00
Andrea Bolognani
711f8c3627 qemu: Use VIR_AUTOCLEAN() in qemuBuildIOMMUCommandLine()
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2019-06-03 17:40:39 +02:00
Andrea Bolognani
9775f48f84 qemu: Drop 'ret' from qemuBuildIOMMUCommandLine()
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2019-06-03 17:40:37 +02:00
Andrea Bolognani
dfa631b55a qemu: Fix switch() statements for virDomainIOMMUModel
Ensure unexpected values are dealt with correctly, that
is by invoking virReportEnumRangeError() and immediately
returning a negative value to the caller.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2019-06-03 17:40:24 +02:00
Martin Kletzander
c67a3c0fc3 qemu: Set emulator thread scheduler only after QEMU starts
If the scheduler is set before vCPU0 cannot be moved into its cpu,cpuacct
cgroup.  While it is not yet known whether this is a bug or not, it makes sense
for us to do that later as otherwise the scheduler would be inherited by vCPU
and I/O Threads even when they do not have any such setting specified.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
2019-05-27 16:05:23 +02:00
Michal Privoznik
c46bdad576 qemu: Get default hugepage size only if needed
Fixes: 6864d8f740

Hugepages don't work in session mode but when building memory
part of command line we query for the default size anyway. This
breaks creating domains under session daemon. Query the page size
only if it's clear we need hugepages.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
2019-05-27 14:51:39 +02:00
Andrea Bolognani
435330d084 qemu: Tweak Intel IOMMU command line generation
Mostly add comments explaining why there are two capabilites
for the same feature and how they interact.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2019-05-23 15:19:06 +02:00
Andrea Bolognani
a7a78c273e qemu: Introduce qemuDomainDeviceDefValidateIOMMU()
Device validation should not have to wait until command line
generation time. Moving the code to a separate function also
allows us to avoid some unnecessary repetition.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2019-05-23 15:19:01 +02:00
Peter Krempa
c74b898d4c qemu: monitor: Use VIR_AUTOPTR in qemuMonitorJSON(Drive/Blockdev)Mirror
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2019-05-21 14:22:07 +02:00
Peter Krempa
e90d51c4d0 qemu: monitor: Don't pass full flags to qemuMonitorJSONDriveMirror
Split out the 'shallow' and 'reuse' flags as booleans rather than passing
in flags and constructing them in irrelevant APIs.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2019-05-21 14:22:06 +02:00
Peter Krempa
6b155c41e9 qemu: monitor: Don't pass full flags to qemuMonitorJSONBlockdevMirror
Split out the 'shallow' flag as a boolean argument rather than passing
in flags and constructing them in irrelevant APIs.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2019-05-21 14:22:06 +02:00
Peter Krempa
c4043d1d6e qemu: migration: Don't pass around flags for different API
The NBD migration code uses drive/blockdev-mirror internally. In those
APIs we pass around flags for the monitor commands which are based on
the flags for the virDomainBlockRebase API. Since there's only one flag
which changes, pass it around explicitly rather than obscuring it in a
bitfield.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2019-05-21 14:22:06 +02:00
Peter Krempa
47d610e960 qemu: blockcopy: sanitize permission handling for 'mirror'
At the point when we want to modify the permissions for the 'mirror' we
know whether it is supposed to have a backing chain or no. Given that
mirror->backingStore is populated only when we'd need to touch it ayways
we can use qemuDomainStorageSourceChainAccessAllow even in place of
qemuDomainStorageSourceAccessAllow used for other cases to simplify the
code.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2019-05-21 14:22:06 +02:00
Peter Krempa
32ec5fee02 qemu: Simplify allowing access to storage file for block copy
One code path open-coded qemuDomainStorageSourceChainAccessAllow badly
and also did not integrate with the locking code.

Replace the separate calls with qemuDomainStorageSourceChainAccessAllow
which does everything internally.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2019-05-21 14:22:06 +02:00
Peter Krempa
56fe0d6d29 qemu: Validate backing store of 'mirror' for block copy
Since 4e797f1a we parse backingStore of mirror which will later be used
with blockdev. Add some validation for the user passed mirror at the
current point to make sure it's not used improperly.

Validate that it's not used without blockdev and also that it's not
passed when not requesting a shallow copy. Also add a chain terminator
for a deep copy since we know the resulting mirror will not have chain.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2019-05-21 14:22:06 +02:00
Peter Krempa
83c579d0ae qemu: Remove unnecessary calls to qemuDomainStorageSourceAccessRevoke
Since 3decae00e9 qemuDomainStorageSourceAccessAllow revokes the
permissions it granted if it fails halfway, thus we can remove some
calls to qemuDomainStorageSourceAccessRevoke which tried to undo this
situation.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2019-05-21 14:22:06 +02:00
Peter Krempa
8787032c5c qemu: Remove unecessary error keeping in qemuDomainBlockCopyCommon
Since 3decae00e9 qemuDomainStorageSourceAccessRevoke keeps the libvirt
error which was set prior to the call around even after the call, thus
we don't need to do the same when reverting access in the block copy
code.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2019-05-21 14:22:06 +02:00
Peter Krempa
e05d211f5b qemu: Modernize memory cleaning in qemuDomainBlockCommit
Use VIR_AUTOFREE and VIR_AUTOUNREF.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2019-05-21 14:22:06 +02:00
Peter Krempa
82b3f470c6 qemu: Modernize memory cleaning in qemuDomainBlockPullCommon
Use VIR_AUTOFREE and VIR_AUTOUNREF.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2019-05-21 14:22:06 +02:00
Peter Krempa
ddafae7a39 qemu: Modernize memory cleaning in qemuDomainBlockCopyCommon
Use VIR_AUTOFREE, VIR_AUTOUNREF, and VIR_STEAL_PTR.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2019-05-21 14:22:05 +02:00
Peter Krempa
019461facb qemu: driver: Set mirror state after successful command
When aborting or pivoting a block job we record which operation we do
for the mirror in the virDomainDiskDef structure. As everything is
synchronized by a job it's not necessary to modify the state prior to
calling the monitor and resetting the state on failure.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2019-05-21 14:22:05 +02:00
Peter Krempa
d41e1aa169 qemu: driver: Don't try to update blockjob status in qemuDomainGetBlockJobInfo
All blockjobs get their status updated by events from qemu, so this code
no longer makes sense.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2019-05-21 14:22:05 +02:00
Peter Krempa
acd71408b2 qemu: blockjob: Fix documentation for 'newstate' of _qemuBlockJobData
When used with the new job handler the values will also include some of
the non-public values from qemuBlockjobState. Modify the comment to
clarify this.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2019-05-21 14:22:05 +02:00
Peter Krempa
2234354f9e qemu: blockjob: Remove 'started' from struct _qemuBlockJobData
As of commit d1a44634ac this field is unused.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2019-05-21 14:22:05 +02:00
Michal Privoznik
da04eab953 Revert "qemu: Do not override config XML in case of snapshot revert"
This reverts commit dfd70ca1eb.

Pushed by a mistake, sorry. There's still some discussion going
on upstream.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
2019-05-20 14:19:44 +02:00
Han Han
a699b19f6c qemu: Add entry for balloon stats stat-htlb-pgalloc and stat-htlb-pgfail
Qemu added reporting of virtio balloon new statistics stat-htlb-pgalloc and
stat-htlb-pgfail since qemu-3.0 commit b7b12644297. The value of
stat-htlb-pgalloc represents the number of successful hugetlb page allocations
while stat-htlb-pgfail represents the number of failed ones. Add this
statistics reporting to libvirt.

To enable this feature for vm, guest kenel >= 4.17 is required because
the exporting hugetlb page allocation for virtio balloon is introduced
since 6c64fe7f.

Signed-off-by: Han Han <hhan@redhat.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
2019-05-20 11:18:25 +02:00
Maxiwell S. Garcia
dfd70ca1eb qemu: Do not override config XML in case of snapshot revert
Snapshot create operation saves the live XML and uses it to replace the
domain definition in case of revert. But the VM config XML is not saved
and the revert operation does not address this issue. This commit
prevents the config XML from being overridden by snapshot definition.

An active domain stores both current and new definitions. The current
definition (vm->def) stores the live XML and the new definition
(vm->newDef) stores the config XML. In an inactive domain, only the
config XML is persistent, and it's saved in vm->def.

The revert operation uses the virDomainObjAssignDef() to set the
snapshot definition in vm->newDef, if domain is active, or in vm->def
otherwise. But before that, it saves the old value to return to
caller. This return is used here to restore the config XML after
all snapshot startup process finish.

Signed-off-by: Maxiwell S. Garcia <maxiwell@linux.ibm.com>
2019-05-20 09:08:54 +02:00
Michal Privoznik
5cdd5d380b lib: Avoid double close when passing FDs with virCommandPassFD()
If an FD is passed into a child using:

  virCommandPassFD(cmd, fd, VIR_COMMAND_PASS_FD_CLOSE_PARENT);

then the parent should refrain from touching @fd thereafter. This
is even documented in virCommandPassFD() comment. The reason is
that either at virCommandRun()/virCommandRunAsync() or
virCommandFree() time the @fd will be closed. Closing it earlier,
e.g. right after virCommandPassFD() call might result in
undesired results. Another thread might open a file and receive
the same FD which is then unexpectedly closed by virCommandFree()
or virCommandRun().

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2019-05-17 16:01:11 +02:00
Andrea Bolognani
a251095e13 qemu: Only probe available machine types
Since we know the full list of machine types supported
by the QEMU binary when probing machine type properties,
we can save some work (and eventually test suite churn,
as more architecture-specific machine types need to be
probed) by only probing machines that we know exist.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2019-05-17 14:59:40 +02:00
Andrea Bolognani
d22c6221fc qemu: Probe canonicalized machine type
Now that we have the list of machine types available when
probing machine type properties, we can list properties for
the canonicalized version of the "pseries" machine type
instead of having to go through "spapr-machine", which we
know to be the parent type for all "pseries-*-machine"
types. By doing this, we'll be able to find even properties
that are only available from a certain versioned machine
type forward, and can't thus be obtained when looking at
the parent type only.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2019-05-17 14:59:34 +02:00
Andrea Bolognani
f3f9d8e376 qemu: Add -machine suffix automatically
The QOM type for machine types is the machine type name
followed by the -machine suffix. Since this is always the
case, we can make virQEMUCapsMachineProps more readable
and avoid repetition by not including the suffix there and
adding it automatically while processing the data; moreover,
when later on we will start figuring out which specific
versioned machine type to probe at runtime instead of doing
so statically, adding the suffix dynamically will become
necessary.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2019-05-17 14:59:31 +02:00
Andrea Bolognani
295a42e19f qemu: Move call to virQEMUCapsProbeQMPMachineProps()
We're going to need information about available machine types
when probing machine type properties soon, and that means we
have to change the order we call QMP commands.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2019-05-17 14:59:29 +02:00
Andrea Bolognani
4ad8d620cc qemu: Introduce virQEMUCapsProbeQMPMachineProps()
Up until now we've probed machine type properties, along with
properties for other types, in virQEMUCapsProbeQMPDevices(), but
soon we're going to need some logic that is specific to machine
types and as such wouldn't quite fit into that function.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2019-05-17 14:59:23 +02:00
Peter Krempa
4d8cc5a07a qemu: blockjob: Fix saving of inactive XML after completed legacy blockjob
Commit c257352797 introduced a logic bug where we will never save the
inactive XML after a blockjob as the variable which was determining
whether to do so is cleared right before. Thus even if we correctly
modify the inactive state it will be rolled back when libvirtd is
restarted.

Reported-by: Thomas Stein <hello@himbee.re>
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2019-05-17 13:25:06 +02:00
Christian Ehrhardt
2900575db8
qemu: do not define known no-op features
Qemu dropped cpu features for osxsave and ospke [1][2].
The reason for the instant removal is that those features were never
configurable as discussed in [3].

Fortunately the use cases adding those flags in the past are rare, but
they exist. One that I identified are e.g. older virt-install when used
with --cpu=host-model and there always could be the case of a user
adding it to the guest xml.

This triggers an issue like:
  qemu-system-x86_64: can't apply global Broadwell-noTSX-x86_64-
  cpu.osxsave=on: Property '.osxsave' not found

Ensure that this does no more break spawning newer qemu versions by
not rendering those features into the qemu command line.

Fixes: https://bugs.launchpad.net/fedora/+source/qemu/+bug/1825195
Resolves: https://bugzilla.redhat.com/1644848

[1]: https://git.qemu.org/?p=qemu.git;a=commit;h=f1a2352
[2]: https://git.qemu.org/?p=qemu.git;a=commit;h=9ccb978
[3]: https://www.mail-archive.com/qemu-devel@nongnu.org/msg561877.html

Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Tested-by: Daniel Henrique Barboza <danielhb413@gmail.com>
2019-05-15 09:32:52 +02:00
Michal Privoznik
b58a6b050e qemuDomainSnapshotCreateXML: Don't leak parsed snapshot definition
This function gets snapshot XML (provided by used) as an
argument. It parses it into a local variable @def and then sets
some more members (e.g. it creates a copy of live domain XML).
Then it proceeds to checking if snapshot XML is valid (e.g. it
contains as many disks as currently in the domain). If this fails
then the control jumps to endjob label and subsequently return
from the function. This is where AUTOFREE function for @def is
ran. Well, because the code says to run plain VIR_FREE() we leak
some memory because @def is actually an object and therefore
it should have been declared as AUTOUNREF.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
2019-05-14 16:42:59 +02:00
Eric Blake
9dd5bc151c qemu: Fix regression with undefine --snapshots-metadata
In refactoring the snapshot code to prepare for checkpoints, I changed
qemuDomainMomentDiscardAll to take a callback that would handle the
cleanup of either a snapshot or a checkpoint, but failed to set the
callback on one of the two snapshot callers.  As a result, 'virsh
undefine $dom --snapshots-metadata' crashed on a NULL function
dereference.

Fixes: a487890d37
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1707708
Signed-off-by: Eric Blake <eblake@redhat.com>
Acked-by: Peter Krempa <pkrempa@redhat.com>
2019-05-10 10:50:16 -05:00
Eric Blake
57387ff54b snapshot: Make virDomainSnapshotDef a virObject
This brings about a couple of benefits:
- use of VIR_AUTOUNREF() simplifies several callers
- Fixes a todo about virDomainMomentObjList not being polymorphic enough

Signed-off-by: Eric Blake <eblake@redhat.com>
Acked-by: Peter Krempa <pkrempa@redhat.com>
2019-05-09 10:02:53 -05:00
Eric Blake
098043eddd snapshot: s/current/parent/ as prep for virObject
VIR_CLASS_NEW insists that descendents of virObject have 'parent' as
the name of their inherited base class member at offset 0. While it
would be possible to write a new class-creation macro that takes the
actual field name 'current', and rewrite VIR_CLASS_NEW to call the new
macro with the hard-coded name 'parent', it seems less confusing if
all object code uses similar naming. Thus, this is a mechanical rename
in preparation of making virDomainSnapshotDef a descendent of
virObject.

Signed-off-by: Eric Blake <eblake@redhat.com>
Acked-by: Peter Krempa <pkrempa@redhat.com>
2019-05-09 09:48:07 -05:00
Eric Blake
36603bc568 snapshot: s/parent/parent_name/ as prep for virObject
VIR_CLASS_NEW insists that descendents of virObject have 'parent' as
the name of their inherited base class member at offset 0. While it
would be possible to write a new class-creation macro that takes the
actual field name, and rewrite VIR_CLASS_NEW to call the new macro
with the hard-coded name 'parent', so that we could make
virDomainMomentDef use a custom name for its base class, it seems less
confusing if all object code uses similar naming. Thus, this is a
mechanical rename in preparation of making virDomainSnapshotDef a
descendent of virObject, when we can no longer use 'parent' for a
different purpose than the base class.

Signed-off-by: Eric Blake <eblake@redhat.com>
Acked-by: Peter Krempa <pkrempa@redhat.com>
2019-05-09 09:43:41 -05:00
Peter Krempa
76b9aba2ba qemu: Refactor/simplify qemuDomainStorageSourceAccessAllow
Use qemuDomainStorageSourceAccessModify with correct flags to do the
job.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2019-05-09 15:55:36 +02:00
Peter Krempa
b1fe51c4ba qemu: Mark when modifying access to existing source in qemuDomainStorageSourceAccessModify
Some operations e.g. namespace setup are not necessary when modifying
access to a file which the VM can already access. Add a flag which
allows to skip them.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2019-05-09 15:55:36 +02:00
Peter Krempa
f50d1b7f49 qemu: Allow skipping the revoke step in qemuDomainStorageSourceAccessModify
In some cases when we need to modify access permissions for a storage
source which is already used by the VM we should not revoke all
permissions on a failure. Allow this in qemuDomainStorageSourceAccessModify
by adding a new flag.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2019-05-09 15:55:36 +02:00
Peter Krempa
657216b60d qemu: Use bools rather than labels in qemuDomainStorageSourceAccessModify
Rather than jumping to the correct label use a set of booleans to
determine which operation needs to be rolled back. This will allow more
flexibility when e.g. rollback after a failed operation will not be
necessary/desired.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2019-05-09 15:55:36 +02:00
Peter Krempa
3bb1423883 qemu: Allow forcing read-only mode in qemuDomainStorageSourceAccessModify
Add a new flag which will set the image as read-only even if the image
data allows writing.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2019-05-09 15:55:36 +02:00