Skip to content

Commit 64b9f64

Browse files
jasowangmstsirkin
authored andcommitted
vdpa: introduce virtio pci driver
This patch introduce a vDPA driver for virtio-pci device. It bridges the virtio-pci control command to the vDPA bus. This will be used for features prototyping and testing. Note that get/restore virtqueue state is not supported which needs extension on the virtio specification. 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 9f4ad9e commit 64b9f64

File tree

5 files changed

+469
-0
lines changed

5 files changed

+469
-0
lines changed

drivers/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ obj-$(CONFIG_DMADEVICES) += dma/
4242
obj-y += soc/
4343

4444
obj-$(CONFIG_VIRTIO) += virtio/
45+
obj-$(CONFIG_VIRTIO_PCI_LIB) += virtio/
4546
obj-$(CONFIG_VDPA) += vdpa/
4647
obj-$(CONFIG_XEN) += xen/
4748

drivers/vdpa/Kconfig

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,4 +52,11 @@ config MLX5_VDPA_NET
5252
be executed by the hardware. It also supports a variety of stateless
5353
offloads depending on the actual device used and firmware version.
5454

55+
config VP_VDPA
56+
tristate "Virtio PCI bridge vDPA driver"
57+
select VIRTIO_PCI_LIB
58+
depends on PCI_MSI
59+
help
60+
This kernel module bridges virtio PCI device to vDPA bus.
61+
5562
endif # VDPA

drivers/vdpa/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ obj-$(CONFIG_VDPA) += vdpa.o
33
obj-$(CONFIG_VDPA_SIM) += vdpa_sim/
44
obj-$(CONFIG_IFCVF) += ifcvf/
55
obj-$(CONFIG_MLX5_VDPA) += mlx5/
6+
obj-$(CONFIG_VP_VDPA) += virtio_pci/

drivers/vdpa/virtio_pci/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# SPDX-License-Identifier: GPL-2.0
2+
obj-$(CONFIG_VP_VDPA) += vp_vdpa.o

0 commit comments

Comments
 (0)