Thread (7 messages) flat view 7 messages, 3 authors, 1d ago
WARM1d

[PATCH iwl-net 0/2] idpf: stop stray device writes after a warm reboot

From: Tian Xun Ng <hidden>
Date: 2026-09-17 10:52:14
Also in: intel-wired-lan

From: Tian Xun Ng <redacted>

After a warm reboot with idpf loaded, the device writes SW_MARKER TX
completions to DMA addresses that belong to the previous kernel, about
20 seconds into the next boot. With the IOMMU translating, this shows up
as a burst of F_TRANSLATION faults from the idpf PCI functions on every
such boot. In IOMMU pass-through mode the writes corrupt memory the new
kernel has already reused, and nodes crash in unrelated code (page table
freeing, slab allocation).

The cause is in idpf_shutdown(). Since commit 4c9106f4906a ("idpf: fix
adapter NULL pointer dereference on reboot") it no longer goes through
idpf_remove(), so idpf_vc_core_deinit() shuts the virtchnl transaction
manager down before the vports are torn down. The disable and destroy
messages then fail and the device keeps its queues enabled.

Patch 1 keeps the mailbox up for that teardown unless a hard reset is in
progress or has been detected. Patch 2 restores the function reset that
idpf_remove() performs on exit.

Testing:
- The same two changes, backported to a 6.17 kernel, were run on arm64
  (64K pages) servers with two idpf functions: no stray device writes in
  151 warm reboots (130 in IOMMU pass-through mode with page_poison=1,
  21 with the IOMMU translating), against stray writes after 20 of 20
  warm reboots on an unpatched control node.
- Not covered: restarts after a kernel crash, and a device that cannot
  answer at shutdown; the writes still occur in those cases.
- This series is those changes ported to the dev-queue branch of
  tnguy/net-queue. On this tree it is build-tested only: W=1 builds of
  drivers/net/ethernet/intel/idpf with arm64 defconfig (plus IDPF),
  allmodconfig and allyesconfig, with no warnings. It has not been run
  on hardware on this tree.

An LLM coding assistant helped analyse the crash dumps and fault logs,
locate the shutdown ordering problem, and draft both changes and their
changelogs. Both patches carry an Assisted-by tag.

Tian Xun Ng (2):
  idpf: keep the mailbox up while tearing down vports on shutdown
  idpf: reset the function on shutdown

 drivers/net/ethernet/intel/idpf/idpf_main.c    |  3 +++
 .../net/ethernet/intel/idpf/idpf_virtchnl.c    | 18 +++++++++++++-----
 2 files changed, 16 insertions(+), 5 deletions(-)


base-commit: a98bd9f12dc5ed64029d00a8192a28685a54a587
-- 
2.50.1 (Apple Git-155)
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help