Broadcom LSI 8600-24i passthrough questions (and ASPM confirmation)

Hafnernuss

Member
Aug 11, 2021
15
0
21
32
Hi,

I've recently upgraded from a 8300-8i to a 8600-24i, running proxmox 9.1.1, kernel 6.17.2-1-pve.

First the good things: The card works without any issues and fully supports ASPM. I am able to reach even C10 without any issues (since this is a topic a lot of folks seem to be interested in).

For experimental purposes, I installed TrueNas Scale in a VM and passed the HBA through for usage in the VM. This also works without any issues, as truenas correctly sees all drives attached to the HBA and correctly imports my zpool.

However, I've read a lot about doing this and there seems to be *a lot* involved (or at least there used to be), isolating iommu grups, modfiying grub command lines etc.

I had to do none of that, and are wondering if I missed something and built myself a ticking time bomb.

Here is my vm conf:

Code:
root@proxmox:~# cat /etc/pve/qemu-server/101.conf
boot: order=scsi0;net0
cores: 8
cpu: host
hostpci0: 0000:05:00,pcie=1
hostpci1: 0000:02:00,pcie=1
machine: q35
memory: 32768
meta: creation-qemu=10.1.2,ctime=1766411675
name: truenas
net0: virtio=BC:24:11:7E:74:07,bridge=vmbr0,firewall=1
numa: 0
onboot: 1
ostype: l26
scsi0: Application-Storage-001:vm-101-disk-0,iothread=1,size=20G
scsihw: virtio-scsi-single
smbios1: uuid=7dbb783a-bc1a-4928-bdfe-2e09cb612bce
sockets: 1
startup: order=0
vmgenid: d1cfccdc-d312-49e0-8d91-ac8cca5052f9

The two important lines:
Code:
hostpci0: 0000:05:00,pcie=1
hostpci1: 0000:02:00,pcie=1

Which reflect the HBA and some generic asmedia SATA controller having another pool with 3 SSDs attached (which also loads correctly in truenas).

What I did in addition, was blacklist the mpt3sas driver:

Code:
root@proxmox:~# cat /etc/modprobe.d/blacklist.conf
blacklist mpi3mr

However, I was under the impression that this would mean that proxmox doesnt even initialize the HBA on the host and passes it directly to the VM. While lsblk does not report any of the disks attached to either the HBA or the Asmedia controller, lspci fully lists both of them (for brevity, I only show the HBA here):

Code:
05:00.0 RAID bus controller: Broadcom / LSI Fusion-MPT 24GSAS/PCIe SAS40xx/41xx (rev 01)
        Subsystem: Broadcom / LSI eHBA 9600-24i Tri-Mode Storage Adapter
        Flags: bus master, fast devsel, latency 0, IOMMU group 17
        Memory at 60e1400000 (64-bit, prefetchable) [size=16K]
        Expansion ROM at 81c00000 [disabled] [size=512K]
        Capabilities: [40] Power Management version 3
        Capabilities: [48] MSI: Enable- Count=1/32 Maskable+ 64bit+
        Capabilities: [68] Express Endpoint, IntMsgNum 0
        Capabilities: [a4] MSI-X: Enable+ Count=128 Masked-
        Capabilities: [b0] Vital Product Data
        Capabilities: [100] Device Serial Number 00-80-5e-9a-fc-41-e5-18
        Capabilities: [fb4] Advanced Error Reporting
        Capabilities: [138] Power Budgeting <?>
        Capabilities: [db4] Secondary PCI Express
        Capabilities: [af4] Data Link Feature <?>
        Capabilities: [d00] Physical Layer 16.0 GT/s <?>
        Capabilities: [d40] Lane Margining at the Receiver
        Capabilities: [160] Dynamic Power Allocation <?>
        Kernel driver in use: vfio-pci
        Kernel modules: mpi3mr

Is this a "safe" setup? Or did I miss something here?
 
Can you share all the IOMMU groups?
Bash:
{
shopt -s nullglob
for g in $(find /sys/kernel/iommu_groups/* -maxdepth 0 -type d | sort -V); do
    echo "IOMMU Group ${g##*/}:"
    for d in $g/devices/*; do
        echo -e "\t$(lspci -nns ${d##*/})"
    done;
done;
}
 
Hi, sure, output of your script:


Code:
IOMMU Group 0:
        00:02.0 VGA compatible controller [0300]: Intel Corporation AlderLake-S GT1 [8086:4680] (rev 0c)
IOMMU Group 1:
        00:00.0 Host bridge [0600]: Intel Corporation Device [8086:4640] (rev 02)
IOMMU Group 2:
        00:06.0 PCI bridge [0604]: Intel Corporation 12th Gen Core Processor PCI Express x4 Controller #0 [8086:464d] (rev 02)
IOMMU Group 3:
        00:0a.0 Signal processing controller [1180]: Intel Corporation Platform Monitoring Technology [8086:467d] (rev 01)
IOMMU Group 4:
        00:14.0 USB controller [0c03]: Intel Corporation Raptor Lake USB 3.2 Gen 2x2 (20 Gb/s) XHCI Host Controller [8086:7a60] (rev 11)
        00:14.2 RAM memory [0500]: Intel Corporation Raptor Lake-S PCH Shared SRAM [8086:7a27] (rev 11)
IOMMU Group 5:
        00:15.0 Serial bus controller [0c80]: Intel Corporation Raptor Lake Serial IO I2C Host Controller #0 [8086:7a4c] (rev 11)
IOMMU Group 6:
        00:16.0 Communication controller [0780]: Intel Corporation Raptor Lake CSME HECI #1 [8086:7a68] (rev 11)
IOMMU Group 7:
        00:17.0 SATA controller [0106]: Intel Corporation Raptor Lake SATA AHCI Controller [8086:7a62] (rev 11)
IOMMU Group 8:
        00:1a.0 PCI bridge [0604]: Intel Corporation Raptor Lake PCI Express Root Port #25 [8086:7a48] (rev 11)
IOMMU Group 9:
        00:1c.0 PCI bridge [0604]: Intel Corporation Raptor Lake PCI Express Root Port #1 [8086:7a38] (rev 11)
IOMMU Group 10:
        00:1c.2 PCI bridge [0604]: Intel Corporation Raptor Point-S PCH - PCI Express Root Port 3 [8086:7a3a] (rev 11)
IOMMU Group 11:
        00:1c.4 PCI bridge [0604]: Intel Corporation Device [8086:7a3c] (rev 11)
IOMMU Group 12:
        00:1d.0 PCI bridge [0604]: Intel Corporation Device [8086:7a36] (rev 11)
IOMMU Group 13:
        00:1f.0 ISA bridge [0601]: Intel Corporation Device [8086:7a06] (rev 11)
        00:1f.4 SMBus [0c05]: Intel Corporation Raptor Lake-S PCH SMBus Controller [8086:7a23] (rev 11)
        00:1f.5 Serial bus controller [0c80]: Intel Corporation Raptor Lake SPI (flash) Controller [8086:7a24] (rev 11)
IOMMU Group 14:
        01:00.0 Non-Volatile memory controller [0108]: Micron Technology Inc 2550 NVMe SSD (DRAM-less) [1344:5416] (rev 01)
IOMMU Group 15:
        02:00.0 SATA controller [0106]: ASMedia Technology Inc. ASM1166 Serial ATA Controller [1b21:1166] (rev 02)
IOMMU Group 16:
        04:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8125 2.5GbE Controller [10ec:8125] (rev 05)
IOMMU Group 17:
        05:00.0 RAID bus controller [0104]: Broadcom / LSI Fusion-MPT 24GSAS/PCIe SAS40xx/41xx [1000:00a5] (rev 01)

I am fairly certain that the HBA is in its own HBA group, as is the Asmedia controller, which probably explains why I don't need any isolation stuff at all. Still, I am unsure if it's okay that the host initialized the HBA and loaded a driver for it.
 
vfio-pci is fine and what you want to see. The GPU and HBA have their own IOMMU groups which is good as well. Assuming you didn't "cheat" it with the ACS override patch. My only recommendation pertaining to pass through is to use to a Resource Mapping.
 
Last edited: