From: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
To: mani@kernel.org
Cc: alex@shazbot.org, ath11k@lists.infradead.org,
ath12k@lists.infradead.org, bhelgaas@google.com,
jjohnson@kernel.org, jtornosm@redhat.com,
linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org,
linux-wireless@vger.kernel.org, mhi@lists.linux.dev
Subject: Re: [PATCH v9] PCI: Add device-specific reset for Qualcomm devices
Date: Thu, 18 Jun 2026 08:33:08 +0200 [thread overview]
Message-ID: <20260618063309.9536-1-jtornosm@redhat.com> (raw)
In-Reply-To: <n3maiuu5cctivlal4fozysz37ir6ecdfws5u2xxw2neclsfdfj@nsvwvlh7b4j5>
Hi Mani,
Let me clarify the exact scenario and where the reset is necessary:
* For the commented WiFi devices (WCN6855/WCN7850):
Standard VFIO passthrough flow (this works fine):
1. Unbind native driver (ath11k/ath12k/MHI)
2. Bind vfio-pci driver
3. Assign device to VM
4. VM boots, loads its own driver → device works perfectly
5. VM shuts down cleanly → device can be reassigned → works fine
The problem occurs with unclean VM termination:
1. VM crashes or is force-terminated
2. VFIO tries to reset the device before reassignment
3. Without a working PCI reset method, reset fails
4. Device stuck in undefined state → cannot be reassigned to another VM
Unbinding the driver again doesn't help because the device hardware
itself is in a bad state. From hypervisor:
$ lspci -vvv -s 0000:03:00.0
03:00.0 Network controller: Qualcomm Technologies, Inc (rev ff) (prog-if ff)
!!! Unknown header type 7f
And a full host power-cycle is necessary to recover.
* For the commented modem devices (SDX62/SDX65):
Even worse because it fails during the first VM boot without proper reset
capability, standard VFIO passthrough flow:
1. Unbind native driver (MHI)
2. Bind vfio-pci driver
3. Assign device to VM
4. VM boots, loads its own driver and crashes:
[ 24.024165] mhi mhi0: Device failed to enter MHI Ready
[ 24.024168] mhi mhi0: MHI did not enter READY state
Unbind/rebind attempts fail:
[ 352.643601] mhi mhi0: Requested to power ON
[ 352.643611] mhi mhi0: Power on setup success
[ 373.442954] mhi mhi0: Device failed to clear MHI Reset
[ 373.442970] mhi mhi0: MHI did not enter READY state
And requires a full host power cycle to recover,
even outside of VFIO scenarios.
* MHI Host driver's remove callback may handle clean software state
teardown, but it doesn't provide a PCI reset capability that VFIO can
invoke. VFIO needs a reset method registered in the PCI reset hierarchy
(device_specific, pm, flr, bus, etc.). VFIO invokes this reset both during
initial device binding (before the VM starts) and when reassigning the
device between VMs - without a working reset method, the device cannot
reach a clean state for initialization.
I hope this clarifies the scenario better. Please let me know if I can
provide more information or run any specific tests to help investigate this
further.
Thanks
Best regards
José Ignacio
prev parent reply other threads:[~2026-06-18 6:33 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-12 14:26 [PATCH v9] PCI: Add device-specific reset for Qualcomm devices Jose Ignacio Tornos Martinez
2026-06-12 15:12 ` Alex Williamson
2026-06-12 15:17 ` Bjorn Helgaas
2026-06-15 7:30 ` Jose Ignacio Tornos Martinez
2026-06-17 14:47 ` Manivannan Sadhasivam
2026-06-17 15:47 ` Jose Ignacio Tornos Martinez
2026-06-17 16:55 ` Manivannan Sadhasivam
2026-06-18 6:33 ` Jose Ignacio Tornos Martinez [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260618063309.9536-1-jtornosm@redhat.com \
--to=jtornosm@redhat.com \
--cc=alex@shazbot.org \
--cc=ath11k@lists.infradead.org \
--cc=ath12k@lists.infradead.org \
--cc=bhelgaas@google.com \
--cc=jjohnson@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=mani@kernel.org \
--cc=mhi@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox