Has anyone used the Hailo 8 with KVM and PCI passthrough?

In the VM I’ve got this far:

avid@ai:~$ ai/hailort/build/hailort/hailortcli/hailortcli scan
Hailo Devices:
[-] Device: 0000:06:00.0

and

[    1.837209] hailo_pci: loading out-of-tree module taints kernel.
[    1.838390] hailo_pci: module verification failed: signature and/or required key missing - tainting kernel
[    1.841062] hailo: Init module. driver version 4.18.0
[    1.841436] hailo 0000:06:00.0: Probing on: 1e60:2864...
[    1.841853] hailo 0000:06:00.0: Probing: Allocate memory for device extension, 11632
[    1.841951] input: PC Speaker as /devices/platform/pcspkr/input/input5
[    1.842689] hailo 0000:06:00.0: Probing: Device enabled
[    1.843907] hailo 0000:06:00.0: Probing: mapped bar 0 - 0000000058cf8fd0 16384
[    1.844483] hailo 0000:06:00.0: Probing: mapped bar 2 - 00000000fe068ad9 4096
[    1.844970] hailo 0000:06:00.0: Probing: mapped bar 4 - 00000000b7f8f4c0 16384
[    1.845488] hailo 0000:06:00.0: Probing: Setting max_desc_page_size to 4096, (page_size=4096)
[    1.846087] hailo 0000:06:00.0: Probing: Enabled 64 bit dma
[    1.846468] hailo 0000:06:00.0: Probing: Using userspace allocated vdma buffers
[    1.846999] hailo 0000:06:00.0: Disabling ASPM L0s 
[    1.847467] hailo 0000:06:00.0: Successfully disabled ASPM L0s 
[    1.847971] ACPI: button: Power Button [PWRF]
[    1.866410] hailo 0000:06:00.0: firmware: failed to load hailo/hailo8_board_cfg.bin (-2)
[    1.867158] firmware_class: See https://wiki.debian.org/Firmware for information about missing firmware
[    1.868002] hailo 0000:06:00.0: firmware: failed to load hailo/hailo8_board_cfg.bin (-2)
[    1.868743] hailo 0000:06:00.0: firmware: failed to load hailo/hailo8_fw_cfg.bin (-2)
[    1.869350] hailo 0000:06:00.0: firmware: failed to load hailo/hailo8_fw_cfg.bin (-2)
[    1.870220] hailo 0000:06:00.0: firmware: direct-loading firmware hailo/hailo8_fw.bin

So it’s not too far off.

doing a hailortcli fw-control identify hangs the VM.

I’m using libvirt/kvm with:

  <devices>
...
    <hostdev mode='subsystem' type='pci' managed='yes'>                                                                   
      <source>                                                                                                            
        <address domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>                                                  
      </source>                                                                                                           
      <address type='pci' domain='0x0000' bus='0x06' slot='0x00' function='0x0'/>                                         
    </hostdev>                                                                                                            
  </devices>

The VM starts eventually but I’m getting

[ 2348.723797] vfio-pci 0000:01:00.0: enabling device (0000 -> 0002)
[ 2350.067410] vfio-pci 0000:01:00.0: not ready 1023ms after FLR; waiting
[ 2351.123236] vfio-pci 0000:01:00.0: not ready 2047ms after FLR; waiting
[ 2353.266993] vfio-pci 0000:01:00.0: not ready 4095ms after FLR; waiting
[ 2357.618647] vfio-pci 0000:01:00.0: not ready 8191ms after FLR; waiting
[ 2366.065970] vfio-pci 0000:01:00.0: not ready 16383ms after FLR; waiting
[ 2382.704794] vfio-pci 0000:01:00.0: not ready 32767ms after FLR; waiting