-
Notifications
You must be signed in to change notification settings - Fork 176
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added a procfs check for pcie peripherals to verify device ID. #429
base: master
Are you sure you want to change the base?
Conversation
try: | ||
with open(current_file, 'rb') as f: | ||
f.seek(2) | ||
data = f.read(2) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@assrinivasan does this result in real pcie transaction?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This does not -- this gets the intended device ID of the PCIe device by querying the procfs data file directly, thereby bypassing any SCD driver hijack or pcie*.yaml file weirdness. I added the actual transaction check in the latest commit.
Description
This PR adds a procfs check for PCI peripherals. It provides a device ID check to ensure that the PCI peripherals match the pcie.yaml manifest, including undercutting PCI device hijack by other drivers that might change the device ID.
Motivation and Context
The motivation for this PR is to get ahead the 'ASIC missing' issue and provide a mechanism to auto-mitigate said issues.
Fixes #191
How Has This Been Tested?
Ran following tests:
on the following HardwareSKUs:
procfs_pcie_check_deviceid_mismatch_logs.txt
Additional Information (Optional)