linux-stable/drivers/pci
Alex Williamson c9082e6565 PCI/PM: Extend D3hot delay for NVIDIA HDA controllers
[ Upstream commit a5a6dd2624 ]

Assignment of NVIDIA Ampere-based GPUs have seen a regression since the
below referenced commit, where the reduced D3hot transition delay appears
to introduce a small window where a D3hot->D0 transition followed by a bus
reset can wedge the device.  The entire device is subsequently unavailable,
returning -1 on config space read and is unrecoverable without a host
reset.

This has been observed with RTX A2000 and A5000 GPU and audio functions
assigned to a Windows VM, where shutdown of the VM places the devices in
D3hot prior to vfio-pci performing a bus reset when userspace releases the
devices.  The issue has roughly a 2-3% chance of occurring per shutdown.

Restoring the HDA controller d3hot_delay to the effective value before the
below commit has been shown to resolve the issue.  NVIDIA confirms this
change should be safe for all of their HDA controllers.

Fixes: 3e347969a5 ("PCI/PM: Reduce D3hot delay with usleep_range()")
Link: https://lore.kernel.org/r/20230413194042.605768-1-alex.williamson@redhat.com
Reported-by: Zhiyi Guo <zhguo@redhat.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Tarun Gupta <targupta@nvidia.com>
Cc: Abhishek Sahu <abhsahu@nvidia.com>
Cc: Tarun Gupta <targupta@nvidia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-05-11 23:11:23 +09:00
..
controller PCI: imx6: Install the fault handler only on compatible match 2023-05-11 23:11:21 +09:00
endpoint PCI: endpoint: pci-epf-vntb: Add epf_ntb_mw_bar_clear() num_mws kernel-doc 2023-03-10 09:28:49 +01:00
hotplug PCI: pciehp: Fix AB-BA deadlock between reset_lock and device_lock 2023-05-11 23:10:49 +09:00
msi PCI/MSI: Remove over-zealous hardware size check in pci_msix_validate_entries() 2023-04-26 14:30:08 +02:00
pcie PCI/EDR: Clear Device Status after EDR error recovery 2023-05-11 23:11:22 +09:00
switch PCI: switchtec: Return -EFAULT for copy_to_user() errors 2023-03-10 09:28:49 +01:00
Kconfig genirq: Get rid of GENERIC_MSI_IRQ_DOMAIN 2022-11-17 15:15:20 +01:00
Makefile
access.c PCI: Access Link 2 registers only for devices with Links 2022-11-04 10:38:11 -05:00
ats.c PCI: Enable PASID only when ACS RR & UF enabled on upstream path 2022-11-03 15:47:47 +01:00
bus.c PCI: s390: Fix use-after-free of PCI resources with per-function hotplug 2023-03-22 13:37:46 +01:00
doe.c PCI/DOE: Fix memory leak with CONFIG_DEBUG_OBJECTS=y 2023-04-13 17:02:42 +02:00
ecam.c
host-bridge.c
iov.c PCI/IOV: Enlarge virtfn sysfs name buffer 2023-03-10 09:28:49 +01:00
irq.c PCI: Check for alloc failure in pci_request_irq() 2022-11-21 16:55:18 -06:00
mmap.c
of.c
p2pdma.c for-6.2/block-2022-12-08 2022-12-13 10:43:59 -08:00
pci-acpi.c PCI/ACPI: Account for _S0W of the target bridge in acpi_pci_bridge_d3() 2023-03-11 13:50:38 +01:00
pci-bridge-emul.c
pci-bridge-emul.h
pci-driver.c PCI: Unify delay handling for reset and resume 2023-03-10 09:29:54 +01:00
pci-label.c
pci-mid.c
pci-pf-stub.c
pci-stub.c
pci-sysfs.c pci-v6.2-changes 2022-12-14 09:54:10 -08:00
pci.c PCI: loongson: Prevent LS7A MRRS increases 2023-03-11 13:50:41 +01:00
pci.h PCI/DPC: Await readiness of secondary bus after reset 2023-03-10 09:29:54 +01:00
probe.c PCI: Fix dropping valid root bus resources with .end = zero 2023-03-10 09:28:56 +01:00
proc.c
quirks.c PCI/PM: Extend D3hot delay for NVIDIA HDA controllers 2023-05-11 23:11:23 +09:00
remove.c PCI: Fix use-after-free in pci_bus_release_domain_nr() 2023-04-20 12:36:58 +02:00
rom.c
search.c
setup-bus.c PCI: Distribute available resources for root buses, too 2023-03-11 13:50:44 +01:00
setup-irq.c
setup-res.c
slot.c
syscall.c
vc.c
vgaarb.c
vpd.c
xen-pcifront.c xen: make remove callback of xen driver void returned 2022-12-15 16:06:10 +01:00