Kvmtool supports the three kernel vhost devices, but since they are not trivial to test, that support has not followed kvmtool core changes over time and is now severely broken. Restore vhost support to its former glory. Patches 1-4 introduce virtio/vhost.c to gather common operations, and patches 5-11 finish fixing the vhost devices. Patch 12 adds documentation about testing all virtio devices, so that vhost support can be kept up to date more easily in the future. Patches 13-16 add support for vhost when the device does not use MSIs (virtio-mmio or virtio-pci without a MSI-capable irqchip). That's only nice to have, but is easy enough to implement. Patch 17 documents and fixes a possible issue which will appear when enabling CCA or pKVM. Jean-Philippe Brucker (16): virtio: Factor vhost initialization virtio/vhost: Factor vring operation virtio/vhost: Factor notify_vq_eventfd() virtio/vhost: Factor notify_vq_gsi() virtio/scsi: Move VHOST_SCSI_SET_ENDPOINT to device start virtio/scsi: Fix and simplify command-line disk/core: Fix segfault on exit with SCSI virtio/scsi: Initialize max_target virtio/scsi: Fix feature selection virtio/vsock: Fix feature selection virtio/net: Fix feature selection virtio: Document how to test the devices virtio: Fix messages about missing Linux config Factor epoll thread virtio/vhost: Support line interrupt signaling virtio/vhost: Clear VIRTIO_F_ACCESS_PLATFORM Makefile | 2 + Documentation/io-testing.txt | 141 +++++++++++++++++++++++ include/kvm/disk-image.h | 7 +- include/kvm/epoll.h | 17 +++ include/kvm/virtio.h | 16 +++ disk/core.c | 15 +-- epoll.c | 89 +++++++++++++++ ioeventfd.c | 94 +++------------- kvm-ipc.c | 103 +++++------------ virtio/core.c | 1 + virtio/net.c | 120 +++----------------- virtio/scsi.c | 118 ++++++-------------- virtio/vhost.c | 209 +++++++++++++++++++++++++++++++++++ virtio/vsock.c | 134 +++++----------------- 14 files changed, 602 insertions(+), 464 deletions(-) create mode 100644 Documentation/io-testing.txt create mode 100644 include/kvm/epoll.h create mode 100644 epoll.c create mode 100644 virtio/vhost.c -- 2.40.0