Page MenuHomeFreeBSD

Use PCI power-mgmt to reset a device if FLR fails.
ClosedPublic

Authored by grehan on May 2 2018, 4:57 PM.
Tags
None
Referenced Files
F82134651: D15268.id.diff
Thu, Apr 25, 8:00 PM
Unknown Object (File)
Fri, Apr 19, 3:19 AM
Unknown Object (File)
Mon, Apr 1, 1:14 PM
Unknown Object (File)
Sun, Mar 31, 2:29 PM
Unknown Object (File)
Mar 16 2024, 3:58 PM
Unknown Object (File)
Mar 11 2024, 3:52 AM
Unknown Object (File)
Jan 27 2024, 7:35 AM
Unknown Object (File)
Dec 23 2023, 3:08 AM
Subscribers

Details

Summary

A large number of devices don't support PCIe FLR, in particular
graphics adapters. Use PCI power management to perform the
reset if FLR fails or isn't available, by cycling the device
through the D3 state.

This has been tested by a number of users with Nvidia and AMD GPUs.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

I click 'ok' with some reservations, however. Really old PCI devices may have issues with this, and the reset by going into D3 state isn't complete on some devices. However, despite those reservations, I think for the set of hardware that's relevant for FreeBSD and given that D3->D0 reset is the best we have for some devices it's a reasonable tradeoff. Since it's not in the bus code itself, it should present no problems.

This revision is now accepted and ready to land.May 2 2018, 5:01 PM

bhyve passthru is currently restricted to the subset of devices that can support MSI/MSI-x so this doesn't come into play for older PCI devices.

Is this the workaround developed with macy?

Yes, this code was submitted by Matt M.

Yes, this is effectively the patch from Matt which I think I've reviewed before. I think this is fine. Some devices also support FLR via non-PCI-e means (PCI advanced features capability) but I don't think the GPUs do.

bhyve passthru is currently restricted to the subset of devices that can support MSI/MSI-x so this doesn't come into play for older PCI devices.

So much the better. All the rogues I know in this area are pre-PCIe, pre-MSI.

This revision was automatically updated to reflect the committed changes.