Re: [PATCH v3 08/17] qemu: Support rng model=virtio-{non-}transitional

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

 



On Fri, 2019-02-08 at 17:11 -0500, Cole Robinson wrote:
[...]
> @@ -4553,6 +4553,11 @@ qemuDomainRNGDefValidate(const virDomainRNGDef *def,
>          modelIsSupported = virQEMUCapsGet(qemuCaps,
>                                            QEMU_CAPS_DEVICE_VIRTIO_RNG);
>          break;
> +    case VIR_DOMAIN_RNG_MODEL_VIRTIO_TRANSITIONAL:
> +    case VIR_DOMAIN_RNG_MODEL_VIRTIO_NON_TRANSITIONAL:
> +        modelIsSupported = (virQEMUCapsGet(qemuCaps, QEMU_CAPS_VIRTIO_PCI_NON_TRANSITIONAL) ||
> +                            virQEMUCapsGet(qemuCaps, QEMU_CAPS_VIRTIO_PCI_DISABLE_LEGACY));
> +        break;

You still need to make sure QEMU_CAPS_DEVICE_VIRTIO_RNG is present
when the model is virtio-(non-)transitional.

[...]
> @@ -884,7 +884,11 @@ qemuDomainDeviceCalculatePCIConnectFlags(virDomainDeviceDefPtr dev,
>      case VIR_DOMAIN_DEVICE_RNG:
>          switch ((virDomainRNGModel) dev->data.rng->model) {
>          case VIR_DOMAIN_RNG_MODEL_VIRTIO:
> +        case VIR_DOMAIN_RNG_MODEL_VIRTIO_NON_TRANSITIONAL:
>              return virtioFlags;
> +        case VIR_DOMAIN_RNG_MODEL_VIRTIO_TRANSITIONAL:
> +            /* Transitional devices only work in conventional PCI slots */
> +            return pciFlags;

Nit, but for other devices so far you've put the _TRANSITIONAL
case first, so please do the same here :)


With all of the above addressed,

  Reviewed-by: Andrea Bolognani <abologna@xxxxxxxxxx>

-- 
Andrea Bolognani / Red Hat / Virtualization


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux