Cp pci domain fix - #1268
Open
manoj-freyr wants to merge 5 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix PEQT segfault and kernel_driver detection on multi-domain PCIe systems
PEQT, SMQT, and PESM matched PCI devices to GPUs using only bus/dev/func
(location_id) and ignored the PCIe domain. On systems with multiple domains
(e.g. 0000: and 0001:), unrelated devices can share the same location_id
— a GPU at 0000:05:00.0 and a bridge at 0001:05:00.0 both map to 0x0500.
Those modules then ran PCIe capability queries on the wrong device; libpci
state (notably dev->access) was corrupted and get_kernel_driver() segfaulted
dereferencing it.
Use domlocation2gpu(domain, location_id) so only the intended GPU BDF is
matched.
Clanmup and Hardening changes:
libpci dev->access/readlink, avoiding bad access pointers while still
reporting amdgpu.
DSR loop on failed/empty reads instead of aborting mid-query.