qemu: Always assume support for QEMU_CAPS_SCSI_DISK_WWN

The support for configuring the 'wwn' of a SCSI disk was added in qemu
commit 27395add759ff4caeb0 (v1.0-3326-g27395add75) and can't be compiled
out.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Peter Krempa 2023-07-18 15:47:56 +02:00
parent f276dbeefe
commit 5eed97e313
2 changed files with 1 additions and 19 deletions

View File

@ -2868,14 +2868,6 @@ qemuValidateDomainDeviceDefDiskFrontend(const virDomainDiskDef *disk,
"by this QEMU")); "by this QEMU"));
return -1; return -1;
} }
if (disk->bus != VIR_DOMAIN_DISK_BUS_SCSI &&
!virQEMUCapsGet(qemuCaps, QEMU_CAPS_SCSI_DISK_WWN)) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("Setting wwn for scsi disk is not supported "
"by this QEMU"));
return -1;
}
} }
if (disk->vendor || disk->product) { if (disk->vendor || disk->product) {
@ -2884,16 +2876,6 @@ qemuValidateDomainDeviceDefDiskFrontend(const virDomainDiskDef *disk,
_("Only scsi disk supports vendor and product")); _("Only scsi disk supports vendor and product"));
return -1; return -1;
} }
/* Properties wwn, vendor and product were introduced in the
* same QEMU release (1.2.0).
*/
if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_SCSI_DISK_WWN)) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("Setting vendor or product for scsi disk is not "
"supported by this QEMU"));
return -1;
}
} }
if (disk->device == VIR_DOMAIN_DISK_DEVICE_LUN) { if (disk->device == VIR_DOMAIN_DISK_DEVICE_LUN) {

View File

@ -593,7 +593,7 @@ mymain(void)
DO_TEST_NOCAPS("numad-static-vcpu-no-numatune"); DO_TEST_NOCAPS("numad-static-vcpu-no-numatune");
DO_TEST("disk-scsi-disk-vpd", DO_TEST("disk-scsi-disk-vpd",
QEMU_CAPS_SCSI_LSI, QEMU_CAPS_VIRTIO_SCSI, QEMU_CAPS_SCSI_DISK_WWN); QEMU_CAPS_SCSI_LSI, QEMU_CAPS_VIRTIO_SCSI);
DO_TEST_NOCAPS("disk-source-pool"); DO_TEST_NOCAPS("disk-source-pool");
DO_TEST_NOCAPS("disk-source-pool-mode"); DO_TEST_NOCAPS("disk-source-pool-mode");