vfio: Split the container code into a clean layer and dedicated file
Status from this message: Applied to vfio next branch for v6.1. Thanks,
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v3 Latest8 patches 1 replyApplied
- v28 patches 8 repliesSuperseded
- v18 patches 21 repliesSuperseded
Changes in v3 from the cover letter
- Rebase over the vfio struct device series
v2: https://lore.kernel.org/r/[email protected]
- Rename s/vfio_container_detatch_group/vfio_group_detach_container/ s/vfio_container_register_device/vfio_device_container_register/ s/vfio_container_unregister_device/vfio_device_container_unregister/
- Change argument order of vfio_container_attach_group()
- Rebased onto merged patches
v1: https://lore.kernel.org/r/[email protected]
Patches in v3 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/8 | vfio: Add header guards and includes to drivers/vfio/vfio.hdrivers/ | +10 | 0 replies | |
| 2/8 | vfio: Rename __vfio_group_unset_container()drivers/ | +5 | 0 replies | |
| 3/8 | vfio: Split the container logic into vfio_container_attach_group()drivers/ | +48 | 0 replies | |
| 4/8 | vfio: Remove #ifdefs around CONFIG_VFIO_NOIOMMUdrivers/ | +19 | 0 replies | |
| 5/8 | vfio: Split out container code from the init/cleanup functionsdrivers/ | +36 | 0 replies | |
| 6/8 | vfio: Rename vfio_ioctl_check_extension()drivers/ | +6 | 0 replies | |
| 7/8 | vfio: Split the register_device ops call into functionsdrivers/ | +23 | 0 replies | |
| 8/8 | vfio: Move container code into drivers/vfio/container.cdrivers/ drivers/ drivers/ +1 more | +728 | 0 replies |
Reviews trailers per patch
All 8 patches have a Reviewed-by or Acked-by.
| Patch | Kevin Tian |
|---|---|
| 1/8 | R-b |
| 2/8 | R-b |
| 3/8 | R-b |
| 4/8 | R-b |
| 5/8 | R-b |
| 6/8 | R-b |
| 7/8 | R-b |
| 8/8 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v3 0/8] vfio: Split the container code into a clean layer and dedicated file
This creates an isolated layer around the container FD code and everything under it, including the VFIO iommu drivers. All this code is placed into container.c, along with the "struct vfio_container" to compartmentalize it.
Future patches will provide an iommufd based layer that gives the same API as the container layer and choose which layer to go to based on how userspace operates.
The patches continue to split up existing functions and finally the last patch just moves every function that is a "container" function to the new file and creates the global symbols to link them together.
Cross-file container functions are prefixed with vfio_container_* for clarity.
The last patch can be defered and queued during the merge window to manage conflicts. The earlier patches should be fine immediately conflicts wise.
This is the last big series I have to enable basic iommufd functionality. As part of the iommufd series the entire container.c becomes conditionally compiled:
https://github.com/jgunthorpe/linux/commits/vfio_iommufd
v3:
- Rebase over the vfio struct device series
v2: https://lore.kernel.org/r/[email protected]
- Rename s/vfio_container_detatch_group/vfio_group_detach_container/ s/vfio_container_register_device/vfio_device_container_register/ s/vfio_container_unregister_device/vfio_device_container_unregister/
- Change argument order of vfio_container_attach_group()
- Rebased onto merged patches
v1: https://lore.kernel.org/r/[email protected]
Jason Gunthorpe (8):
vfio: Add header guards and includes to drivers/vfio/vfio.h
vfio: Rename __vfio_group_unset_container()
vfio: Split the container logic into vfio_container_attach_group()
vfio: Remove #ifdefs around CONFIG_VFIO_NOIOMMU
vfio: Split out container code from the init/cleanup functions
vfio: Rename vfio_ioctl_check_extension()
vfio: Split the register_device ops call into functions
vfio: Move container code into drivers/vfio/container.c
drivers/vfio/Makefile | 1 + drivers/vfio/container.c | 680 +++++++++++++++++++++++++++++++++++++ drivers/vfio/vfio.h | 56 ++++ drivers/vfio/vfio_main.c | 708 ++------------------------------------- 4 files changed, 765 insertions(+), 680 deletions(-) create mode 100644 drivers/vfio/container.c
base-commit: 3c28a76124b25882411f005924be73795b6ef078
Signature · 1 line
2.37.3