linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/9] Refine virtio mapping API
@ 2025-07-01  1:13 Jason Wang
  2025-07-01  1:13 ` [PATCH 1/9] virtio_ring: constify virtqueue pointer for DMA helpers Jason Wang
                   ` (9 more replies)
  0 siblings, 10 replies; 18+ messages in thread
From: Jason Wang @ 2025-07-01  1:13 UTC (permalink / raw)
  To: mst, jasowang, xuanzhuo, eperezma
  Cc: virtualization, linux-kernel, hch, xieyongji

Hi all:

Virtio used to be coupled with DMA API. This works fine for the device
that do real DMA but not the others. For example, VDUSE nees to craft
with DMA API in order to let the virtio-vdpa driver to work.

This series tries to solve this issue by introducing the mapping API
in the virtio core. So transport like vDPA can implement their own
mapping logic without the need to hack with DMA API. The mapping API
are abstracted with a new map operations in order to be re-used by
transprot or device. So device like VDUSE can implement its own
mapping loigc.

Please review.

Thanks

Jason Wang (9):
  virtio_ring: constify virtqueue pointer for DMA helpers
  virtio_ring: switch to use dma_{map|unmap}_page()
  virtio: rename dma helpers
  virtio: rename dma_dev to map_token
  virtio_ring: rename dma_handle to map_handle
  virtio: introduce map ops in virtio core
  vdpa: rename dma_dev to map_token
  vdpa: introduce map ops
  vduse: switch to use virtio map API instead of DMA API

 drivers/net/virtio_net.c                 |  32 +-
 drivers/vdpa/alibaba/eni_vdpa.c          |   5 +-
 drivers/vdpa/ifcvf/ifcvf_main.c          |   5 +-
 drivers/vdpa/octeon_ep/octep_vdpa_main.c |   6 +-
 drivers/vdpa/pds/vdpa_dev.c              |   3 +-
 drivers/vdpa/solidrun/snet_main.c        |   4 +-
 drivers/vdpa/vdpa.c                      |   5 +-
 drivers/vdpa/vdpa_sim/vdpa_sim.c         |   4 +-
 drivers/vdpa/vdpa_user/iova_domain.c     |   8 +-
 drivers/vdpa/vdpa_user/iova_domain.h     |   5 +-
 drivers/vdpa/vdpa_user/vduse_dev.c       |  34 +-
 drivers/vdpa/virtio_pci/vp_vdpa.c        |   5 +-
 drivers/vhost/vdpa.c                     |  11 +-
 drivers/virtio/virtio_ring.c             | 440 ++++++++++++++---------
 drivers/virtio/virtio_vdpa.c             |  15 +-
 include/linux/vdpa.h                     |  22 +-
 include/linux/virtio.h                   |  36 +-
 include/linux/virtio_config.h            |  68 ++++
 include/linux/virtio_ring.h              |   6 +-
 19 files changed, 476 insertions(+), 238 deletions(-)

-- 
2.34.1


^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2025-07-03  8:57 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-01  1:13 [PATCH 0/9] Refine virtio mapping API Jason Wang
2025-07-01  1:13 ` [PATCH 1/9] virtio_ring: constify virtqueue pointer for DMA helpers Jason Wang
2025-07-01  1:13 ` [PATCH 2/9] virtio_ring: switch to use dma_{map|unmap}_page() Jason Wang
2025-07-01  1:13 ` [PATCH 3/9] virtio: rename dma helpers Jason Wang
2025-07-01  1:13 ` [PATCH 4/9] virtio: rename dma_dev to map_token Jason Wang
2025-07-01  1:13 ` [PATCH 5/9] virtio_ring: rename dma_handle to map_handle Jason Wang
2025-07-01  1:13 ` [PATCH 6/9] virtio: introduce map ops in virtio core Jason Wang
2025-07-01  1:13 ` [PATCH 7/9] vdpa: rename dma_dev to map_token Jason Wang
2025-07-01 21:25   ` kernel test robot
2025-07-01  1:14 ` [PATCH 8/9] vdpa: introduce map ops Jason Wang
2025-07-02  5:20   ` kernel test robot
2025-07-02  6:59     ` Jason Wang
2025-07-01  1:14 ` [PATCH 9/9] vduse: switch to use virtio map API instead of DMA API Jason Wang
2025-07-01  7:50   ` Michael S. Tsirkin
2025-07-01  8:11     ` Jason Wang
2025-07-01  7:04 ` [PATCH 0/9] Refine virtio mapping API Michael S. Tsirkin
2025-07-01  8:00   ` Jason Wang
2025-07-03  8:57     ` Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).