[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH v2 23/25] qemu: Support virtio-serial controller model=virtio-{non-}transitional



On Wed, 2019-01-23 at 16:32 -0500, Cole Robinson wrote:
[...]
> @@ -525,11 +525,21 @@ qemuBuildVirtioDevStr(virBufferPtr buf,
>              ntmodel_cap = QEMU_CAPS_DEVICE_VIRTIO_INPUT_HOST_PCI_NON_TRANSITIONAL;
>              break;
>  
> +        case VIR_DOMAIN_DEVICE_CONTROLLER:
> +            if (device.data.controller->type == VIR_DOMAIN_CONTROLLER_TYPE_VIRTIO_SERIAL) {
> +                has_tmodel = device.data.controller->model == VIR_DOMAIN_CONTROLLER_MODEL_VIRTIO_SERIAL_VIRTIO_TRANSITIONAL;
> +                has_ntmodel = device.data.controller->model == VIR_DOMAIN_CONTROLLER_MODEL_VIRTIO_SERIAL_VIRTIO_NON_TRANSITIONAL;
> +                tmodel_cap = QEMU_CAPS_DEVICE_VIRTIO_SERIAL_PCI_TRANSITIONAL;
> +                ntmodel_cap = QEMU_CAPS_DEVICE_VIRTIO_SERIAL_PCI_NON_TRANSITIONAL;
> +            } else {
> +                return 0;
> +            }

Please invert this, same as for hostdevs and input devices, so that
it looks like

  case VIR_DOMAIN_DEVICE_CONTROLLER:
      if (device.data.controller->type == VIR_DOMAIN_CONTROLLER_TYPE_VIRTIO_SERIAL)
          return 0;
      ...

With that addressed, and of course with the usual caveats around
formatting model='virtio',

  Reviewed-by: Andrea Bolognani <abologna redhat com>

-- 
Andrea Bolognani / Red Hat / Virtualization


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]