Re: [PATCH] PCI/ASPM: Don't reconfigure ASPM entering low-power state

From: Carlos Bilbao

Date: Wed May 06 2026 - 22:52:11 EST


Hey Bjorn.

On 5/6/26 11:10, Bjorn Helgaas wrote:
On Mon, Apr 27, 2026 at 09:01:04PM -0700, Carlos Bilbao (Lambda) wrote:
From: Carlos Bilbao <carlos.bilbao@xxxxxxxxxx>

Reconfiguring ASPM when a device transitions to low-power state can enable
L1.1/L1.2 substates on the PCIe link at a time when the device is sleeping
and may be unable to exit them. ASPM should be reconfigured on D0 entry
(resume), not on the way down.

pci_set_low_power_state() calls pcie_aspm_pm_state_change() after writing
D3hot to PCI_PM_CTRL. pcie_aspm_pm_state_change() resets link->aspm_capable
to link->aspm_support and then calls pcie_config_aspm_path(), which can
enable ASPM L1.1/L1.2 substates on the PCIe link. If the device cannot
recover the link from L1.2 while in D3hot, subsequent config space reads
return 0xFFFF ("device inaccessible") and pci_power_up() fails with message
"Unable to change power state from D3hot to D0, device inaccessible".
Carlos, do you have a few lines of dmesg showing this issue that we
could quote to help people match the issue with this fix?


Thank you for reviewing this. Only the error message:

[160459.607156] vfio-pci 0000:5d:00.0: Unable to change power state from D3cold to D0, device inaccessible


Thanks,

Carlos