PS:尚未有时间从PDF中整理出来,如着急查看全文版请参考https://download.csdn.net/download/shirleylinyuer/10898465
Summary
➢ What is VFIO/IOMMU? Why want them?
➢ VFIO – qemu part
➢ VFIO – kernel part
➢ VFIO usage: how to passthrough a pci device
What is VFIO/IOMMU?
➢ The VFIO (Virtual Function I/O) driver is an IOMMU/device agnostic framework for exposing direct device access to userspace
, in a secure, IOMMU protected environment.
➢ For x86, it needs the I/O MMU hardware support.
➢ VFIO consists of
- kernel device driver: vfio_pci_driver, vfio_iommu_driver, vfio_dma
- QEMU device class: VFIODevice, VFIOPCIDevice
➢ The guest can operate the pass-throughed PCI device by:
- accessing the mapped PCI config space and memory space
- ioctl() on a fd of the VFIO kernel device for control operations