RM5xx hardware passthrough

Has anyone here managed to passthrough full control of the modem to a VM running on the host? I have an x86 linux box using an rm520n via pcie, and i’m trying to pass the modem to an openwrt vm using vfio-pci. I managed to get the modem functioning on the host, but I wanted the VM to have control. So, I got the system setup where vfio-pci grabs the modem at boot persistently, and all appears well. But when I launch qemu with the passthrough options set, the modem goes into some sort of deep low power mode stating “unknown header type” that will not reset until a full power cycle is performed.

#<sudo lspci -vv -s 04:00.0
04:00.0 Unassigned class [ff00]: Qualcomm Technologies, Inc Device 0308
Subsystem: Qualcomm Technologies, Inc Device 5201
!!! Unknown header type 7f
IOMMU group: 17
Region 0: Memory at fce01000 (64-bit, non-prefetchable) [size=4K]
Region 2: Memory at fce00000 (64-bit, non-prefetchable) [size=4K]
Kernel driver in use: vfio-pci
Kernel modules: mhi_pci_generic, pcie_mhi>

Anyone have any guidance for this particular scenario?

Dear @J_W
Currently, it only supports as below:

IPPT isn’t what I’m trying to achieve. I have an x86 ubuntu build as host with functional utilization and control of an rm520n in pcie mode, connected via pcie slot, using Quectel’s pci_mhi driver mhi_q. I’m trying to take driver level control from the host(ubuntux64_86), and pass it to an Openwrt virtual machine running in Qemu. This requires blacklisting the Quectel driver and binding the modem to the vfio-pci driver. The process is working without issue for the i350 4-port nic in another pcie slot right next to the rm520n. But the modem wigs out whenever the virtual machine instance is started. The handover causes the modem to become unresponsive and isn’t visible to the VM. Openwrt should see the modem as a directly connected pci device, and assume control.

Dear @J_W
Before restart, did it work fine?
Do you check power sequence?