On Fri, May 21, 2021 at 02:47:12PM +0200, Peter Krempa wrote:
> The "machine-loadparm-multiple-disks-nets-s390" case now requires the
> QEMU_CAPS_CCW feature to pass validation.
> 
> Signed-off-by: Peter Krempa <pkre...@redhat.com>
> ---
>  src/qemu/qemu_command.c  | 50 ----------------------------------------
>  src/qemu/qemu_validate.c | 49 +++++++++++++++++++++++++++++++++++++++
>  tests/qemuxml2xmltest.c  |  2 +-
>  3 files changed, 50 insertions(+), 51 deletions(-)
> 
> diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
> index 200f9a04b1..9c32fd16b5 100644
> --- a/src/qemu/qemu_command.c
> +++ b/src/qemu/qemu_command.c
> @@ -1583,50 +1583,6 @@ qemuBuildDriveStr(virDomainDiskDef *disk,
>  }
> 
> 
> -static bool
> -qemuCheckIOThreads(const virDomainDef *def,
> -                   virDomainDiskDef *disk)
> -{
> -    /* Right "type" of disk" */
> -    switch ((virDomainDiskBus)disk->bus) {
> -    case VIR_DOMAIN_DISK_BUS_VIRTIO:
> -        if (disk->info.type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI &&
> -            disk->info.type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_CCW) {
> -            virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
> -                            _("IOThreads only available for virtio pci and "
> -                              "virtio ccw disk"));
> -            return false;
> -        }
> -        break;
> -
> -    case VIR_DOMAIN_DISK_BUS_IDE:
> -    case VIR_DOMAIN_DISK_BUS_FDC:
> -    case VIR_DOMAIN_DISK_BUS_SCSI:
> -    case VIR_DOMAIN_DISK_BUS_XEN:
> -    case VIR_DOMAIN_DISK_BUS_USB:
> -    case VIR_DOMAIN_DISK_BUS_UML:
> -    case VIR_DOMAIN_DISK_BUS_SATA:
> -    case VIR_DOMAIN_DISK_BUS_SD:
> -    case VIR_DOMAIN_DISK_BUS_NONE:
> -    case VIR_DOMAIN_DISK_BUS_LAST:
> -        virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
> -                       _("IOThreads not available for bus %s target %s"),
> -                       virDomainDiskBusTypeToString(disk->bus), disk->dst);
> -        return false;
> -    }
> -
> -    /* Can we find the disk iothread in the iothreadid list? */
> -    if (!virDomainIOThreadIDFind(def, disk->iothread)) {
> -        virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
> -                       _("Disk iothread '%u' not defined in iothreadid"),
> -                       disk->iothread);
> -        return false;
> -    }
> -
> -    return true;
> -}
> -
> -
>  static int
>  qemuBuildDriveDevCacheStr(virDomainDiskDef *disk,
>                            virBuffer *buf,
> @@ -1668,12 +1624,6 @@ qemuBuildDiskDeviceStr(const virDomainDef *def,
>      g_autofree char *scsiVPDDeviceId = NULL;
>      int controllerModel;
> 
> -    if (!qemuDomainCheckCCWS390AddressSupport(def, &disk->info, qemuCaps, 
> disk->dst))
> -        return NULL;
> -
> -    if (disk->iothread && !qemuCheckIOThreads(def, disk))
> -        return NULL;
> -
>      switch ((virDomainDiskBus) disk->bus) {
>      case VIR_DOMAIN_DISK_BUS_IDE:
>          if (disk->device == VIR_DOMAIN_DISK_DEVICE_CDROM)
> diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c
> index e6ddb43113..9c74092f23 100644
> --- a/src/qemu/qemu_validate.c
> +++ b/src/qemu/qemu_validate.c
> @@ -2404,6 +2404,50 @@ qemuValidateDomainDeviceDefDiskSerial(const char 
> *value)
>  }
> 
> 
> +static bool
> +qemuvalidateDomainDeviceDefDiskIOThreads(const virDomainDef *def,

s/qemuvalidate/qemuValidate/

Pavel

Attachment: signature.asc
Description: PGP signature

Reply via email to