[libvirt] [PATCH 14/18] conf: Add <input model='virtio-{non-}transitional'/>

Andrea Bolognani abologna at redhat.com
Mon Jan 21 16:16:44 UTC 2019


On Thu, 2019-01-17 at 12:52 -0500, Cole Robinson wrote:
[...]
> +VIR_ENUM_IMPL(virDomainInputModel, VIR_DOMAIN_INPUT_MODEL_LAST,
> +              "default",
> +              "virtio",
> +              "virtio-transitional",
> +              "virtio-non-transitional")

Same comment as always for VIR_ENUM_IMPL().

[...]
> @@ -13003,6 +13011,13 @@ virDomainInputDefParseXML(virDomainXMLOptionPtr xmlopt,
>          goto error;
>      }
>  
> +    if (model &&
> +        ((def->model = virDomainInputModelTypeFromString(model)) < 0)) {

You might have gone a bit overboard with the parentheses here :))

[...]
>  struct _virDomainInputDef {
> -    int type;
> -    int bus;
> +    int type; /* virDomainInputType */
> +    int bus;  /* virDomainInputBus */

This hunk should be in a separate, trivial patch.

[...]
> +++ b/tests/qemuxml2xmltest.c
> @@ -1270,13 +1270,15 @@ mymain(void)
>              QEMU_CAPS_DEVICE_PCIE_PCI_BRIDGE,
>              QEMU_CAPS_DEVICE_PCIE_ROOT_PORT,
>              QEMU_CAPS_VIRTIO_PCI_DISABLE_LEGACY,
> -            QEMU_CAPS_DEVICE_VHOST_VSOCK);
> +            QEMU_CAPS_DEVICE_VHOST_VSOCK,
> +            QEMU_CAPS_VIRTIO_INPUT_HOST);
>      DO_TEST("virtio-non-transitional",
>              QEMU_CAPS_DEVICE_VIDEO_PRIMARY,
>              QEMU_CAPS_DEVICE_PCIE_PCI_BRIDGE,
>              QEMU_CAPS_DEVICE_PCIE_ROOT_PORT,
>              QEMU_CAPS_VIRTIO_PCI_DISABLE_LEGACY,
> -            QEMU_CAPS_DEVICE_VHOST_VSOCK);
> +            QEMU_CAPS_DEVICE_VHOST_VSOCK,
> +            QEMU_CAPS_VIRTIO_INPUT_HOST);

This too could go into 2/18.

-- 
Andrea Bolognani / Red Hat / Virtualization




More information about the libvir-list mailing list