Now that we assume all the virtio capabilities, this function does not check anything. Signed-off-by: Ján Tomko <jtomko@xxxxxxxxxx> --- src/qemu/qemu_validate.c | 54 +++------------------------------------- 1 file changed, 4 insertions(+), 50 deletions(-) diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c index b12a873bc8..a672450ddd 100644 --- a/src/qemu/qemu_validate.c +++ b/src/qemu/qemu_validate.c @@ -1769,17 +1769,6 @@ qemuValidateNetSupportsCoalesce(virDomainNetType type) } -static int -qemuValidateDomainVirtioOptions(const virDomainVirtioOptions *virtio, - virQEMUCaps *qemuCaps G_GNUC_UNUSED) -{ - if (!virtio) - return 0; - - return 0; -} - - /** * qemuValidateDomainDefVhostUserRequireSharedMemory: * @def: VM definition @@ -1970,9 +1959,6 @@ qemuValidateDomainDeviceDefNetwork(const virDomainNetDef *net, "QEMU binary")); return -1; } - - if (qemuValidateDomainVirtioOptions(net->virtio, qemuCaps) < 0) - return -1; } if (net->mtu && @@ -2391,9 +2377,6 @@ qemuValidateDomainRNGDef(const virDomainRNGDef *def, return -1; } - if (qemuValidateDomainVirtioOptions(def->virtio, qemuCaps) < 0) - return -1; - return 0; } @@ -2804,9 +2787,6 @@ qemuValidateDomainDeviceDefVideo(const virDomainVideoDef *video, } } - if (qemuValidateDomainVirtioOptions(video->virtio, qemuCaps) < 0) - return -1; - if (video->type == VIR_DOMAIN_VIDEO_TYPE_RAMFB && video->info.type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_NONE) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", @@ -3364,11 +3344,6 @@ qemuValidateDomainDeviceDefDisk(const virDomainDiskDef *disk, return -1; } - if (disk->bus == VIR_DOMAIN_DISK_BUS_VIRTIO && - qemuValidateDomainVirtioOptions(disk->virtio, qemuCaps) < 0) { - return -1; - } - if (disk->src->type == VIR_STORAGE_TYPE_VHOST_USER) { if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_VHOST_USER_BLK)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", @@ -3655,8 +3630,7 @@ virValidateControllerPCIModelNameToQEMUCaps(int modelName) static int -qemuValidateDomainDeviceDefControllerAttributes(const virDomainControllerDef *controller, - virQEMUCaps *qemuCaps) +qemuValidateDomainDeviceDefControllerAttributes(const virDomainControllerDef *controller) { if (!(controller->type == VIR_DOMAIN_CONTROLLER_TYPE_SCSI && (controller->model == VIR_DOMAIN_CONTROLLER_MODEL_SCSI_VIRTIO_SCSI || @@ -3687,13 +3661,6 @@ qemuValidateDomainDeviceDefControllerAttributes(const virDomainControllerDef *co _("'iothread' is only supported for virtio-scsi controller")); return -1; } - if (qemuValidateDomainVirtioOptions(controller->virtio, qemuCaps) < 0) - return -1; - } - - if (controller->type == VIR_DOMAIN_CONTROLLER_TYPE_VIRTIO_SERIAL && - qemuValidateDomainVirtioOptions(controller->virtio, qemuCaps) < 0) { - return -1; } return 0; @@ -4225,7 +4192,7 @@ qemuValidateDomainDeviceDefController(const virDomainControllerDef *controller, !qemuValidateCheckSCSIControllerModel(qemuCaps, controller->model)) return -1; - if (qemuValidateDomainDeviceDefControllerAttributes(controller, qemuCaps) < 0) + if (qemuValidateDomainDeviceDefControllerAttributes(controller) < 0) return -1; switch ((virDomainControllerType)controller->type) { @@ -4569,9 +4536,6 @@ qemuValidateDomainDeviceDefFS(virDomainFSDef *fs, return -1; } - if (qemuValidateDomainVirtioOptions(fs->virtio, qemuCaps) < 0) - return -1; - return 0; } @@ -4694,8 +4658,7 @@ qemuValidateDomainDeviceDefSound(virDomainSoundDef *sound, static int -qemuValidateDomainDeviceDefVsock(const virDomainVsockDef *vsock, - virQEMUCaps *qemuCaps) +qemuValidateDomainDeviceDefVsock(virQEMUCaps *qemuCaps) { if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_VHOST_VSOCK)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", @@ -4704,9 +4667,6 @@ qemuValidateDomainDeviceDefVsock(const virDomainVsockDef *vsock, return -1; } - if (qemuValidateDomainVirtioOptions(vsock->virtio, qemuCaps) < 0) - return -1; - return 0; } @@ -4881,9 +4841,6 @@ qemuValidateDomainDeviceDefInput(const virDomainInputDef *input, return -1; } - if (qemuValidateDomainVirtioOptions(input->virtio, qemuCaps) < 0) - return -1; - return 0; } @@ -4920,9 +4877,6 @@ qemuValidateDomainDeviceDefMemballoon(const virDomainMemballoonDef *memballoon, return -1; } - if (qemuValidateDomainVirtioOptions(memballoon->virtio, qemuCaps) < 0) - return -1; - return 0; } @@ -5256,7 +5210,7 @@ qemuValidateDomainDeviceDef(const virDomainDeviceDef *dev, qemuCaps); case VIR_DOMAIN_DEVICE_VSOCK: - return qemuValidateDomainDeviceDefVsock(dev->data.vsock, qemuCaps); + return qemuValidateDomainDeviceDefVsock(qemuCaps); case VIR_DOMAIN_DEVICE_TPM: return qemuValidateDomainDeviceDefTPM(dev->data.tpm, def, qemuCaps); -- 2.37.1