Fix incorrect bitmask for MBM counter length#299
Fix incorrect bitmask for MBM counter length#299shenxiaochen wants to merge 1 commit intointel:masterfrom
Conversation
From Intel RDT spec[1] and AMD Platform QoS spec[2]: If the CPU platform supports CPUID.0FH.01H:EAX, CPUID.0FH.01H:EAX[7:0] returns MBM counter length (width) as offset from 24. But in hw_cap_mon_discover(), the MBM counter length is calculated with incorrect 7-bits bitmask (0x7f). Fix the issue with 8-bits bitmask (0xff) for MBM counter length. [1] Intel Architectures SDM, Vol.3B, 19.18 Intel RDT Monitoring: https://cdrdv2.intel.com/v1/dl/getContent/671200 [2] AMD Platform QoS Extensions, Rev 1.03: https://www.amd.com/content/dam/amd/en/documents/processor-tech-docs/other/56375_1_03_PUB.pdf Fixes: 050f8c6 ("lib: detect MBM counter length") Signed-off-by: Xiaochen Shen <shenxiaochen@open-hieco.net>
|
Hi Xiaochen, |
|
Update -- we have reviewed and plan to approve. We will merge this with the next RDT Utility release in Q1-2026, and we will include this fix as part of that, and the pull request will be marked as accepted at that point. |
There was a problem hiding this comment.
Pull request overview
This PR fixes an incorrect bitmask used when calculating the MBM (Memory Bandwidth Monitoring) counter length from CPUID data. The issue stems from using a 7-bit mask (0x7f) instead of the correct 8-bit mask (0xff) as specified in both Intel RDT and AMD Platform QoS specifications.
- Corrects the bitmask from
0x7fto0xffto properly extract bits [7:0] from CPUID.0FH.01H:EAX - Aligns the implementation with Intel and AMD architectural specifications
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Merged by |
Description
From Intel RDT spec[1] and AMD Platform QoS spec[2]: If the CPU platform supports CPUID.0FH.01H:EAX, CPUID.0FH.01H:EAX[7:0] returns MBM counter length (width) as offset from 24.
But in hw_cap_mon_discover(), the MBM counter length is calculated with incorrect 7-bits bitmask (0x7f).
Fix the issue with 8-bits bitmask (0xff) for MBM counter length.
[1] Intel Architectures SDM, Vol.3B, 19.18 Intel RDT Monitoring: https://cdrdv2.intel.com/v1/dl/getContent/671200
[2] AMD Platform QoS Extensions, Rev 1.03:
https://www.amd.com/content/dam/amd/en/documents/processor-tech-docs/other/56375_1_03_PUB.pdf
Fixes: 050f8c6 ("lib: detect MBM counter length")
Affected parts
Motivation and Context
Fix incorrect bitmask for MBM counter length
How Has This Been Tested?
https://github.com/intel/intel-cmt-cat/wiki/Usage-Examples
Types of changes
Checklist: