On Fri, 2022-03-11 at 17:24 +0100, Vincent Whitchurch wrote:
Import the libvhost-user from QEMU for use in the implementation of the virtio devices in the roadtest backend.
So hm, I wonder if this is the sensible thing to do?
Not that I mind importing qemu code, but:
1) the implementation is rather complex in some places, and has support for a LOT of virtio/vhost-user features that are really not needed in these cases, for performance etc. It's also close to 4k LOC.
2) the implementation doesn't support time-travel mode which might come in handy
We have another implementation that might be simpler: https://github.com/linux-test-project/usfstl/blob/main/src/vhost.c
but it probably has dependencies on other things in this library, but vhost.c itself is only ~1k LOC. (But I need to update it, I'm sure we have some unpublished bugfixes etc. in this code)
johannes
On Thu, Mar 24, 2022 at 02:00:10PM +0100, Johannes Berg wrote:
On Fri, 2022-03-11 at 17:24 +0100, Vincent Whitchurch wrote:
Import the libvhost-user from QEMU for use in the implementation of the virtio devices in the roadtest backend.
So hm, I wonder if this is the sensible thing to do?
Not that I mind importing qemu code, but:
- the implementation is rather complex in some places, and has support for a LOT of virtio/vhost-user features that are really not needed in these cases, for performance etc. It's also close to 4k LOC.
Is this really a problem given that the code is imported as-is? The intention is not to have to make a lot of local modifications to it in the kernel tree. The code is stable and presumably well-tested upstream, and upstream maintains it as a separate library (in the QEMU source tree though) to encourage reuse.
- the implementation doesn't support time-travel mode which might come in handy
True, but I don't see the external time-travel controller stuff being too useful for the kinds of tests this framework is targeting.
linux-kselftest-mirror@lists.linaro.org