我试图通过,所以我的设备被vfio抢在任何其他模块之前。这是我的/etc/modprobe.d/01-vfio-pci.conf:
softdep nouveau pre: vfio-pci
softdep nvidiafb pre: vfio-pci
softdep snd_hda_intel pre: vfio-pci
softdep nvidia-gpu pre: vfio-pci
softdep i2c_nvidia_gpu pre: vfio-pci
softdep xhci_hcd pre: vfio-pci
options vfio-pci ids=10de:2184,10de:1aeb,10de:1aec,10de:1aed,1022:145f但是,下面是引导后的设备:
07:00.0 VGA compatible controller [0300]: NVIDIA Corporation TU116 [GeForce GTX 1660] [10de:2184] (rev a1) (prog-if 00 [VGA controller])
Subsystem: NVIDIA Corporation TU116 [GeForce GTX 1660] [10de:1324]
Flags: fast devsel, IRQ 10
Memory at f6000000 (32-bit, non-prefetchable) [disabled] [size=16M]
Memory at d0000000 (64-bit, prefetchable) [disabled] [size=256M]
Memory at e0000000 (64-bit, prefetchable) [disabled] [size=32M]
I/O ports at f000 [disabled] [size=128]
Expansion ROM at f7000000 [disabled] [size=512K]
Capabilities:
Kernel driver in use: vfio-pci
Kernel modules: nvidiafb, nouveau
07:00.1 Audio device [0403]: NVIDIA Corporation Device [10de:1aeb] (rev a1)
Subsystem: NVIDIA Corporation Device [10de:1324]
Flags: fast devsel, IRQ 11
Memory at f7080000 (32-bit, non-prefetchable) [disabled] [size=16K]
Capabilities:
Kernel driver in use: vfio-pci
Kernel modules: snd_hda_intel
07:00.2 USB controller [0c03]: NVIDIA Corporation Device [10de:1aec] (rev a1) (prog-if 30 [XHCI])
Subsystem: NVIDIA Corporation Device [10de:1324]
Flags: fast devsel, IRQ 47
Memory at e2000000 (64-bit, prefetchable) [size=256K]
Memory at e2040000 (64-bit, prefetchable) [size=64K]
Capabilities:
Kernel driver in use: xhci_hcd
07:00.3 Serial bus controller [0c80]: NVIDIA Corporation Device [10de:1aed] (rev a1)
Subsystem: NVIDIA Corporation Device [10de:1324]
Flags: bus master, fast devsel, latency 0, IRQ 61
Memory at f7084000 (32-bit, non-prefetchable) [size=4K]
Capabilities:
Kernel driver in use: nvidia-gpu
Kernel modules: i2c_nvidia_gpu
08:00.3 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD] Zeppelin USB 3.0 Host controller [1022:145f] (prog-if 30 [XHCI])
Subsystem: Gigabyte Technology Co., Ltd Zeppelin USB 3.0 Host controller [1458:5007]
Flags: bus master, fast devsel, latency 0, IRQ 48
Memory at f7200000 (64-bit, non-prefetchable) [size=1M]
Capabilities:
Kernel driver in use: xhci_hcd如你所见,只有一些人被抓走。但是他们并没有被我补充的调制解调器规则所抓取,没有它,它是有效的。
lz@z:~$ cat /etc/initramfs-tools/modules
# List of modules that you want to include in your initramfs.
# They will be loaded at boot time in the order below.
#
# Syntax: module_name [args ...]
#
# You must run update-initramfs(8) to effect this change.
#
# Examples:
#
# raid1
# sd_mod
vfio
vfio_iommu_type1
vfio_virqfd
options vfio_pci ids=10de:2184,10de:1aeb,10de:1aec,10de:1aed,1022:145f
vfio_pci ids=10de:2184,10de:1aeb,10de:1aec,10de:1aed,1022:145f
vfio_pci
lz@z:~$ cat /etc/modules
# /etc/modules: kernel modules to load at boot time.
#
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.
vfio
vfio_iommu_type1
vfio_pci ids=10de:2184,10de:1aeb,10de:1aec,10de:1aed,1022:145f发布于 2020-10-05 09:02:50
USB模块xhci_hcd在内核中。它在模块之前加载。
这应该作为内核参数在grub中工作:
GRUB_CMDLINE_LINUX_DEFAULT="intel_iommu=on modprobe.blacklist=xhci_hcd"发布于 2022-03-11 06:16:51
我无法让Ubuntu20.04(云映像)运行vfio很多天。结果显示,没有任何/etc/模块/etc/initramfs-tools/ /etc/modprobe.d/*..conf有任何影响。Vfio模块已经内置到内核中了。我觉得黑名单上的文件可能有用。但是对于设置pci ids,只有grub内核args起作用。关键在于:只与vfio-pci.ids一起工作,而不是vfio-pci ids。啊!..back终于开始生活了。:)
https://askubuntu.com/questions/1212969
复制相似问题