# GRUB_CMDLINE_LINUX_DEFAULT 修改为下面这样 # Intel CPU GRUB_CMDLINE_LINUX_DEFAULT="quiet intel_iommu=on iommu=pt"
更新 grub
1 2 3 4 5 6 7 8 9 10 11 12
root@HomeLab:~# vim /etc/default/grub root@HomeLab:~# update-grub Generating grub configuration file ... Found linux image: /boot/vmlinuz-5.15.85-1-pve Found initrd image: /boot/initrd.img-5.15.85-1-pve Found memtest86+ image: /boot/memtest86+.bin Found memtest86+ multiboot image: /boot/memtest86+_multiboot.bin Warning: os-prober will not be executed to detect other bootable partitions. Systems on them will not be added to the GRUB boot configuration. Check GRUB_DISABLE_OS_PROBER documentation entry. Adding boot menu entry for UEFI Firmware Settings ... done
更新 systemd-boot
1 2 3 4 5
root@HomeLab:~# pve-efiboot-tool refresh Running hook script 'proxmox-auto-removal'.. Running hook script 'zz-proxmox-boot'.. Re-executing '/etc/kernel/postinst.d/zz-proxmox-boot' in new private mount namespace.. No /etc/kernel/proxmox-boot-uuids found, skipping ESP sync.
root@HomeLab ~$ dmesg | grep -e DMAR -e IOMMU [ 0.011885] ACPI: DMAR 0x0000000076CDF668 0000D4 (v01 ALASKA A M I 00000001 INTL 20091013) [ 0.011914] ACPI: Reserving DMAR table memory at [mem 0x76cdf668-0x76cdf73b] [ 0.135283] DMAR: IOMMU enabled [ 0.372218] DMAR: Host address width 46 [ 0.372220] DMAR: DRHD base: 0x000000fbffd000 flags: 0x0 [ 0.372225] DMAR: dmar0: reg_base_addr fbffd000 ver 1:0 cap d2008c10ef0466 ecap f0205b [ 0.372228] DMAR: DRHD base: 0x000000fbffc000 flags: 0x1 [ 0.372232] DMAR: dmar1: reg_base_addr fbffc000 ver 1:0 cap d2078c106f0466 ecap f020df [ 0.372234] DMAR: RMRR base: 0x000000773e0000 end: 0x000000773f0fff [ 0.372236] DMAR: ATSR flags: 0x0 [ 0.372237] DMAR: RHSA base: 0x000000fbffc000 proximity domain: 0x0 [ 0.372240] DMAR-IR: IOAPIC id 1 under DRHD base 0xfbffc000 IOMMU 1 [ 0.372242] DMAR-IR: IOAPIC id 2 under DRHD base 0xfbffc000 IOMMU 1 [ 0.372243] DMAR-IR: HPET id 0 under DRHD base 0xfbffc000 [ 0.372244] DMAR-IR: Queued invalidation will be enabled to support x2apic and Intr-remapping. [ 0.372875] DMAR-IR: Enabled IRQ remapping in x2apic mode [ 0.840583] DMAR: No SATC found [ 0.840585] DMAR: IOMMU feature sc_support inconsistent [ 0.840587] DMAR: IOMMU feature dev_iotlb_support inconsistent [ 0.840588] DMAR: dmar0: Using Queued invalidation [ 0.840592] DMAR: dmar1: Using Queued invalidation [ 0.843805] DMAR: Intel(R) Virtualization Technology for Directed I/O
添加必要的模块
1
root@HomeLab ~$ vim /etc/modules
添加下面内容:
1 2 3 4
vfio vfio_pci vfio_virqfd vfio_iommu_type1
IOMMU Interrupt Remapping
1 2 3
root@HomeLab ~$ dmesg | grep 'remapping' [ 0.372244] DMAR-IR: Queued invalidation will be enabled to support x2apic and Intr-remapping. [ 0.372875] DMAR-IR: Enabled IRQ remapping in x2apic mode
出现下面其中一条内容没说明支持 IOMMU Interrupt Remapping
“AMD-Vi: Interrupt remapping enabled”
“DMAR-IR: Enabled IRQ remapping in x2apic mode” (‘x2apic’ can be different on old CPUs, but should still work)