PCIe Passthrough & IOMMU issues

Obednal1

New Member
Feb 14, 2023
21
4
3
Hi all, first off, I'm a noob and gradually learning this stuff, so thank you ahead of time for your patience and help with getting me through this

Secondly, I promise I've spent days researching the answers myself before creating this thread. I've followed the guides, the official docs and I just can't figure it out for the life of me

What is the goal:
I've got Proxmox v8 installed with TrueNAS Scale running as a VM. I'm trying to get my 4 HDD's on TrueNAS to setup RAID 0.

What is the setup:
I ordered this HBA from Ebay LSI 9220-8i which apparently comes set up already in IT-mode
I have an ASRock x570 Phantom Gaming 4 mobo and a AMD ryzen 7 5700G 8-core 16 thread processor

What is the issue:
1) Once I set IOMMU to enabled in BIOS (Advanced --> AMD CBS --> NBIO --> IOMMU), I save and exit (F10) and then the system does a boot, then stops and boots again which I believe sets IOMMU to disabled in bios (Do I update BIOS? Don't want to if I don't have to cause of obvious risks)
2) I can't see the HBA in the boot menu options if I want to boot to it directly
3) when I load into Proxmox I can see IOMMU groups and devices but not the HBA

Further info:
Code:
root@main:~# dmesg | grep -e DMAR -e IOMMU -e AMD-Vi
[    0.046645] AMD-Vi: Unknown option - 'on'
[    0.116724] AMD-Vi: ivrs, add hid:AMDI0020, uid:\_SB.FUR0, rdevid:160
[    0.116725] AMD-Vi: ivrs, add hid:AMDI0020, uid:\_SB.FUR1, rdevid:160
[    0.116726] AMD-Vi: ivrs, add hid:AMDI0020, uid:\_SB.FUR2, rdevid:160
[    0.116728] AMD-Vi: ivrs, add hid:AMDI0020, uid:\_SB.FUR3, rdevid:160
[    0.116728] AMD-Vi: Using global IVHD EFR:0x206d73ef22254ade, EFR2:0x0
[    0.345572] pci 0000:00:00.2: AMD-Vi: IOMMU performance counters supported
[    0.346519] pci 0000:00:00.2: AMD-Vi: Found IOMMU cap 0x40
[    0.346520] AMD-Vi: Extended features (0x206d73ef22254ade, 0x0): PPR X2APIC NX GT IA GA PC GA_vAPIC
[    0.346524] AMD-Vi: Interrupt remapping enabled
[    0.346525] AMD-Vi: X2APIC enabled
[    0.414376] AMD-Vi: Virtual APIC enabled
[    0.414654] perf/amd_iommu: Detected AMD IOMMU #0 (2 banks, 4 counters/bank).
[   10.321926] AMD-Vi: AMD IOMMUv2 loaded and initialized


Code:
root@main:~# lspci
00:00.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Renoir/Cezanne Root Complex
00:00.2 IOMMU: Advanced Micro Devices, Inc. [AMD] Renoir/Cezanne IOMMU
00:01.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Renoir PCIe Dummy Host Bridge
00:01.2 PCI bridge: Advanced Micro Devices, Inc. [AMD] Renoir/Cezanne PCIe GPP Bridge
00:02.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Renoir PCIe Dummy Host Bridge
00:08.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Renoir PCIe Dummy Host Bridge
00:08.1 PCI bridge: Advanced Micro Devices, Inc. [AMD] Renoir Internal PCIe GPP Bridge to Bus
00:08.2 PCI bridge: Advanced Micro Devices, Inc. [AMD] Renoir Internal PCIe GPP Bridge to Bus
00:14.0 SMBus: Advanced Micro Devices, Inc. [AMD] FCH SMBus Controller (rev 51)
00:14.3 ISA bridge: Advanced Micro Devices, Inc. [AMD] FCH LPC Bridge (rev 51)
00:18.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Cezanne Data Fabric; Function 0
00:18.1 Host bridge: Advanced Micro Devices, Inc. [AMD] Cezanne Data Fabric; Function 1
00:18.2 Host bridge: Advanced Micro Devices, Inc. [AMD] Cezanne Data Fabric; Function 2
00:18.3 Host bridge: Advanced Micro Devices, Inc. [AMD] Cezanne Data Fabric; Function 3
00:18.4 Host bridge: Advanced Micro Devices, Inc. [AMD] Cezanne Data Fabric; Function 4
00:18.5 Host bridge: Advanced Micro Devices, Inc. [AMD] Cezanne Data Fabric; Function 5
00:18.6 Host bridge: Advanced Micro Devices, Inc. [AMD] Cezanne Data Fabric; Function 6
00:18.7 Host bridge: Advanced Micro Devices, Inc. [AMD] Cezanne Data Fabric; Function 7
01:00.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] Matisse Switch Upstream
02:06.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] Matisse PCIe GPP Bridge
02:08.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] Matisse PCIe GPP Bridge
02:09.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] Matisse PCIe GPP Bridge
02:0a.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] Matisse PCIe GPP Bridge
03:00.0 Ethernet controller: Intel Corporation I211 Gigabit Network Connection (rev 03)
04:00.0 Non-Essential Instrumentation [1300]: Advanced Micro Devices, Inc. [AMD] Starship/Matisse Reserved SPP
04:00.1 USB controller: Advanced Micro Devices, Inc. [AMD] Matisse USB 3.0 Host Controller
04:00.3 USB controller: Advanced Micro Devices, Inc. [AMD] Matisse USB 3.0 Host Controller
05:00.0 SATA controller: Advanced Micro Devices, Inc. [AMD] FCH SATA Controller [AHCI mode] (rev 51)
06:00.0 SATA controller: Advanced Micro Devices, Inc. [AMD] FCH SATA Controller [AHCI mode] (rev 51)
07:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Cezanne [Radeon Vega Series / Radeon Vega Mobile Series] (rev c8)
07:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Renoir Radeon High Definition Audio Controller
07:00.2 Encryption controller: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 10h-1fh) Platform Security Processor
07:00.3 USB controller: Advanced Micro Devices, Inc. [AMD] Renoir/Cezanne USB 3.1
07:00.4 USB controller: Advanced Micro Devices, Inc. [AMD] Renoir/Cezanne USB 3.1
07:00.6 Audio device: Advanced Micro Devices, Inc. [AMD] Family 17h/19h HD Audio Controller
08:00.0 SATA controller: Advanced Micro Devices, Inc. [AMD] FCH SATA Controller [AHCI mode] (rev 81)
08:00.1 SATA controller: Advanced Micro Devices, Inc. [AMD] FCH SATA Controller [AHCI mode] (rev 81)


Code:
root@main:~# nano /etc/default/grub
GRUB_DEFAULT=0
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet iommu=pt"
GRUB_CMDLINE_LINUX=""


Code:
root@main:~# cat /proc/cmdline
BOOT_IMAGE=/boot/vmlinuz-6.2.16-3-pve root=/dev/mapper/pve-root ro quiet iommu=pt


Code:
root@main:~# lsmod | grep vfio
vfio_pci               16384  0
vfio_pci_core          94208  1 vfio_pci
irqbypass              16384  23 vfio_pci_core,kvm
vfio_iommu_type1       49152  0
vfio                   57344  3 vfio_pci_core,vfio_iommu_type1,vfio_pci
iommufd                73728  1 vfio

Again, thank you for the help and advice in advance
 

Attachments

  • Screenshot 2023-12-09 192436.png
    Screenshot 2023-12-09 192436.png
    52.2 KB · Views: 11
  • Screenshot 2023-12-09 192416.png
    Screenshot 2023-12-09 192416.png
    51.9 KB · Views: 11
  • Screenshot 2023-12-09 192508.png
    Screenshot 2023-12-09 192508.png
    70.5 KB · Views: 12
Code:
root@main:~# pvesh get /nodes/main/hardware/pci --pci-class-blacklist ""
┌──────────┬────────┬──────────────┬────────────┬────────┬──────────────────────────────────────────────────────────┬──────┬──────────────────┬───────────────────────┬────────────────
│ class    │ device │ id           │ iommugroup │ vendor │ device_name                                              │ mdev │ subsystem_device │ subsystem_device_name │ subsystem_vendo
╞══════════╪════════╪══════════════╪════════════╪════════╪══════════════════════════════════════════════════════════╪══════╪══════════════════╪═══════════════════════╪════════════════
│ 0x010601 │ 0x7901 │ 0000:05:00.0 │         11 │ 0x1022 │ FCH SATA Controller [AHCI mode]                          │      │ 0x7901           │                       │ 0x1022         
├──────────┼────────┼──────────────┼────────────┼────────┼──────────────────────────────────────────────────────────┼──────┼──────────────────┼───────────────────────┼────────────────
│ 0x010601 │ 0x7901 │ 0000:06:00.0 │         12 │ 0x1022 │ FCH SATA Controller [AHCI mode]                          │      │ 0x7901           │                       │ 0x1022         
├──────────┼────────┼──────────────┼────────────┼────────┼──────────────────────────────────────────────────────────┼──────┼──────────────────┼───────────────────────┼────────────────
│ 0x010601 │ 0x7901 │ 0000:08:00.0 │         20 │ 0x1022 │ FCH SATA Controller [AHCI mode]                          │      │ 0xffff           │                       │ 0x1849         
├──────────┼────────┼──────────────┼────────────┼────────┼──────────────────────────────────────────────────────────┼──────┼──────────────────┼───────────────────────┼────────────────
│ 0x010601 │ 0x7901 │ 0000:08:00.1 │         21 │ 0x1022 │ FCH SATA Controller [AHCI mode]                          │      │ 0xffff           │                       │ 0x1849         
├──────────┼────────┼──────────────┼────────────┼────────┼──────────────────────────────────────────────────────────┼──────┼──────────────────┼───────────────────────┼────────────────
│ 0x020000 │ 0x1539 │ 0000:03:00.0 │         13 │ 0x8086 │ I211 Gigabit Network Connection                          │      │ 0x1539           │                       │ 0x1849         
├──────────┼────────┼──────────────┼────────────┼────────┼──────────────────────────────────────────────────────────┼──────┼──────────────────┼───────────────────────┼────────────────
│ 0x030000 │ 0x1638 │ 0000:07:00.0 │         14 │ 0x1002 │ Cezanne [Radeon Vega Series / Radeon Vega Mobile Series] │      │ 0x1636           │                       │ 0x1002         
├──────────┼────────┼──────────────┼────────────┼────────┼──────────────────────────────────────────────────────────┼──────┼──────────────────┼───────────────────────┼────────────────
│ 0x040300 │ 0x1637 │ 0000:07:00.1 │         15 │ 0x1002 │ Renoir Radeon High Definition Audio Controller           │      │ 0x1637           │                       │ 0x1002         
├──────────┼────────┼──────────────┼────────────┼────────┼──────────────────────────────────────────────────────────┼──────┼──────────────────┼───────────────────────┼────────────────
│ 0x040300 │ 0x15e3 │ 0000:07:00.6 │         19 │ 0x1022 │ Family 17h/19h HD Audio Controller                       │      │ 0x1202           │                       │ 0x1849         
├──────────┼────────┼──────────────┼────────────┼────────┼──────────────────────────────────────────────────────────┼──────┼──────────────────┼───────────────────────┼────────────────
│ 0x060000 │ 0x1630 │ 0000:00:00.0 │         -1 │ 0x1022 │ Renoir/Cezanne Root Complex                              │      │ 0x1630           │                       │ 0x1022         
├──────────┼────────┼──────────────┼────────────┼────────┼──────────────────────────────────────────────────────────┼──────┼──────────────────┼───────────────────────┼────────────────
│ 0x060000 │ 0x1632 │ 0000:00:01.0 │          0 │ 0x1022 │ Renoir PCIe Dummy Host Bridge                            │      │ 0x0000           │                       │ 0x0000         
├──────────┼────────┼──────────────┼────────────┼────────┼──────────────────────────────────────────────────────────┼──────┼──────────────────┼───────────────────────┼────────────────
│ 0x060000 │ 0x1632 │ 0000:00:02.0 │          2 │ 0x1022 │ Renoir PCIe Dummy Host Bridge                            │      │ 0x0000           │                       │ 0x0000         
├──────────┼────────┼──────────────┼────────────┼────────┼──────────────────────────────────────────────────────────┼──────┼──────────────────┼───────────────────────┼────────────────
│ 0x060000 │ 0x1632 │ 0000:00:08.0 │          3 │ 0x1022 │ Renoir PCIe Dummy Host Bridge                            │      │ 0x0000           │                       │ 0x0000         
├──────────┼────────┼──────────────┼────────────┼────────┼──────────────────────────────────────────────────────────┼──────┼──────────────────┼───────────────────────┼────────────────
│ 0x060000 │ 0x166a │ 0000:00:18.0 │          7 │ 0x1022 │ Cezanne Data Fabric; Function 0                          │      │ 0x0000           │                       │ 0x0000         
├──────────┼────────┼──────────────┼────────────┼────────┼──────────────────────────────────────────────────────────┼──────┼──────────────────┼───────────────────────┼────────────────
│ 0x060000 │ 0x166b │ 0000:00:18.1 │          7 │ 0x1022 │ Cezanne Data Fabric; Function 1                          │      │ 0x0000           │                       │ 0x0000         
├──────────┼────────┼──────────────┼────────────┼────────┼──────────────────────────────────────────────────────────┼──────┼──────────────────┼───────────────────────┼────────────────
│ 0x060000 │ 0x166c │ 0000:00:18.2 │          7 │ 0x1022 │ Cezanne Data Fabric; Function 2                          │      │ 0x0000           │                       │ 0x0000         
├──────────┼────────┼──────────────┼────────────┼────────┼──────────────────────────────────────────────────────────┼──────┼──────────────────┼───────────────────────┼────────────────
│ 0x060000 │ 0x166d │ 0000:00:18.3 │          7 │ 0x1022 │ Cezanne Data Fabric; Function 3                          │      │ 0x0000           │                       │ 0x0000         
├──────────┼────────┼──────────────┼────────────┼────────┼──────────────────────────────────────────────────────────┼──────┼──────────────────┼───────────────────────┼────────────────
│ 0x060000 │ 0x166e │ 0000:00:18.4 │          7 │ 0x1022 │ Cezanne Data Fabric; Function 4                          │      │ 0x0000           │                       │ 0x0000         
├──────────┼────────┼──────────────┼────────────┼────────┼──────────────────────────────────────────────────────────┼──────┼──────────────────┼───────────────────────┼────────────────
│ 0x060000 │ 0x166f │ 0000:00:18.5 │          7 │ 0x1022 │ Cezanne Data Fabric; Function 5                          │      │ 0x0000           │                       │ 0x0000         
├──────────┼────────┼──────────────┼────────────┼────────┼──────────────────────────────────────────────────────────┼──────┼──────────────────┼───────────────────────┼────────────────
│ 0x060000 │ 0x1670 │ 0000:00:18.6 │          7 │ 0x1022 │ Cezanne Data Fabric; Function 6                          │      │ 0x0000           │                       │ 0x0000         
├──────────┼────────┼──────────────┼────────────┼────────┼──────────────────────────────────────────────────────────┼──────┼──────────────────┼───────────────────────┼────────────────
│ 0x060000 │ 0x1671 │ 0000:00:18.7 │          7 │ 0x1022 │ Cezanne Data Fabric; Function 7                          │      │ 0x0000           │                       │ 0x0000         
├──────────┼────────┼──────────────┼────────────┼────────┼──────────────────────────────────────────────────────────┼──────┼──────────────────┼───────────────────────┼────────────────
│ 0x060100 │ 0x790e │ 0000:00:14.3 │          6 │ 0x1022 │ FCH LPC Bridge                                           │      │ 0xffff           │                       │ 0x1849         
├──────────┼────────┼──────────────┼────────────┼────────┼──────────────────────────────────────────────────────────┼──────┼──────────────────┼───────────────────────┼────────────────
│ 0x060400 │ 0x1634 │ 0000:00:01.2 │          1 │ 0x1022 │ Renoir/Cezanne PCIe GPP Bridge                           │      │ 0x1453           │                       │ 0x1022         
├──────────┼────────┼──────────────┼────────────┼────────┼──────────────────────────────────────────────────────────┼──────┼──────────────────┼───────────────────────┼────────────────
│ 0x060400 │ 0x1635 │ 0000:00:08.1 │          4 │ 0x1022 │ Renoir Internal PCIe GPP Bridge to Bus                   │      │ 0x1635           │                       │ 0x1022         
├──────────┼────────┼──────────────┼────────────┼────────┼──────────────────────────────────────────────────────────┼──────┼──────────────────┼───────────────────────┼────────────────
│ 0x060400 │ 0x1635 │ 0000:00:08.2 │          5 │ 0x1022 │ Renoir Internal PCIe GPP Bridge to Bus                   │      │ 0x1635           │                       │ 0x1022         
├──────────┼────────┼──────────────┼────────────┼────────┼──────────────────────────────────────────────────────────┼──────┼──────────────────┼───────────────────────┼────────────────
│ 0x060400 │ 0x57ad │ 0000:01:00.0 │          8 │ 0x1022 │ Matisse Switch Upstream                                  │      │ 0x0000           │                       │ 0x0000         
├──────────┼────────┼──────────────┼────────────┼────────┼──────────────────────────────────────────────────────────┼──────┼──────────────────┼───────────────────────┼────────────────
│ 0x060400 │ 0x57a3 │ 0000:02:06.0 │          9 │ 0x1022 │ Matisse PCIe GPP Bridge                                  │      │ 0x1453           │                       │ 0x1022         
├──────────┼────────┼──────────────┼────────────┼────────┼──────────────────────────────────────────────────────────┼──────┼──────────────────┼───────────────────────┼────────────────
│ 0x060400 │ 0x57a4 │ 0000:02:08.0 │         10 │ 0x1022 │ Matisse PCIe GPP Bridge                                  │      │ 0x1484           │                       │ 0x1022         
├──────────┼────────┼──────────────┼────────────┼────────┼──────────────────────────────────────────────────────────┼──────┼──────────────────┼───────────────────────┼────────────────
│ 0x060400 │ 0x57a4 │ 0000:02:09.0 │         11 │ 0x1022 │ Matisse PCIe GPP Bridge                                  │      │ 0x1484           │                       │ 0x1022         
├──────────┼────────┼──────────────┼────────────┼────────┼──────────────────────────────────────────────────────────┼──────┼──────────────────┼───────────────────────┼────────────────
│ 0x060400 │ 0x57a4 │ 0000:02:0a.0 │         12 │ 0x1022 │ Matisse PCIe GPP Bridge                                  │      │ 0x1484           │                       │ 0x1022         
├──────────┼────────┼──────────────┼────────────┼────────┼──────────────────────────────────────────────────────────┼──────┼──────────────────┼───────────────────────┼────────────────
│ 0x080600 │ 0x1631 │ 0000:00:00.2 │         -1 │ 0x1022 │ Renoir/Cezanne IOMMU                                     │      │ 0x1631           │                       │ 0x1022         
├──────────┼────────┼──────────────┼────────────┼────────┼──────────────────────────────────────────────────────────┼──────┼──────────────────┼───────────────────────┼────────────────
│ 0x0c0330 │ 0x149c │ 0000:04:00.1 │         10 │ 0x1022 │ Matisse USB 3.0 Host Controller                          │      │ 0x1486           │                       │ 0x1022         
├──────────┼────────┼──────────────┼────────────┼────────┼──────────────────────────────────────────────────────────┼──────┼──────────────────┼───────────────────────┼────────────────
│ 0x0c0330 │ 0x149c │ 0000:04:00.3 │         10 │ 0x1022 │ Matisse USB 3.0 Host Controller                          │      │ 0x148c           │                       │ 0x1022         
├──────────┼────────┼──────────────┼────────────┼────────┼──────────────────────────────────────────────────────────┼──────┼──────────────────┼───────────────────────┼────────────────
│ 0x0c0330 │ 0x1639 │ 0000:07:00.3 │         17 │ 0x1022 │ Renoir/Cezanne USB 3.1                                   │      │ 0xffff           │                       │ 0x1849         
├──────────┼────────┼──────────────┼────────────┼────────┼──────────────────────────────────────────────────────────┼──────┼──────────────────┼───────────────────────┼────────────────
│ 0x0c0330 │ 0x1639 │ 0000:07:00.4 │         18 │ 0x1022 │ Renoir/Cezanne USB 3.1                                   │      │ 0xffff           │                       │ 0x1849         
├──────────┼────────┼──────────────┼────────────┼────────┼──────────────────────────────────────────────────────────┼──────┼──────────────────┼───────────────────────┼────────────────
│ 0x0c0500 │ 0x790b │ 0000:00:14.0 │          6 │ 0x1022 │ FCH SMBus Controller                                     │      │ 0xffff           │                       │ 0x1849         
├──────────┼────────┼──────────────┼────────────┼────────┼──────────────────────────────────────────────────────────┼──────┼──────────────────┼───────────────────────┼────────────────
│ 0x108000 │ 0x15df │ 0000:07:00.2 │         16 │ 0x1022 │ Family 17h (Models 10h-1fh) Platform Security Processor  │      │ 0x15df           │                       │ 0x1022         
├──────────┼────────┼──────────────┼────────────┼────────┼──────────────────────────────────────────────────────────┼──────┼──────────────────┼───────────────────────┼────────────────
│ 0x130000 │ 0x1485 │ 0000:04:00.0 │         10 │ 0x1022 │ Starship/Matisse Reserved SPP                            │      │ 0x1485           │                       │ 0x1022         
└──────────┴────────┴──────────────┴────────────┴────────┴──────────────────────────────────────────────────────────┴──────┴──────────────────┴───────────────────────┴────────────────
root@main:~#
 
IOMMU is properly on (in your BIOS) (and you don't need amd_iommu=on because it's on by default, which gave you the AMD-Vi: Unknown option - 'on').

Everything looks fine, except I cannot find your HBA in the output of lspci. I do not expect this to be related to iOMMU. It might be a hardware failure or incompatibility. Have you tried another PCIe slots? Do you see the device in the BIOS overview (which some have, showing connected devices)? Does it need additional power connected? Does the HBA show up when put into other computers? Is it simple dead? Is there a manual or a support website that can help you troubleshoot?
 
  • Like
Reactions: Obednal1
Thank you so much for getting back to me so quickly, massively appreciated

Ahh so it seems I did things correctly, that’s for raising those additional questions, going to run through each of them and will report back

I have tried a different PCIe already to no avail, I imagine the card has an issue
 
Last edited:
I have tried a different PCIe already to no avail, I imagine the card has an issue
It's possible that enabling IOMMU interferes somehow with the card, but I do not expect that. You could try disabling iOMMU and see if it shows in lspci.

Do you see a prompt on a physically attached display from the firmware/BIOS of the card? To press a key to enter its settings? Maybe it needs something from you or maybe its firmware/BIOS is not started by your motherboard (due to some fast boot setting or UEFI or I don't know). This might be something to look at.

Maybe it needs a (new) battery power backup? Maybe it needs additional plugs for power? Maybe it needs drives connected before it works? Try finding out more about this card and how it's supposed to work, as I know nothing about it.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!