Skip to content

Commit c043b4a

Browse files
jasowangmstsirkin
authored andcommitted
virtio: introduce a vDPA based transport
This patch introduces a vDPA transport for virtio. This is used to use kernel virtio driver to drive the vDPA device that is capable of populating virtqueue directly. A new virtio-vdpa driver will be registered to the vDPA bus, when a new virtio-vdpa device is probed, it will register the device with vdpa based config ops. This means it is a software transport between vDPA driver and vDPA device. The transport was implemented through bus_ops of vDPA parent. Signed-off-by: Jason Wang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Michael S. Tsirkin <[email protected]>
1 parent 961e9c8 commit c043b4a

File tree

3 files changed

+410
-0
lines changed

3 files changed

+410
-0
lines changed

drivers/virtio/Kconfig

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,19 @@ config VIRTIO_PCI_LEGACY
4343

4444
If unsure, say Y.
4545

46+
config VIRTIO_VDPA
47+
tristate "vDPA driver for virtio devices"
48+
select VDPA
49+
select VIRTIO
50+
help
51+
This driver provides support for virtio based paravirtual
52+
device driver over vDPA bus. For this to be useful, you need
53+
an appropriate vDPA device implementation that operates on a
54+
physical device to allow the datapath of virtio to be
55+
offloaded to hardware.
56+
57+
If unsure, say M.
58+
4659
config VIRTIO_PMEM
4760
tristate "Support for virtio pmem driver"
4861
depends on VIRTIO

drivers/virtio/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@ virtio_pci-y := virtio_pci_modern.o virtio_pci_common.o
66
virtio_pci-$(CONFIG_VIRTIO_PCI_LEGACY) += virtio_pci_legacy.o
77
obj-$(CONFIG_VIRTIO_BALLOON) += virtio_balloon.o
88
obj-$(CONFIG_VIRTIO_INPUT) += virtio_input.o
9+
obj-$(CONFIG_VIRTIO_VDPA) += virtio_vdpa.o
910
obj-$(CONFIG_VDPA) += vdpa/

0 commit comments

Comments
 (0)