[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 17/55] tests/qtest: implement stub for VHOST_USER_GET_CONFIG
From: |
Michael S. Tsirkin |
Subject: |
[PULL 17/55] tests/qtest: implement stub for VHOST_USER_GET_CONFIG |
Date: |
Mon, 10 Oct 2022 13:29:51 -0400 |
From: Alex Bennée <alex.bennee@linaro.org>
We don't implement the full solution because frankly none of the tests
need to at the moment. We may end up re-implementing libvhostuser in
the end.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20220802095010.3330793-21-alex.bennee@linaro.org>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
tests/qtest/vhost-user-test.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/tests/qtest/vhost-user-test.c b/tests/qtest/vhost-user-test.c
index a99f55ed84..3052386634 100644
--- a/tests/qtest/vhost-user-test.c
+++ b/tests/qtest/vhost-user-test.c
@@ -79,6 +79,8 @@ typedef enum VhostUserRequest {
VHOST_USER_SET_PROTOCOL_FEATURES = 16,
VHOST_USER_GET_QUEUE_NUM = 17,
VHOST_USER_SET_VRING_ENABLE = 18,
+ VHOST_USER_GET_CONFIG = 24,
+ VHOST_USER_SET_CONFIG = 25,
VHOST_USER_MAX
} VhostUserRequest;
@@ -372,6 +374,17 @@ static void chr_read(void *opaque, const uint8_t *buf, int
size)
}
break;
+ case VHOST_USER_GET_CONFIG:
+ /*
+ * Treat GET_CONFIG as a NOP and just reply and let the guest
+ * consider we have updated its memory. Tests currently don't
+ * require working configs.
+ */
+ msg.flags |= VHOST_USER_REPLY_MASK;
+ p = (uint8_t *) &msg;
+ qemu_chr_fe_write_all(chr, p, VHOST_USER_HDR_SIZE + msg.size);
+ break;
+
case VHOST_USER_SET_PROTOCOL_FEATURES:
/*
* We did set VHOST_USER_F_PROTOCOL_FEATURES so its valid for
--
MST
- Re: Regression save/restore of vsock: (was [PULL 07/55] hw/virtio: move vm_running check to virtio_device_started), (continued)
- [PULL 08/55] hw/virtio: move vhd->started check into helper and add FIXME, Michael S. Tsirkin, 2022/10/10
- [PULL 09/55] hw/virtio: add boilerplate for vhost-user-gpio device, Michael S. Tsirkin, 2022/10/10
- [PULL 10/55] hw/virtio: add vhost-user-gpio-pci boilerplate, Michael S. Tsirkin, 2022/10/10
- [PULL 11/55] tests/qtest: pass stdout/stderr down to subtests, Michael S. Tsirkin, 2022/10/10
- [PULL 12/55] tests/qtest: add a timeout for subprocess_run_one_test, Michael S. Tsirkin, 2022/10/10
- [PULL 13/55] tests/qtest: use qos_printf instead of g_test_message, Michael S. Tsirkin, 2022/10/10
- [PULL 14/55] tests/qtest: catch unhandled vhost-user messages, Michael S. Tsirkin, 2022/10/10
- [PULL 15/55] tests/qtest: plain g_assert for VHOST_USER_F_PROTOCOL_FEATURES, Michael S. Tsirkin, 2022/10/10
- [PULL 16/55] tests/qtest: add assert to catch bad features, Michael S. Tsirkin, 2022/10/10
- [PULL 17/55] tests/qtest: implement stub for VHOST_USER_GET_CONFIG,
Michael S. Tsirkin <=
- [PULL 18/55] tests/qtest: add a get_features op to vhost-user-test, Michael S. Tsirkin, 2022/10/10
- [PULL 19/55] tests/qtest: enable tests for virtio-gpio, Michael S. Tsirkin, 2022/10/10
- [PULL 20/55] virtio: introduce VirtIOConfigSizeParams & virtio_get_config_size, Michael S. Tsirkin, 2022/10/10
- [PULL 21/55] virtio-blk: move config size params to virtio-blk-common, Michael S. Tsirkin, 2022/10/10
- [PULL 22/55] vhost-user-blk: make it possible to disable write-zeroes/discard, Michael S. Tsirkin, 2022/10/10
- [PULL 23/55] vhost-user-blk: make 'config_wce' part of 'host_features', Michael S. Tsirkin, 2022/10/10
- [PULL 24/55] vhost-user-blk: dynamically resize config space based on features, Michael S. Tsirkin, 2022/10/10
- [PULL 25/55] tests/acpi: virt: allow acpi GTDT changes, Michael S. Tsirkin, 2022/10/10
- [PULL 26/55] acpi: arm/virt: build_gtdt: fix invalid 64-bit physical addresses, Michael S. Tsirkin, 2022/10/10
- [PULL 27/55] tests/acpi: virt: update ACPI GTDT binaries, Michael S. Tsirkin, 2022/10/10