Hailo-8l PCIe: "Failed init pcie resources" (Error -22) on Proxmox 9 (Kernel 6.17.4)

Hello,
I am struggling to get my Hailo-8l PCIe card working on a Dell Precision Workstation running Proxmox 9.1.4 (Kernel 6.17.4-2-pve; Docker LXC).

Symptoms: The hailo1x driver (v5.2.0) compiles and loads, but the probe fails immediately after mapping the BARs.

[ 172.770563] hailo1x 0000:02:00.0: Probing: mapped bar 0 - 000000008f62341c 16384 [ 172.770568] hailo1x 0000:02:00.0: Probing: mapped bar 2 - 000000000e906c9e 4096 [ 172.770571] hailo1x 0000:02:00.0: Probing: mapped bar 4 - 00000000e4dec615 16384 [ 172.770575] hailo1x 0000:02:00.0: Probing: Failed init pcie resources [ 172.770617] hailo1x 0000:02:00.0: probe with driver hailo1x failed with error -22

What I’ve tried:
Moved card between CPU-linked (x16) and PCH-linked (x4) slots.
BIOS: ASPM disabled, IGP set as primary.
Kernel parameters: iommu=pt, pci=realloc, intremap=off.
Verified hailo8_fw.bin is present in /lib/firmware/hailo/.

Is there a known compatibility issue with Kernel 6.17 and MSI-X allocation in the v5.2.0 driver? Is there a patch or a specific module parameter to bypass this resource check?

Best regards

Thanks

Welcome to the Hailo Community!

Please note that Hailo-8 and Hailo-8L are supported by HailoRT 4.x, while Hailo-10 is supported by HailoRT 5.x. Currently, only one Hailo PCIe driver can be installed on a system at a time: either the HailoRT 4.x PCIe driver for Hailo-8/8L or the HailoRT 5.x PCIe driver for Hailo-10.

Hey Klaus,
thanks for the information :slight_smile:

Following up on my previous posts, I’ve spent the last few hours deep-diving into the driver and kernel configuration. Despite several patches and hardware relocations, I am still hitting a wall during the firmware upload phase.

Current Setup & Progress:

  • Kernel: 6.17.4-2-pve (Proxmox 9).

  • Driver: Manually patched v4.18.0 to compile on 6.17 (fixed -Werror issues, missing prototypes in pcie_common.c, and the MODULE_IMPORT_NS(DMA_BUF) macro conflict in memory.c).

  • Hardware: Card moved to the PCH-linked x4 slot (02:00.0) to avoid the PCIe resource allocation errors seen with the v5.x driver in the CPU-linked slot.

Troubleshooting Steps Taken:

  1. IOMMU & Security: Disabled Secure Boot (verified via none lockdown state) and tested with intel_iommu=off to eliminate DMA remapping issues.

  2. Kernel Parameters: Currently using pcie_aspm=off pcie_ports=native pci=realloc swiotlb=65536.

  3. Driver Parameters: Tested insmod with force_allocation_from_driver=1 and no_power_mode=1.

  4. Firmware: Verified hailo8_fw.bin is correctly placed and symlinked in /lib/firmware.

The persistent error in dmesg:

[  123.968489] hailo 0000:02:00.0: Probing: Enabled 64 bit dma
[  123.968500] hailo 0000:02:00.0: can't disable ASPM; OS doesn't have ASPM control
[  123.968503] hailo 0000:02:00.0: Successfully disabled ASPM L0s 
[  123.969274] hailo 0000:02:00.0: Failed writing firmware. err -22
[  123.969279] hailo 0000:02:00.0: Firmware load failed
[  123.969333] hailo 0000:02:00.0: Failed activating board -22

Key Questions:

  • Is error -22 (Invalid Argument) during firmware write a known symptom of using the older v4.18 driver with the newer 8L hardware?

  • Could this be related to how Kernel 6.17 handles dma_map_single or memory alignment, which the 4.18 driver might be handling in an outdated way?

  • Since the v5.x driver gave me “Failed init pcie resources” (Error -22) earlier—is it possible that the v5 driver is mandatory for the 8L, but requires specific patches for the 6.17 kernel memory management?

I am trying to keep this on the Proxmox host to avoid the overhead of a full VM, but I am running out of ideas for the host-level DMA issues. Any technical insights on why the firmware write is being rejected would be greatly appreciated!

Thank you very much!

We do not validate HailoRT with Proxmox. So, I do not know what it takes to make it work.

No, the Hailo-8L is supported by HailoRT version 4.x only.

We have been using Docker for a long time. Maybe that would be an alternative. It requires the PCIe driver to be installed outside of the Docker but HailoRT and the application can remain inside.