mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2] PCI: Wait after FLR for devices that don't honor Immediate Readiness
@ 2026-10-10 16:05 Alexander Gruhlke
  2026-10-10 16:05 ` [PATCH 1/2] PCI: Don't treat ~0 as ready in pci_dev_wait() with RRS SV Alexander Gruhlke
  2026-10-10 16:05 ` [PATCH 2/2] PCI: Wait for readiness after FLR even with Immediate Readiness Alexander Gruhlke
  0 siblings, 2 replies; 7+ messages in thread
From: Alexander Gruhlke @ 2026-10-10 16:05 UTC (permalink / raw)
  To: Bjorn Helgaas
  Cc: Lukas Wunner, Rafael J . Wysocki, Alex Williamson, Hui Wang,
	linux-pci, linux-kernel, regressions, Alexander Gruhlke

Since v7.2, VFIO passthrough of a Samsung 990 PRO NVMe [144d:a80c] fails
on the second VM start (QEMU: "invalid PCI interrupt pin 255"), and the
device is inaccessible until reboot.  Reverting 10baa9b4df40 ("PCI: Drop
unnecessary retries when restoring BARs") fixes it.

The drive advertises Immediate Readiness, so pcie_flr() doesn't wait,
but it returns ~0 for 1-7 ms after every FLR.  The config restore is
lost, and vfio-pci then saves and later restores an all-ones config
space.  The Root Port has RRS Software Visibility enabled, and the drive
returns ~0 rather than RRS, so pci_dev_wait() wouldn't catch it either.
That is the same problem as the open d591f6804e7e regression with the
Intel [8086:0a54], hence patch 1.

Tested on v7.2.9 (Ryzen 9 7950X, X670E): with the series, three VM
starts in a row work and pci_dev_wait() reports "ready 1ms" to "ready
7ms after FLR".  Applies to pci/next.

Another user reports the same with a 990 EVO Plus [144d:a80d]:
https://bbs.archlinux.org/viewtopic.php?id=314833

#regzbot introduced: 10baa9b4df40

Alexander Gruhlke (2):
  PCI: Don't treat ~0 as ready in pci_dev_wait() with RRS SV
  PCI: Wait for readiness after FLR even with Immediate Readiness

 drivers/pci/pci.c | 24 +++++++++++-------------
 1 file changed, 11 insertions(+), 13 deletions(-)

-- 
2.56.0


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-10-11  8:25 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-10 16:05 [PATCH 0/2] PCI: Wait after FLR for devices that don't honor Immediate Readiness Alexander Gruhlke
2026-10-10 16:05 ` [PATCH 1/2] PCI: Don't treat ~0 as ready in pci_dev_wait() with RRS SV Alexander Gruhlke
2026-10-10 18:36   ` Lukas Wunner
2026-10-11  8:24     ` Alexander Gruhlke
2026-10-10 16:05 ` [PATCH 2/2] PCI: Wait for readiness after FLR even with Immediate Readiness Alexander Gruhlke
2026-10-10 17:51   ` Lukas Wunner
2026-10-11  8:25     ` Alexander Gruhlke

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®