Hi, This is continuing to attempt to fix the various vhost-user issues that are currently plaguing the release. One concrete bug I've come across is that all qtest MMIO devices where being treated as legacy which caused the VIRTIO_F_VERSION_1 flag to get missed causing s390x to fall back to trying to set the endian value for the virt-queues.
I've patched it for the GPIO tests and raised a tracking bug (#1342) for the general problem. This might explain why the only other VirtIO vhost-user MMIO device tested via qtest are the virtio-net-tests. The vhost networking support is its own special implementation so its hard to compare the code for GPIO. It does make me wonder if disabling the mmio version of the test for now would be worthwhile. FWIW I did try disabling force-legacy for all machine types and that caused a bunch of the other tests to fail. I made some progress in tracking down the memory leak that clang complains about. It comes down to the line: gpio->vhost_dev.vqs = g_new0(struct vhost_virtqueue, gpio->vhost_dev.nvqs); which is never cleared up because we never call vu_gpio_device_unrealize() in the test. However its unclear why this is the case. We don't seem to unrealize the vhost-user-network tests either and clang doesn't complain about that. I can replicate some of the other failures I've been seeing in CI by running: ../../meson/meson.py test --repeat 10 --print-errorlogs qtest-arm/qos-test however this seems to run everything in parallel and maybe is better at exposing race conditions. Perhaps the CI system makes those races easier to hit? Unfortunately I've not been able to figure out exactly how things go wrong in the failure case. I've included Stefano's: vhost: enable vrings in vhost_dev_start() for vhost-user devices in this series as it makes sense and improves the vring state errors. However it's up to you if you want to include it in the eventual PR. There are still CI errors I'm trying to track down but I thought it would be worth posting the current state of my tree. Please review. Alex Bennée (4): include/hw: attempt to document VirtIO feature variables include/hw: VM state takes precedence in virtio_device_should_start tests/qtests: override "force-legacy" for gpio virtio-mmio tests hw/virtio: ensure a valid host_feature set for virtio-user-gpio Stefano Garzarella (1): vhost: enable vrings in vhost_dev_start() for vhost-user devices include/hw/virtio/vhost.h | 31 ++++++++++++++++++---- include/hw/virtio/virtio.h | 43 ++++++++++++++++++++++++++----- backends/cryptodev-vhost.c | 4 +-- backends/vhost-user.c | 4 +-- hw/block/vhost-user-blk.c | 4 +-- hw/net/vhost_net.c | 8 +++--- hw/scsi/vhost-scsi-common.c | 4 +-- hw/virtio/vhost-user-fs.c | 4 +-- hw/virtio/vhost-user-gpio.c | 10 ++++++-- hw/virtio/vhost-user-i2c.c | 4 +-- hw/virtio/vhost-user-rng.c | 4 +-- hw/virtio/vhost-vsock-common.c | 4 +-- hw/virtio/vhost.c | 44 ++++++++++++++++++++++++++++---- tests/qtest/libqos/virtio-gpio.c | 3 ++- hw/virtio/trace-events | 4 +-- 15 files changed, 134 insertions(+), 41 deletions(-) -- 2.34.1