SPDK NVMe - pykello/pykello.github.com GitHub Wiki
-
- PA mode
- Virtual memory layout matches physical memory layout
- Good: does not require IOMMU
- Bad: Requires root
- VA mode
- Physical memory layout is not followed
- Uses IOMMU to remap physical memory
- Does not require privileges
- Drivers
- UIO only supports PA mode
- VFIO can use IOMMU
- PA mode
-
Running SPDK as non-privileged user
nvme list -vto list addresseslspci -nto list vendor:device numbersreadlink "/sys/bus/pci/devices/0000:00:04.0/iommu_group"to check if IOMMU group assigned- After a VFIO IOMMU group is assigned, we can spdk access using
chown spdk /dev/vfio/5 - To enable iommu, add
intel_iommu=onoramd_iommu=onto kernel parameters.- Verify by
cat /proc/cmdlineordmesg | grep -e DMAR -e IOMMUorls /sys/kernel/iommu_groups/
- Verify by
- To bind a PCIe device to vfio driver:
PCI_ALLOWED="0000:01:00.0" DRIVER_OVERRIDE=vfio-pci scripts/setup.sh