[PATCH v9] PCI: Add device-specific reset for Qualcomm devices
Jose Ignacio Tornos Martinez
jtornosm at redhat.com
Tue Jun 23 05:57:41 PDT 2026
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
More information about the ath11k
mailing list