On Fri, Aug 16, 2019 at 04:38:00PM +0200, Peter Krempa wrote:
We require that 'auto-read-only' is dynamic for posix-file
backeds this
backends. This
prevents problems with libvirt's usage of sVirt where we don't
grant
qemu permissions to write backing chain until it's needed.
write (to) the backing chain
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
src/qemu/qemu_capabilities.c | 3 +
.../caps_4.1.0.x86_64.xml | 1 +
.../controller-virtio-scsi.x86_64-latest.args | 35 +++--
.../disk-aio.x86_64-latest.args | 19 ++-
...-backing-chains-noindex.x86_64-latest.args | 145 +++++++++++++++---
.../disk-cache.x86_64-latest.args | 50 ++++--
.../disk-cdrom-network.x86_64-latest.args | 32 ++--
.../disk-cdrom-tray.x86_64-latest.args | 24 ++-
.../disk-cdrom.x86_64-latest.args | 21 +--
.../disk-copy_on_read.x86_64-latest.args | 19 ++-
.../disk-detect-zeroes.x86_64-latest.args | 17 +-
.../disk-error-policy.x86_64-latest.args | 30 ++--
.../disk-floppy-q35-2_11.x86_64-latest.args | 14 +-
.../disk-floppy-q35-2_9.x86_64-latest.args | 14 +-
.../disk-floppy.x86_64-latest.args | 21 ++-
.../disk-network-gluster.x86_64-latest.args | 32 ++--
.../disk-network-iscsi.x86_64-latest.args | 58 ++++---
.../disk-network-nbd.x86_64-latest.args | 41 +++--
.../disk-network-rbd.x86_64-latest.args | 67 +++++---
.../disk-network-sheepdog.x86_64-latest.args | 16 +-
...isk-network-source-auth.x86_64-latest.args | 30 ++--
.../disk-network-tlsx509.x86_64-latest.args | 64 +++++---
.../disk-readonly-disk.x86_64-latest.args | 14 +-
.../disk-scsi-device-auto.x86_64-latest.args | 14 +-
.../disk-scsi.x86_64-latest.args | 35 +++--
.../disk-shared.x86_64-latest.args | 36 +++--
...irtio-scsi-reservations.x86_64-latest.args | 20 ++-
.../floppy-drive-fat.x86_64-latest.args | 7 +-
...egl-headless-rendernode.x86_64-latest.args | 7 +-
.../graphics-egl-headless.x86_64-latest.args | 7 +-
...threads-virtio-scsi-pci.x86_64-latest.args | 25 ++-
...y-hotplug-nvdimm-access.x86_64-latest.args | 7 +-
...ry-hotplug-nvdimm-align.x86_64-latest.args | 7 +-
...ry-hotplug-nvdimm-label.x86_64-latest.args | 7 +-
...ory-hotplug-nvdimm-pmem.x86_64-latest.args | 7 +-
...hotplug-nvdimm-readonly.x86_64-latest.args | 7 +-
.../memory-hotplug-nvdimm.x86_64-latest.args | 7 +-
...eo-bochs-display-device.x86_64-latest.args | 10 +-
...virtio-non-transitional.x86_64-latest.args | 7 +-
.../virtio-transitional.x86_64-latest.args | 7 +-
.../x86_64-pc-graphics.x86_64-latest.args | 8 +-
.../x86_64-pc-headless.x86_64-latest.args | 8 +-
.../x86_64-q35-graphics.x86_64-latest.args | 8 +-
.../x86_64-q35-headless.x86_64-latest.args | 8 +-
44 files changed, 710 insertions(+), 306 deletions(-)
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index 83b1a12d14..0d5b8c3e4b 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -4445,6 +4445,9 @@ virQEMUCapsInitProcessCaps(virQEMUCapsPtr qemuCaps)
if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_CPU_UNAVAILABLE_FEATURES))
virQEMUCapsSet(qemuCaps, QEMU_CAPS_CANONICAL_CPU_FEATURES);
+ if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_BLOCK_FILE_AUTO_READONLY_DYNAMIC) &&
+ virQEMUCapsGet(qemuCaps, QEMU_CAPS_SCSI_DISK_DEVICE_ID))
+ virQEMUCapsSet(qemuCaps, QEMU_CAPS_BLOCKDEV);
}
Per the cover letter, this might actually require a version check.
Jano