Repository navigation
Add blacklisted IDs and exclude non-hybrid CPUs from intel-lpmd - #286
Closed
hotline1337 wants to merge 2 commits into
Closed
hotline1337 wants to merge 2 commits into
hotline1337 wants to merge 2 commits into
Conversation
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The blacklist is preserved through profile parsing and serialization, applied by existing matching logic, and adequately tested.
Review effort: Balanced
Findings: None
What changed in this PR
Adds blacklist field support so intel-lpmd is not offered on unsupported non-hybrid Alder Lake-S CPUs.
Changes:
- Parses and serializes hardware ID blacklists.
- Excludes PCI device
4650fromintel-lpmd. - Adds parsing and matching tests.
| File | Description |
|---|---|
src/profile.rs |
Adds blacklist parsing, serialization, and tests. |
src/data.rs |
Tests blacklist-based device rejection. |
profiles/pci/power_management/profiles.toml |
Blacklists the non-hybrid Alder Lake-S host bridge. |
tests/profiles/cpu-profile-test.toml |
Adds blacklist data to the parser fixture. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Author
|
Superseded by #287 |
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.
Summary
blacklisted_device_ids,blacklisted_class_ids, andblacklisted_vendor_idsinsrc/profile.rs(the fields and filtering logic already existed inHardwareIDandsrc/data.rs, but were never populated byparse_profile).intel-lpmdprofile by blacklisting Host Bridge PCI ID4650.Background & Problem
intel-lpmdrequires hybrid Intel CPU architecture (E-Cores). On non-hybrid processors such as the desktop Core i5-12400F, the service starts and exits immediately due to lack of hybrid core support.Both hybrid (e.g. i5-12600K, i7-12700K) and non-hybrid (e.g. i5-12400, i3-12100) Alder Lake-S desktop processors share the same CPU family (
6) and model (151). However, non-hybrid variants are physically strapped to Host Bridge device ID0x4650(6P+0E, 4P+0E, 2P+0E dies), while hybrid variants use0x4660(8P+8E) or0x4668(8P+4E).Blacklisting device
4650preventschwdfrom incorrectly matching and installingintel-lpmdon:i5-12600,i5-12600T,i5-12500,i5-12500T,i5-12490F,i5-12400,i5-12400F,i5-12400T,i3-12300,i3-12300T,i3-12100,i3-12100F,i3-12100T,Pentium Gold G7400/G7400T,Celeron G6900/G6900T.Changes
src/profile.rs: Readblacklisted_device_ids,blacklisted_class_ids, andblacklisted_vendor_idsinparse_profile(), and emit them inprofile_into_toml().src/data.rs: Added testblacklisted_device_id_rejects_matching_device.profiles/pci/power_management/profiles.toml: Addedblacklisted_device_ids = "4650"tointel-lpmd.tests/profiles/cpu-profile-test.toml: Updated test profile and test assertion.