drivers/vfio 源码目录与模块索引
Core
| 文件 | 作用 |
|---|---|
vfio_main.c |
group/device注册、fd、ioctl、feature |
container.c |
/dev/vfio/vfio和 IOMMU backend |
vfio_iommu_type1.c |
通用 Type1 DMA映射 |
iova_bitmap.c |
IOVA范围位图 |
virqfd.c |
eventfd/irqfd触发与关闭 |
vfio.h |
内部 group/container定义 |
总线
pci/:通用 vfio-pci、config、region、IRQ、reset;platform/:platform/AMBA;mdev/:mediated device bus;fsl-mc/:NXP Management Complex;- SPAPR TCE/EEH:POWER专用。
PCI扩展
pci/mlx5/:mlx5 migration/dirty tracking;pci/hisilicon/:HiSilicon accelerator migration;- IGD和 zdev:x86/s390专用。
Kconfig
1 | VFIO |
RK3588配置事实
主 defconfig有:
1 | PCI=y |
未找到 VFIO、VFIO_PCI、VFIO_PLATFORM或 KVM显式配置。最终产品 .config仍可能由 fragment改变,应以 /proc/config.gz核对。
架构不适用
- SPAPR/EEH:POWER;
- fsl-mc:NXP;
- IGD:x86 Intel;
- zdev:s390;
- mlx5/HiSilicon vendor migration:只有对应 PCI硬件和配置才有意义。
UAPI
主头文件:include/uapi/linux/vfio.h。内核文档:
Documentation/driver-api/vfio.rst;Documentation/driver-api/vfio-mediated-device.rst;Documentation/virt/kvm/devices/vfio.rst。
正在加载留言…