[PATCH v2 3/3] qemu: Add support for virtio device option page-per-vq
Peter Krempa
pkrempa at redhat.com
Sun Oct 10 19:53:40 UTC 2021
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 at redhat.com>
> ---
> 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.
More information about the libvir-list
mailing list