Re: [PATCH v9] PCI: Add device-specific reset for Qualcomm devices
Jose Ignacio Tornos Martinez <[email protected]> Tue, 23 Jun 2026 14:57:41 +0200
| Newsgroups | dev.linux.lists.mhi,org.infradead.lists.ath11k,org.infradead.lists.ath12k,org.kernel.vger.linux-kernel,org.kernel.vger.linux-pci,org.kernel.vger.linux-wireless |
|---|---|
| Message-ID | <[email protected]> |
Hello Baochen, > what is the difference between a clean VM shutdown and an unclean termination? > specifically, will pci driver's .shutdown callback be triggered during the clean VM > shutdown, and not be triggered during a unclean termination? Clean VM shutdown: The guest OS shuts down normally, so the guest kernel calls the driver's .shutdown/.remove callbacks. The driver can properly deinitialize the device, leaving it in a clean state. Unclean VM termination (crash, force-off): The guest kernel never runs, so driver callbacks are not triggered. The device remains in whatever state it was in (DMA active, interrupts enabled, etc.). At this point, only VFIO on the host can interact with the device to reset it before reassigning it to the next assignment. Without a working reset method, the device stays in this undefined state and can't be reused. That's why VFIO calls pci_try_reset_function() - it's the only way to clean up the device when the guest driver couldn't. Best regards José Ignacio