标签:eal 写入 and 实现 option 添加模块 top def 帮助
一、确认主板和CPU是否支持VT-D查询intel主板是否支持VT-D:https://www.intel.co.uk/content/www/uk/en/support/articles/000005758/boards-and-kits/desktop-boards.html
查询intel CPU是否支持VT-D:https://ark.intel.com/content/www/cn/zh/ark/products/136436/intel-xeon-d-2177nt-processor-19-25m-cache-1-90-ghz.html
查看bios中CPU与PCI相关配置,CPU开启VT相关配置,PCI开启IOMMU相关配置
vi /etc/default/grub
#intel cpu,开启了iommu,pt模式,加入了acs帮助某些使用不良ACS实现的设置。
GRUB_CMDLINE_LINUX_DEFAULT="quiet intel_iommu=on iommu=pt pci=realloc,assign-busses pcie_acs_override=downstream"
update-grub
vi /etc/modules
vfio
vfio_iommu_type1
vfio_pci
vfio_virqfd
echo "options vfio_iommu_type1 allow_unsafe_interrupts=1" > /etc/modprobe.d/iommu_unsafe_interrupts.conf
update-initramfs -u
验证IOMMU隔离,官方文档中出现如下内容,即验证成功
# find /sys/kernel/iommu_groups/ -type l
/sys/kernel/iommu_groups/0/devices/0000:00:00.0
/sys/kernel/iommu_groups/1/devices/0000:00:01.0
/sys/kernel/iommu_groups/1/devices/0000:01:00.0
/sys/kernel/iommu_groups/1/devices/0000:01:00.1
/sys/kernel/iommu_groups/2/devices/0000:00:02.0
/sys/kernel/iommu_groups/3/devices/0000:00:16.0
/sys/kernel/iommu_groups/4/devices/0000:00:1a.0
/sys/kernel/iommu_groups/5/devices/0000:00:1b.0
/sys/kernel/iommu_groups/6/devices/0000:00:1c.0
/sys/kernel/iommu_groups/7/devices/0000:00:1c.5
/sys/kernel/iommu_groups/8/devices/0000:00:1c.6
/sys/kernel/iommu_groups/9/devices/0000:00:1c.7
/sys/kernel/iommu_groups/9/devices/0000:05:00.0
/sys/kernel/iommu_groups/10/devices/0000:00:1d.0
/sys/kernel/iommu_groups/11/devices/0000:00:1f.0
/sys/kernel/iommu_groups/11/devices/0000:00:1f.2
/sys/kernel/iommu_groups/11/devices/0000:00:1f.3
/sys/kernel/iommu_groups/12/devices/0000:02:00.0
/sys/kernel/iommu_groups/12/devices/0000:02:00.1
/sys/kernel/iommu_groups/13/devices/0000:03:00.0
/sys/kernel/iommu_groups/14/devices/0000:04:00.0
IOMMU中断重新映射验证
# dmesg | grep ‘remapping‘
vi /etc/modprobe.d/vfio.conf
#8086:37d0是在lspci -nnk中括号中的内容
options vfio-pci ids=8086:37d0
参考:https://pve.proxmox.com/wiki/Pci_passthrough
标签:eal 写入 and 实现 option 添加模块 top def 帮助
原文地址:https://blog.51cto.com/jiayimeng/2542025