[PATCH v9] PCI: Add device-specific reset for Qualcomm devices
Manivannan Sadhasivam
mani at kernel.org
Wed Jun 17 09:55:30 PDT 2026
On Wed, Jun 17, 2026 at 05:47:04PM +0200, Jose Ignacio Tornos Martinez wrote:
> Hi Mani,
>
> Thank you for the internal clarification and sharing this information.
>
> I understand the behavior is firmware error recovery, not a proper reset.
> However, these devices are widely used, and the inability to use them in VMs
> is a significant problem. Could we explore options to achieve safe VFIO
> operation?
>
> 1. Are there ANY alternative reset mechanisms besides D3cold? For example:
> - Device-specific registers or commands?
> - MHI bus-level operations?
> - Firmware commands that could trigger proper reset?
>
> If such mechanisms exist, I'm willing to implement whatever is needed.
>
> 2. If firmware error recovery is the only option available on platforms
> without _PR3, could we add software steps to make it VFIO-safe?
> For example, before/after the D3hot transition:
> - Explicit MHI state teardown?
> - Firmware commands to clear sensitive device state?
> - Additional verification or cleanup steps?
>
> 3. The practical challenge is that _PR3 support is not available on most
> platforms where these devices need to be deployed (desktops, servers).
> Additionally, the general d3cold reset method has limitations and
> remains unimplemented due to the concerns raised earlier (ACPI
> portability, bridge issues, runtime PM complications).
>
> If D3cold is the only proper reset but requires _PR3, and no alternative
> mechanisms exist, could we consider accepting the firmware error recovery
> behavior as a last resort - clearly documented as a platform-specific
> workaround?
>
> Currently these devices have no reset capability on most platforms,
> making them completely unusable for VFIO. Even an imperfect reset is
> significantly better than no reset at all.
>
> My goal is ensuring these devices can be safely reassigned between VMs.
> I'm open to implementing any of the above approaches - or others you might
> suggest.
>
Can you share the exact steps that you tried for passthrough? I'm curious to see
whether you unbinded the MHI host/WLAN driver from the device or not. For the
modem devices, the MHI Host driver's (drivers/bus/mhi/host/pci_generic.c) remove
callback should've quiesced the device and moved the MHI state to RESET if the
driver was unbinded before binding the device with vfio-pci.
I certainly feel that the MHI/WLAN driver should be able to reset the device
during unbind. But I'm not sure if that reset will affect only the firmware
state or the device's config state also. This is something I need to
investigate.
- Mani
--
மணிவண்ணன் சதாசிவம்
More information about the ath12k
mailing list