Re: [PATCH v2 3/3] qemu: Add support for virtio device option page-per-vq

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

 



On Sat, Oct 09, 2021 at 17:37:44 +0800, Han Han wrote:
> Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1925363
> 
> Signed-off-by: Han Han <hhan@xxxxxxxxxx>
> ---
>  src/qemu/qemu_command.c                       |  4 ++
>  src/qemu/qemu_hotplug.c                       |  3 +-
>  src/qemu/qemu_validate.c                      |  7 ++++

Please make sure to wait for my series converting -device to JSON, or
rebase this patch to it when you'll be removing the remnants of the
NACKed capability.

> 
> diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
> index 28bca1519c..36159971fa 100644
> --- a/src/qemu/qemu_command.c
> +++ b/src/qemu/qemu_command.c
> @@ -636,6 +636,10 @@ qemuBuildVirtioOptionsStr(virBuffer *buf,
>          virBufferAsprintf(buf, ",packed=%s",
>                            virTristateSwitchTypeToString(virtio->packed));
>      }
> +    if (virtio->page_per_vq != VIR_TRISTATE_SWITCH_ABSENT) {
> +        virBufferAsprintf(buf, ",page-per-vq=%s",
> +                          virTristateSwitchTypeToString(virtio->page_per_vq));
> +    }

This will conflict, the formatting of virtio options will move once I
push it.


> diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
> index 7df3946751..eff86eccf5 100644
> --- a/tests/qemuxml2argvtest.c
> +++ b/tests/qemuxml2argvtest.c
> @@ -3309,6 +3309,20 @@ mymain(void)
>                          QEMU_CAPS_DEVICE_VIRTIO_GPU,
>                          QEMU_CAPS_VIRTIO_GPU_VIRGL,
>                          QEMU_CAPS_DEVICE_VHOST_USER_GPU);
> +    DO_TEST_PARSE_ERROR("virtio-options-controller-page_per_vq", QEMU_CAPS_VIRTIO_SCSI);
> +    DO_TEST_PARSE_ERROR_NOCAPS("virtio-options-disk-page_per_vq");
> +    DO_TEST_PARSE_ERROR_NOCAPS("virtio-options-fs-page_per_vq");
> +    DO_TEST_PARSE_ERROR("virtio-options-input-page_per_vq", QEMU_CAPS_VIRTIO_MOUSE,
> +                        QEMU_CAPS_VIRTIO_KEYBOARD);
> +    DO_TEST_PARSE_ERROR_NOCAPS("virtio-options-memballoon-page_per_vq");
> +    DO_TEST_PARSE_ERROR_NOCAPS("virtio-options-memballoon-freepage-reporting");
> +    DO_TEST_PARSE_ERROR_NOCAPS("virtio-options-net-page_per_vq");
> +    DO_TEST_PARSE_ERROR("virtio-options-rng-page_per_vq", QEMU_CAPS_DEVICE_VIRTIO_RNG,
> +                        QEMU_CAPS_OBJECT_RNG_RANDOM);
> +    DO_TEST_PARSE_ERROR("virtio-options-video-page_per_vq", QEMU_CAPS_DEVICE_VIRTIO_GPU,
> +                        QEMU_CAPS_DEVICE_VIRTIO_GPU,
> +                        QEMU_CAPS_VIRTIO_GPU_VIRGL,
> +                        QEMU_CAPS_DEVICE_VHOST_USER_GPU);

Please try to use the real caps versions (DO_TEST_CAPS_*) as much as
possible. Many of the test cases also won't make sense if the capability
is always present.




[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