The IOMMU cannot be activated

seeker_pl

New Member
Aug 19, 2021
6
0
1
38
Hi,

I cannot activate IOMMU for my setup, maybe you can help me sort it out?


Processor i5-4460 supports VT-X
https://ark.intel.com/content/www/p...i54460-processor-6m-cache-up-to-3-40-ghz.html

Mobo
GA-Z87MX-D3H
https://www.gigabyte.com/Motherboard/GA-Z87MX-D3H-rev-1x/sp#sp


I follow the Proxmox documentation

First I edit the grub

Code:
/etc/default/grub


Changed this line:


GRUB_CMDLINE_LINUX_DEFAULT="quiet intel_iommu=on pcie_acs_override=downstream,multifunction video=efifb:eek:ff"

I update the grub and restart again the server

Code:
I added in /etc/modules


vfio
vfio_iommu_type1
vfio_pci
vfio_virqfd


and update the initramfs


update-initramfs -u -k all

and then reboot

After restart I made changes to the VM

Code:
nano /etc/pve/qemu-server/100.conf


I changed the processor type cpu: host,hidden=1,flags=+pcid
and in gui modified the machine type to machine: pc-q35-5.2

Added to blacklist /etc/modprobe.d/pve-blacklist.conf

Code:
blacklist nvidiafb
blacklist nvidia
blacklist radeon
blacklist nouveau

Finally I added in GUI the EFI disk and then reboot.

The IOMMU is stll not detected. Do you have any idea why?
 
Does it support VT-d and did you enable it? VT-x is the HW virtualization support of the processor, VT-d for the IOMMU.
 
Your CPU and motherboard appear to supprot VT-d. What is the output of cat /proc/cmdline? Maybe you need to put the setting in the other boot loader?
PS: Do you really need pcie_acs_override=downstream,multifunction video=efifb:off? Maybe have a look at the IOMMU groups without if first? This will give a readable overview: for d in /sys/kernel/iommu_groups/*/devices/*; do n=${d#*/iommu_groups/*}; n=${n%%/*}; printf 'IOMMU group %s ' "$n"; lspci -nnks "${d##*/}"; done (you can ignore PCI bridges).
 
Output
Code:
initrd=\EFI\proxmox\5.4.128-1-pve\initrd.img-5.4.128-1-pve root=ZFS=rpool/ROOT/pve-1 boot=zfs

The
Code:
pcie_acs_override=downstream,multifunction video=efifb:off
is removed now and changed to
Code:
GRUB_CMDLINE_LINUX_DEFAULT="quiet intel_iommu=on"

Same result, the dmesg | grep -e DMAR -e IOMMU is empty
 
According to /proc/cmdline, your changes to /etc/defauit/grub are not coming through. You are booting from ZFS and probably using UEFI, so you might need to set the kernel parameters in /etc/kernel/cmdline. Please a look at the link to the Proxmox manual in my previous message to check which bootloader you are using.
Please use my earlier command to check for multiple IOMMU groups (and which devices can be securely passed through). That is a better check for PCI passthrough than grepping dmesg.
 
  • Like
Reactions: aaron
Sorry for such a late reply.

Output for
Code:
dmesg | grep -e DMAR -e IOMMU -e AMD-Vi


[    0.069933] DMAR: IOMMU enabled

Output for
Code:
for d in /sys/kernel/iommu_groups/*/devices/*; do n=${d#*/iommu_groups/*}; n=${n%%/*}; printf 'IOMMU group %s ' "$n"; lspci -nnks "${d##*/}"; done

Code:
IOMMU group * 00:00.0 Host bridge [0600]: Intel Corporation 4th Gen Core Processor DRAM Controller [8086:0c00] (rev 06)
    Subsystem: Gigabyte Technology Co., Ltd 4th Gen Core Processor DRAM Controller [1458:5000]
    Kernel driver in use: hsw_uncore
00:01.0 PCI bridge [0604]: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor PCI Express x16 Controller [8086:0c01] (rev 06)
    Kernel driver in use: pcieport
00:14.0 USB controller [0c03]: Intel Corporation 8 Series/C220 Series Chipset Family USB xHCI [8086:8c31] (rev 04)
    Subsystem: Gigabyte Technology Co., Ltd 8 Series/C220 Series Chipset Family USB xHCI [1458:5007]
    Kernel driver in use: xhci_hcd
    Kernel modules: xhci_pci
00:16.0 Communication controller [0780]: Intel Corporation 8 Series/C220 Series Chipset Family MEI Controller #1 [8086:8c3a] (rev 04)
    Subsystem: Gigabyte Technology Co., Ltd 8 Series/C220 Series Chipset Family MEI Controller [1458:1c3a]
    Kernel driver in use: mei_me
    Kernel modules: mei_me
00:19.0 Ethernet controller [0200]: Intel Corporation Ethernet Connection I217-V [8086:153b] (rev 04)
    Subsystem: Gigabyte Technology Co., Ltd Ethernet Connection I217-V [1458:e000]
    Kernel driver in use: e1000e
    Kernel modules: e1000e
00:1a.0 USB controller [0c03]: Intel Corporation 8 Series/C220 Series Chipset Family USB EHCI #2 [8086:8c2d] (rev 04)
    Subsystem: Gigabyte Technology Co., Ltd 8 Series/C220 Series Chipset Family USB EHCI [1458:5006]
    Kernel driver in use: ehci-pci
    Kernel modules: ehci_pci
00:1b.0 Audio device [0403]: Intel Corporation 8 Series/C220 Series Chipset High Definition Audio Controller [8086:8c20] (rev 04)
    Subsystem: Gigabyte Technology Co., Ltd 8 Series/C220 Series Chipset High Definition Audio Controller [1458:a002]
    Kernel driver in use: snd_hda_intel
    Kernel modules: snd_hda_intel
00:1d.0 USB controller [0c03]: Intel Corporation 8 Series/C220 Series Chipset Family USB EHCI #1 [8086:8c26] (rev 04)
    Subsystem: Gigabyte Technology Co., Ltd 8 Series/C220 Series Chipset Family USB EHCI [1458:5006]
    Kernel driver in use: ehci-pci
    Kernel modules: ehci_pci
00:1f.0 ISA bridge [0601]: Intel Corporation Z87 Express LPC Controller [8086:8c44] (rev 04)
    Subsystem: Gigabyte Technology Co., Ltd Z87 Express LPC Controller [1458:5001]
    Kernel driver in use: lpc_ich
    Kernel modules: lpc_ich
00:1f.2 SATA controller [0106]: Intel Corporation 8 Series/C220 Series Chipset Family 6-port SATA Controller 1 [AHCI mode] [8086:8c02] (rev 04)
    Subsystem: Gigabyte Technology Co., Ltd 8 Series/C220 Series Chipset Family 6-port SATA Controller 1 [AHCI mode] [1458:b005]
    Kernel driver in use: ahci
    Kernel modules: ahci
00:1f.3 SMBus [0c05]: Intel Corporation 8 Series/C220 Series Chipset Family SMBus Controller [8086:8c22] (rev 04)
    Subsystem: Gigabyte Technology Co., Ltd 8 Series/C220 Series Chipset Family SMBus Controller [1458:5001]
    Kernel driver in use: i801_smbus
    Kernel modules: i2c_i801
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GP104 [10de:1b82] (rev a1)
    Subsystem: NVIDIA Corporation GP104 [GeForce GTX 1070 Ti] [10de:119d]
    Kernel modules: nvidiafb, nouveau
01:00.1 Audio device [0403]: NVIDIA Corporation GP104 High Definition Audio Controller [10de:10f0] (rev a1)
    Subsystem: NVIDIA Corporation GP104 High Definition Audio Controller [10de:119d]
    Kernel driver in use: snd_hda_intel
    Kernel modules: snd_hda_intel
 
Instead of multiple groups with a number, the overview only shows a single IOMMU group *. This means that IOMMU (Intel VT-d) is not (fully) enabled.

The command cat /proc/cmdline is not showing intel_iommu=on, which means that it is not applied. Either you did not run update-grub (or proxmox-boot-tool refresh), or you are using systemd-boot and need to edit /etc/kernel/cmdline instead (and then run proxmox-boot-tool refresh).
 
cat /proc/cmdline output

Code:
BOOT_IMAGE=/boot/vmlinuz-5.4.128-1-pve root=/dev/mapper/pve-root ro quiet intel_iommu=on

I will try to run the new installation.
 
cat /proc/cmdline output

Code:
BOOT_IMAGE=/boot/vmlinuz-5.4.128-1-pve root=/dev/mapper/pve-root ro quiet intel_iommu=on

I will try to run the new installation.
Before it looked like it intel_iommu=on was missing, but it looks good now. You don't need to reinstall.
According to Wikipedia the Intel Z87 chipset does not support Intel VT-d, which is strange because your BIOS does have a VT-d setting.
I cannot explain this, sorry.

EDIT: I read the GigaByte forum posts you referred to, but they did not get it to work. Instead they gave up and switched to another type of motherboard.
 
Last edited:
  • Like
Reactions: seeker_pl