Skip to content

virtio: Clean up scatterlists and use the DMA API

Andy Lutomirski linux-arm-kernel linux-s390 virtualization 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 19 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3virtio_ring: Remove sg_next indirectiondrivers/virtio/virtio_ring.c+18 -284 replies
2/3virtio_ring: Use DMA APIsdrivers/virtio/Kconfig drivers/virtio/virtio_ring.c+95 -223 replies
3/3virtio_pci: Use the DMA API for virtqueuesdrivers/virtio/virtio_pci.c+18 -73 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/3] virtio: Clean up scatterlists and use the DMA API

This fixes virtio on Xen guests as well as on any other platform on which physical addresses don't match bus addresses.

This can be tested with:

    virtme-run --xen xen --kimg arch/x86/boot/bzImage --console

using virtme from here:

https://git.kernel.org/cgit/utils/kernel/virtme/virtme.git

Without these patches, the guest hangs forever. With these patches, everything works.

There are two outstanding issues. virtio_net warns if DMA debugging is on because it does DMA from the stack. (The warning is correct.) This also is likely to do something unpleasant to s390. (Maintainers are cc'd -- I don't know what to do about it.)

Andy Lutomirski (3):
virtio_ring: Remove sg_next indirection
virtio_ring: Use DMA APIs
virtio_pci: Use the DMA API for virtqueues

 drivers/virtio/Kconfig       |   1 +
 drivers/virtio/virtio_pci.c  |  25 ++++++--
 drivers/virtio/virtio_ring.c | 150 ++++++++++++++++++++++++++++++-------------
 3 files changed, 125 insertions(+), 51 deletions(-)
Signature · 1 line
1.9.3