The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [RFC PATCH 0/1] vfio/pci: Wait for GB202 firmware after reset
@ 2026-11-14  2:48 Gustavo A.
  2026-11-14  2:49 ` [RFC PATCH] vfio/pci: Wait for GB202 firmware initialization " Gustavo A.
  2026-11-14 23:58 ` [RFC PATCH 0/1] vfio/pci: Wait for GB202 firmware " Jason Gunthorpe
  0 siblings, 2 replies; 4+ messages in thread
From: Gustavo A. @ 2026-11-14  2:48 UTC (permalink / raw)
  To: Alex Williamson
  Cc: Bjorn Helgaas, Jason Gunthorpe, kvm, linux-pci, linux-kernel,
	gustavogyn

On the affected system, GPU passthrough worked with the CachyOS 7.2.10
host kernel. After upgrading the host to 7.3, the guest still booted but
its physical display stayed grey. The exact triggering change is unknown,
so this patch has no Fixes tag.

PCI reset returns successfully while the Firmware Security Processor (FSP)
is still initializing. Restricting BAR1 to 4 KiB mappings masks the problem.
Waiting for FSP completion after reset restores normal output with stock
KVM and verified 1 GiB BAR1 mappings.

The RFC question is where this wait belongs. It currently follows
successful resets in the VFIO enable, reset ioctl, PCIe/AF FLR and hot-reset
paths. Would a PCI-core readiness check after state restoration be more
appropriate? A device-specific reset method runs before BAR and state
restoration and does not cover all bus resets. The existing reset_done
callback cannot propagate errors.

Validation:
- Local host and Linux guest: 7.3.4-1-cachyos, QEMU 11.1.3, GPU 10de:2b85.
  The physical display works with startup tracing disabled. The submitted
  readiness code adds only an IORESOURCE_UNSET guard to this tested code.
  A focused check fails without the guard and passes with it.
- Rebased onto mainline 97d73c825122 (7.4-rc2). Full W=1 builds pass with
  GCC 16.2.1 (VFIO modules, PM enabled) and Clang 23.1.5 (VFIO built in,
  PM disabled). No VFIO compiler warnings. Unrelated warnings remain.
- 79 helper checks and 51 reset-path checks pass using extracted source
  with modeled PCI, time and locking. The unpatched reset-path baseline
  fails 22 checks. The hot-reset model covers completion and unwind for
  three devices, excluding ownership validation and initial locking.
- Strict checkpatch and kernel-doc pass. Sparse 0.6.4 reports the same 17
  diagnostics on patched and unpatched code, with no added findings.

The rebased mainline kernel has not been booted. Runtime lockdep, D3/resume
and repeated hardware reset cycles remain untested. Hardware testing covers
only the device listed above.

Related FSP-ordering work:
https://lists.openwall.net/linux-kernel/2026/06/15/1402

Gustavo A. (1):
  vfio/pci: Wait for GB202 firmware initialization after reset

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

end of thread, other threads:[~2026-11-15  1:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-14  2:48 [RFC PATCH 0/1] vfio/pci: Wait for GB202 firmware after reset Gustavo A.
2026-11-14  2:49 ` [RFC PATCH] vfio/pci: Wait for GB202 firmware initialization " Gustavo A.
2026-11-14 23:58 ` [RFC PATCH 0/1] vfio/pci: Wait for GB202 firmware " Jason Gunthorpe
     [not found]   ` <CAPZV9qUvgKjoBXGjYXJzwnCmqzSfu781ZSG8zW6Fn4PokUN2uQ@mail.gmail.com>
2026-11-15  1:47     ` Gustavo Andrade

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