Introduce a vfio driver over virtio devices
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest11 patches 168 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/11 | virtio-pci: Use virtio pci device layer vq info instead of generic onedrivers/ drivers/ | +10 | 4 replies | |
| 2/11 | virtio: Define feature bit for administration virtqueueinclude/ | +7 | 0 replies | |
| 3/11 | virtio-pci: Introduce admin virtqueuedrivers/ drivers/ drivers/ +4 more | +129 | 5 replies | |
| 4/11 | virtio: Expose the synchronous command helper functiondrivers/ drivers/ include/ | +40 | 0 replies | |
| 5/11 | virtio-pci: Introduce admin command sending functiondrivers/ drivers/ drivers/ +4 more | +119 | 0 replies | |
| 6/11 | virtio-pci: Introduce API to get PF virtio device from VF PCI devicedrivers/ include/ | +13 | 0 replies | |
| 7/11 | virtio-pci: Introduce admin commandsinclude/ | +44 | 0 replies | |
| 8/11 | vfio/pci: Expose vfio_pci_core_setup_barmap()drivers/ drivers/ include/ | +28 | 2 replies | |
| 9/11 | vfio/pci: Expose vfio_pci_iowrite/read##size()drivers/ include/ | +25 | 0 replies | |
| 10/11 | vfio/virtio: Expose admin commands over virtio devicedrivers/ drivers/ | +173 | 63 replies | |
| 11/11 | vfio/virtio: Introduce a vfio driver over virtio devicesMAINTAINERS drivers/ drivers/ +5 more | +585 | 94 replies |
Reviews trailers per patch
7 of 11 patches have a Reviewed-by or Acked-by.
| Patch | Parav Pandit | Jiri Pirko |
|---|---|---|
| 1/11 | R-b | R-b |
| 2/11 | R-b | R-b |
| 3/11 | R-b | R-b |
| 4/11 | R-b | R-b |
| 5/11 | R-b | R-b |
| 6/11 | R-b | R-b |
| 7/11 | R-b | R-b |
| 8/11 | ||
| 9/11 | ||
| 10/11 | ||
| 11/11 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH vfio 00/11] Introduce a vfio driver over virtio devices
This series introduce a vfio driver over virtio devices to support the legacy interface functionality for VFs.
Background, from the virtio spec [1].
--------------------------------------------------------------------
In some systems, there is a need to support a virtio legacy driver with a device that does not directly support the legacy interface. In such scenarios, a group owner device can provide the legacy interface functionality for the group member devices. The driver of the owner device can then access the legacy interface of a member device on behalf of the legacy member device driver.
For example, with the SR-IOV group type, group members (VFs) can not present the legacy interface in an I/O BAR in BAR0 as expected by the legacy pci driver. If the legacy driver is running inside a virtual machine, the hypervisor executing the virtual machine can present a virtual device with an I/O BAR in BAR0. The hypervisor intercepts the legacy driver accesses to this I/O BAR and forwards them to the group owner device (PF) using group administration commands.
--------------------------------------------------------------------
The first 7 patches are in the virtio area and handle the below:
- Introduce the admin virtqueue infrastcture.
- Expose APIs to enable upper layers as of vfio, net, etc to execute admin commands.
- Expose the layout of the commands that should be used for supporting the legacy access.
The above follows the virtio spec that was lastly accepted in that area [1].
The last 4 patches are in the vfio area and handle the below:
- Expose some APIs from vfio/pci to be used by the vfio/virtio driver.
- Expose admin commands over virtio device.
- Introduce a vfio driver over virtio devices to support the legacy interface functionality for VFs.
The series was tested successfully over virtio-net VFs in the host, while running in the guest both modern and legacy drivers.
[1]
https://github.com/oasis-tcs/virtio-spec/commit/03c2d32e5093ca9f2a17797242fbef88efe94b8c
Yishai
Feng Liu (7):
virtio-pci: Use virtio pci device layer vq info instead of generic one
virtio: Define feature bit for administration virtqueue
virtio-pci: Introduce admin virtqueue
virtio: Expose the synchronous command helper function
virtio-pci: Introduce admin command sending function
virtio-pci: Introduce API to get PF virtio device from VF PCI device
virtio-pci: Introduce admin commands
Yishai Hadas (4):
vfio/pci: Expose vfio_pci_core_setup_barmap() vfio/pci: Expose vfio_pci_iowrite/read##size() vfio/virtio: Expose admin commands over virtio device vfio/virtio: Introduce a vfio driver over virtio devices
MAINTAINERS | 6 + drivers/net/virtio_net.c | 21 +- drivers/vfio/pci/Kconfig | 2 + drivers/vfio/pci/Makefile | 2 + drivers/vfio/pci/vfio_pci_core.c | 25 ++ drivers/vfio/pci/vfio_pci_rdwr.c | 38 +- drivers/vfio/pci/virtio/Kconfig | 15 + drivers/vfio/pci/virtio/Makefile | 4 + drivers/vfio/pci/virtio/cmd.c | 146 +++++++ drivers/vfio/pci/virtio/cmd.h | 35 ++ drivers/vfio/pci/virtio/main.c | 546 +++++++++++++++++++++++++ drivers/virtio/Makefile | 2 +- drivers/virtio/virtio.c | 44 +- drivers/virtio/virtio_pci_common.c | 24 +- drivers/virtio/virtio_pci_common.h | 17 +- drivers/virtio/virtio_pci_modern.c | 12 +- drivers/virtio/virtio_pci_modern_avq.c | 138 +++++++ drivers/virtio/virtio_ring.c | 27 ++ include/linux/vfio_pci_core.h | 20 + include/linux/virtio.h | 19 + include/linux/virtio_config.h | 7 + include/linux/virtio_pci_modern.h | 3 + include/uapi/linux/virtio_config.h | 8 +- include/uapi/linux/virtio_pci.h | 66 +++ 24 files changed, 1171 insertions(+), 56 deletions(-) create mode 100644 drivers/vfio/pci/virtio/Kconfig create mode 100644 drivers/vfio/pci/virtio/Makefile create mode 100644 drivers/vfio/pci/virtio/cmd.c create mode 100644 drivers/vfio/pci/virtio/cmd.h create mode 100644 drivers/vfio/pci/virtio/main.c create mode 100644 drivers/virtio/virtio_pci_modern_avq.c
Signature · 6 lines
2.27.0 _______________________________________________ Virtualization mailing list [email protected] https://lists.linuxfoundation.org/mailman/listinfo/virtualization