diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index 1e8450d3b7..656162cc14 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -1134,8 +1134,6 @@ virQEMUCapsComputeCmdFlags(const char *help,
if (memmem(cache, p - cache, "unsafe", sizeof("unsafe") - 1))
virQEMUCapsSet(qemuCaps, QEMU_CAPS_DRIVE_CACHE_UNSAFE);
}
- if (strstr(help, "readonly="))
- virQEMUCapsSet(qemuCaps, QEMU_CAPS_DRIVE_READONLY);
if (strstr(help, "aio=threads|native"))
virQEMUCapsSet(qemuCaps, QEMU_CAPS_DRIVE_AIO);
if (strstr(help, "copy-on-read=on|off"))
@@ -1173,14 +1171,8 @@ virQEMUCapsComputeCmdFlags(const char *help,
if (strstr(help, "-chardev spiceport"))
virQEMUCapsSet(qemuCaps, QEMU_CAPS_CHARDEV_SPICEPORT);
}
- if (strstr(help, "-device")) {
+ if (strstr(help, "-device"))
virQEMUCapsSet(qemuCaps, QEMU_CAPS_DEVICE);
- /*
- * When -device was introduced, qemu already supported drive's
- * readonly option but didn't advertise that.
- */
- virQEMUCapsSet(qemuCaps, QEMU_CAPS_DRIVE_READONLY);
- }
if (strstr(help, "-nodefconfig"))
virQEMUCapsSet(qemuCaps, QEMU_CAPS_NODEFCONFIG);
if (strstr(help, "-no-user-config"))
@@ -3392,7 +3384,6 @@ virQEMUCapsInitQMPBasic(virQEMUCapsPtr qemuCaps)
virQEMUCapsSet(qemuCaps, QEMU_CAPS_BOOT_MENU);
virQEMUCapsSet(qemuCaps, QEMU_CAPS_FSDEV);
virQEMUCapsSet(qemuCaps, QEMU_CAPS_NAME_PROCESS);
- virQEMUCapsSet(qemuCaps, QEMU_CAPS_DRIVE_READONLY);
virQEMUCapsSet(qemuCaps, QEMU_CAPS_SMBIOS_TYPE);
virQEMUCapsSet(qemuCaps, QEMU_CAPS_VGA_NONE);
virQEMUCapsSet(qemuCaps, QEMU_CAPS_DRIVE_AIO);
diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h
index b6e0f8ad77..ed87b131b7 100644
--- a/src/qemu/qemu_capabilities.h
+++ b/src/qemu/qemu_capabilities.h
@@ -105,7 +105,7 @@ typedef enum {
QEMU_CAPS_FSDEV, /* -fstype filesystem passthrough */
QEMU_CAPS_NESTING, /* -enable-nesting (SVM/VMX) */
QEMU_CAPS_NAME_PROCESS, /* Is -name process= available */
- QEMU_CAPS_DRIVE_READONLY, /* -drive readonly=on|off */
+ X_QEMU_CAPS_DRIVE_READONLY, /* -drive readonly=on|off */
QEMU_CAPS_SMBIOS_TYPE, /* Is -smbios type= available */
/* 45 */
diff --git a/tests/qemucapabilitiesdata/caps_1.2.2.x86_64.xml b/tests/qemucapabilitiesdata/caps_1.2.2.x86_64.xml
index 96a109b53c..724291b9f9 100644
--- a/tests/qemucapabilitiesdata/caps_1.2.2.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_1.2.2.x86_64.xml
@@ -20,7 +20,6 @@
-
diff --git a/tests/qemucapabilitiesdata/caps_1.3.1.x86_64.xml b/tests/qemucapabilitiesdata/caps_1.3.1.x86_64.xml
index 96460355b2..4eb66af516 100644
--- a/tests/qemucapabilitiesdata/caps_1.3.1.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_1.3.1.x86_64.xml
@@ -21,7 +21,6 @@
-
diff --git a/tests/qemucapabilitiesdata/caps_1.4.2.x86_64.xml b/tests/qemucapabilitiesdata/caps_1.4.2.x86_64.xml
index ee124735e7..72ea76f2ee 100644
--- a/tests/qemucapabilitiesdata/caps_1.4.2.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_1.4.2.x86_64.xml
@@ -21,7 +21,6 @@
-
diff --git a/tests/qemucapabilitiesdata/caps_1.5.3.x86_64.xml b/tests/qemucapabilitiesdata/caps_1.5.3.x86_64.xml
index 701d2ed707..1702208c3c 100644
--- a/tests/qemucapabilitiesdata/caps_1.5.3.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_1.5.3.x86_64.xml
@@ -21,7 +21,6 @@
-
diff --git a/tests/qemucapabilitiesdata/caps_1.6.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_1.6.0.x86_64.xml
index fe05deff0a..4e01f3f0f8 100644
--- a/tests/qemucapabilitiesdata/caps_1.6.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_1.6.0.x86_64.xml
@@ -21,7 +21,6 @@
-
diff --git a/tests/qemucapabilitiesdata/caps_1.6.50.x86_64.xml b/tests/qemucapabilitiesdata/caps_1.6.50.x86_64.xml
index a7173082c5..2063f9ff57 100644
--- a/tests/qemucapabilitiesdata/caps_1.6.50.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_1.6.50.x86_64.xml
@@ -21,7 +21,6 @@
-
diff --git a/tests/qemucapabilitiesdata/caps_2.1.1.x86_64.xml b/tests/qemucapabilitiesdata/caps_2.1.1.x86_64.xml
index 3570a630aa..954aa09c05 100644
--- a/tests/qemucapabilitiesdata/caps_2.1.1.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.1.1.x86_64.xml
@@ -21,7 +21,6 @@
-
diff --git a/tests/qemucapabilitiesdata/caps_2.4.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_2.4.0.x86_64.xml
index 4850587555..1361d32eae 100644
--- a/tests/qemucapabilitiesdata/caps_2.4.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.4.0.x86_64.xml
@@ -21,7 +21,6 @@
-
diff --git a/tests/qemucapabilitiesdata/caps_2.5.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_2.5.0.x86_64.xml
index 3e490cd456..a01e90ace6 100644
--- a/tests/qemucapabilitiesdata/caps_2.5.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.5.0.x86_64.xml
@@ -21,7 +21,6 @@
-
diff --git a/tests/qemucapabilitiesdata/caps_2.6.0-gicv2.aarch64.xml b/tests/qemucapabilitiesdata/caps_2.6.0-gicv2.aarch64.xml
index ad81f240c1..5816993460 100644
--- a/tests/qemucapabilitiesdata/caps_2.6.0-gicv2.aarch64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.6.0-gicv2.aarch64.xml
@@ -18,7 +18,6 @@
-
diff --git a/tests/qemucapabilitiesdata/caps_2.6.0-gicv3.aarch64.xml b/tests/qemucapabilitiesdata/caps_2.6.0-gicv3.aarch64.xml
index ebffcaaa4d..83a7817011 100644
--- a/tests/qemucapabilitiesdata/caps_2.6.0-gicv3.aarch64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.6.0-gicv3.aarch64.xml
@@ -18,7 +18,6 @@
-
diff --git a/tests/qemucapabilitiesdata/caps_2.6.0.ppc64le.xml b/tests/qemucapabilitiesdata/caps_2.6.0.ppc64le.xml
index 6768061ae0..caa2ce3106 100644
--- a/tests/qemucapabilitiesdata/caps_2.6.0.ppc64le.xml
+++ b/tests/qemucapabilitiesdata/caps_2.6.0.ppc64le.xml
@@ -18,7 +18,6 @@
-
diff --git a/tests/qemucapabilitiesdata/caps_2.6.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_2.6.0.x86_64.xml
index 1773ce490b..41675f1f93 100644
--- a/tests/qemucapabilitiesdata/caps_2.6.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.6.0.x86_64.xml
@@ -21,7 +21,6 @@
-
diff --git a/tests/qemuhelptest.c b/tests/qemuhelptest.c
index f94f2d082f..31fe871c56 100644
--- a/tests/qemuhelptest.c
+++ b/tests/qemuhelptest.c
@@ -153,7 +153,6 @@ mymain(void)
DO_TEST("qemu-0.12.1", 12001, 0, 0,
QEMU_CAPS_DRIVE_SERIAL,
- QEMU_CAPS_DRIVE_READONLY,
QEMU_CAPS_ENABLE_KVM,
QEMU_CAPS_SDL,
QEMU_CAPS_CHARDEV,
@@ -173,7 +172,6 @@ mymain(void)
QEMU_CAPS_DRIVE_BOOT,
QEMU_CAPS_KVM,
QEMU_CAPS_DRIVE_SERIAL,
- QEMU_CAPS_DRIVE_READONLY,
QEMU_CAPS_PCIDEVICE,
QEMU_CAPS_MEM_PATH,
QEMU_CAPS_CHARDEV,
@@ -218,7 +216,6 @@ mymain(void)
QEMU_CAPS_DRIVE_BOOT,
QEMU_CAPS_KVM,
QEMU_CAPS_DRIVE_SERIAL,
- QEMU_CAPS_DRIVE_READONLY,
QEMU_CAPS_PCIDEVICE,
QEMU_CAPS_MEM_PATH,
QEMU_CAPS_SDL,
@@ -244,7 +241,6 @@ mymain(void)
QEMU_CAPS_DRIVE_CACHE_UNSAFE,
QEMU_CAPS_KVM,
QEMU_CAPS_DRIVE_SERIAL,
- QEMU_CAPS_DRIVE_READONLY,
QEMU_CAPS_PCIDEVICE,
QEMU_CAPS_MEM_PATH,
QEMU_CAPS_SDL,
@@ -299,7 +295,6 @@ mymain(void)
QEMU_CAPS_DRIVE_CACHE_UNSAFE,
QEMU_CAPS_KVM,
QEMU_CAPS_DRIVE_SERIAL,
- QEMU_CAPS_DRIVE_READONLY,
QEMU_CAPS_PCIDEVICE,
QEMU_CAPS_MEM_PATH,
QEMU_CAPS_CHARDEV,
@@ -351,7 +346,6 @@ mymain(void)
QEMU_CAPS_DRIVE_CACHE_UNSAFE,
QEMU_CAPS_KVM,
QEMU_CAPS_DRIVE_SERIAL,
- QEMU_CAPS_DRIVE_READONLY,
QEMU_CAPS_PCIDEVICE,
QEMU_CAPS_MEM_PATH,
QEMU_CAPS_CHARDEV,
@@ -410,7 +404,6 @@ mymain(void)
DO_TEST("qemu-1.0", 1000000, 0, 0,
QEMU_CAPS_DRIVE_CACHE_UNSAFE,
QEMU_CAPS_DRIVE_SERIAL,
- QEMU_CAPS_DRIVE_READONLY,
QEMU_CAPS_MEM_PATH,
QEMU_CAPS_SDL,
QEMU_CAPS_CHARDEV,
@@ -485,7 +478,6 @@ mymain(void)
DO_TEST("qemu-1.1.0", 1001000, 0, 0,
QEMU_CAPS_DRIVE_CACHE_UNSAFE,
QEMU_CAPS_DRIVE_SERIAL,
- QEMU_CAPS_DRIVE_READONLY,
QEMU_CAPS_MEM_PATH,
QEMU_CAPS_SDL,
QEMU_CAPS_CHARDEV,
diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
index 67218a1156..9194d8994f 100644
--- a/tests/qemuxml2argvtest.c
+++ b/tests/qemuxml2argvtest.c
@@ -300,7 +300,6 @@ static int testCompareXMLToArgvFiles(const char *xml,
virQEMUCapsSetList(extraFlags,
QEMU_CAPS_NO_ACPI,
QEMU_CAPS_DEVICE,
- QEMU_CAPS_DRIVE_READONLY,
QEMU_CAPS_LAST);
if (STREQ(vm->def->os.machine, "pc") &&
@@ -661,8 +660,7 @@ mymain(void)
DO_TEST_FAILURE("reboot-timeout-enabled", NONE);
DO_TEST("bios", QEMU_CAPS_SGA);
- DO_TEST("bios-nvram",
- QEMU_CAPS_DRIVE_READONLY);
+ DO_TEST("bios-nvram", NONE);
DO_TEST("clock-utc", QEMU_CAPS_NODEFCONFIG);
DO_TEST("clock-localtime", NONE);
DO_TEST("clock-localtime-basis-localtime", QEMU_CAPS_RTC);
@@ -760,10 +758,9 @@ mymain(void)
DO_TEST("floppy-drive-fat",
QEMU_CAPS_DRIVE_BOOT);
DO_TEST("disk-drive-readonly-disk",
- QEMU_CAPS_DRIVE_READONLY,
QEMU_CAPS_NODEFCONFIG);
DO_TEST("disk-drive-readonly-no-device",
- QEMU_CAPS_DRIVE_READONLY, QEMU_CAPS_NODEFCONFIG);
+ QEMU_CAPS_NODEFCONFIG);
DO_TEST("disk-drive-fmt-qcow",
QEMU_CAPS_DRIVE_BOOT);
DO_TEST("disk-drive-shared",
@@ -1647,7 +1644,7 @@ mymain(void)
QEMU_CAPS_VIRTIO_SCSI, QEMU_CAPS_VIRTIO_SCSI,
QEMU_CAPS_DEVICE_SCSI_GENERIC);
DO_TEST("hostdev-scsi-readonly",
- QEMU_CAPS_DRIVE_READONLY, QEMU_CAPS_VIRTIO_SCSI,
+ QEMU_CAPS_VIRTIO_SCSI,
QEMU_CAPS_VIRTIO_SCSI, QEMU_CAPS_DEVICE_SCSI_GENERIC);
DO_TEST("hostdev-scsi-virtio-scsi",
QEMU_CAPS_VIRTIO_SCSI, QEMU_CAPS_VIRTIO_SCSI,