mbox series

[kvmtool,00/16] Fix vhost-net, scsi and vsock

Message ID 20230419132119.124457-1-jean-philippe@linaro.org (mailing list archive)
Headers show
Series Fix vhost-net, scsi and vsock | expand

Message

Jean-Philippe Brucker April 19, 2023, 1:21 p.m. UTC
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

Comments

Will Deacon May 23, 2023, 10:46 a.m. UTC | #1
Hi Jean-Philippe,

On Wed, Apr 19, 2023 at 02:21:04PM +0100, Jean-Philippe Brucker wrote:
> 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.

Do you plan to respin this with the outstanding comments addressed?

Will
Jean-Philippe Brucker May 24, 2023, 1:53 p.m. UTC | #2
Hi Will,

On Tue, May 23, 2023 at 11:46:08AM +0100, Will Deacon wrote:
> Hi Jean-Philippe,
> 
> On Wed, Apr 19, 2023 at 02:21:04PM +0100, Jean-Philippe Brucker wrote:
> > 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.
> 
> Do you plan to respin this with the outstanding comments addressed?

Yes, I'll try to resend it within a week or two

Thanks,
Jean