We have been assuming its support if qemu supports -device, which all the supported versions do. --- src/qemu/qemu_capabilities.c | 11 +---------- src/qemu/qemu_capabilities.h | 2 +- tests/qemucapabilitiesdata/caps_1.2.2.x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_1.3.1.x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_1.4.2.x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_1.5.3.x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_1.6.0.x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_1.6.50.x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_2.1.1.x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_2.4.0.x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_2.5.0.x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_2.6.0-gicv2.aarch64.xml | 1 - tests/qemucapabilitiesdata/caps_2.6.0-gicv3.aarch64.xml | 1 - tests/qemucapabilitiesdata/caps_2.6.0.ppc64le.xml | 1 - tests/qemucapabilitiesdata/caps_2.6.0.x86_64.xml | 1 - tests/qemuhelptest.c | 8 -------- tests/qemuxml2argvtest.c | 9 +++------ 17 files changed, 5 insertions(+), 38 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 1e8450d..656162c 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 b6e0f8a..ed87b13 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 96a109b..724291b 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 @@ <flag name='boot-menu'/> <flag name='fsdev'/> <flag name='name-process'/> - <flag name='drive-readonly'/> <flag name='smbios-type'/> <flag name='vga-qxl'/> <flag name='spice'/> diff --git a/tests/qemucapabilitiesdata/caps_1.3.1.x86_64.xml b/tests/qemucapabilitiesdata/caps_1.3.1.x86_64.xml index 9646035..4eb66af 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 @@ <flag name='boot-menu'/> <flag name='fsdev'/> <flag name='name-process'/> - <flag name='drive-readonly'/> <flag name='smbios-type'/> <flag name='vga-qxl'/> <flag name='spice'/> diff --git a/tests/qemucapabilitiesdata/caps_1.4.2.x86_64.xml b/tests/qemucapabilitiesdata/caps_1.4.2.x86_64.xml index ee12473..72ea76f 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 @@ <flag name='boot-menu'/> <flag name='fsdev'/> <flag name='name-process'/> - <flag name='drive-readonly'/> <flag name='smbios-type'/> <flag name='vga-qxl'/> <flag name='spice'/> diff --git a/tests/qemucapabilitiesdata/caps_1.5.3.x86_64.xml b/tests/qemucapabilitiesdata/caps_1.5.3.x86_64.xml index 701d2ed..1702208 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 @@ <flag name='boot-menu'/> <flag name='fsdev'/> <flag name='name-process'/> - <flag name='drive-readonly'/> <flag name='smbios-type'/> <flag name='vga-qxl'/> <flag name='spice'/> diff --git a/tests/qemucapabilitiesdata/caps_1.6.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_1.6.0.x86_64.xml index fe05def..4e01f3f 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 @@ <flag name='boot-menu'/> <flag name='fsdev'/> <flag name='name-process'/> - <flag name='drive-readonly'/> <flag name='smbios-type'/> <flag name='vga-qxl'/> <flag name='spice'/> diff --git a/tests/qemucapabilitiesdata/caps_1.6.50.x86_64.xml b/tests/qemucapabilitiesdata/caps_1.6.50.x86_64.xml index a717308..2063f9f 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 @@ <flag name='boot-menu'/> <flag name='fsdev'/> <flag name='name-process'/> - <flag name='drive-readonly'/> <flag name='smbios-type'/> <flag name='vga-qxl'/> <flag name='spice'/> diff --git a/tests/qemucapabilitiesdata/caps_2.1.1.x86_64.xml b/tests/qemucapabilitiesdata/caps_2.1.1.x86_64.xml index 3570a63..954aa09 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 @@ <flag name='boot-menu'/> <flag name='fsdev'/> <flag name='name-process'/> - <flag name='drive-readonly'/> <flag name='smbios-type'/> <flag name='vga-qxl'/> <flag name='spice'/> diff --git a/tests/qemucapabilitiesdata/caps_2.4.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_2.4.0.x86_64.xml index 4850587..1361d32 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 @@ <flag name='boot-menu'/> <flag name='fsdev'/> <flag name='name-process'/> - <flag name='drive-readonly'/> <flag name='smbios-type'/> <flag name='vga-qxl'/> <flag name='spice'/> diff --git a/tests/qemucapabilitiesdata/caps_2.5.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_2.5.0.x86_64.xml index 3e490cd..a01e90a 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 @@ <flag name='boot-menu'/> <flag name='fsdev'/> <flag name='name-process'/> - <flag name='drive-readonly'/> <flag name='smbios-type'/> <flag name='vga-qxl'/> <flag name='spice'/> diff --git a/tests/qemucapabilitiesdata/caps_2.6.0-gicv2.aarch64.xml b/tests/qemucapabilitiesdata/caps_2.6.0-gicv2.aarch64.xml index ad81f24..5816993 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 @@ <flag name='boot-menu'/> <flag name='fsdev'/> <flag name='name-process'/> - <flag name='drive-readonly'/> <flag name='smbios-type'/> <flag name='vga-none'/> <flag name='boot-index'/> diff --git a/tests/qemucapabilitiesdata/caps_2.6.0-gicv3.aarch64.xml b/tests/qemucapabilitiesdata/caps_2.6.0-gicv3.aarch64.xml index ebffcaa..83a7817 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 @@ <flag name='boot-menu'/> <flag name='fsdev'/> <flag name='name-process'/> - <flag name='drive-readonly'/> <flag name='smbios-type'/> <flag name='vga-none'/> <flag name='boot-index'/> diff --git a/tests/qemucapabilitiesdata/caps_2.6.0.ppc64le.xml b/tests/qemucapabilitiesdata/caps_2.6.0.ppc64le.xml index 6768061..caa2ce3 100644 --- a/tests/qemucapabilitiesdata/caps_2.6.0.ppc64le.xml +++ b/tests/qemucapabilitiesdata/caps_2.6.0.ppc64le.xml @@ -18,7 +18,6 @@ <flag name='boot-menu'/> <flag name='fsdev'/> <flag name='name-process'/> - <flag name='drive-readonly'/> <flag name='smbios-type'/> <flag name='vga-none'/> <flag name='boot-index'/> diff --git a/tests/qemucapabilitiesdata/caps_2.6.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_2.6.0.x86_64.xml index 1773ce4..41675f1 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 @@ <flag name='boot-menu'/> <flag name='fsdev'/> <flag name='name-process'/> - <flag name='drive-readonly'/> <flag name='smbios-type'/> <flag name='vga-qxl'/> <flag name='spice'/> diff --git a/tests/qemuhelptest.c b/tests/qemuhelptest.c index f94f2d0..31fe871 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 3c52315..45b91f7 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", @@ -1644,7 +1641,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, -- 2.7.3 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list