Avoid regressions by disallowing the BLOCKDEV capability.
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
src/qemu/qemu_capabilities.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index 290c8c2bdb..42a444a2f5 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -4331,6 +4331,11 @@ virQEMUCapsInitQMPMonitor(virQEMUCapsPtr qemuCaps,
virQEMUCapsClear(qemuCaps, QEMU_CAPS_SEV_GUEST);
}
+ /* To avoid guest ABI regression, blockdev shall be enabled only when
+ * we are able to pass the custom 'device_id' for SCSI disks and cdroms. */
+ if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_SCSI_DISK_DEVICE_ID))
+ virQEMUCapsClear(qemuCaps, QEMU_CAPS_BLOCKDEV);
+
ret = 0;
cleanup:
return ret;
--
2.20.1