User Details
- User Since
- Mar 1 2026, 12:50 PM (6 w, 2 d)
Mon, Mar 23
Address ali_mashtizadeh.com feedback:
Sun, Mar 22
Mar 12 2026
You are correct, thank you for the observation. pmcstat does not exercise amd_get_msr() directly. The correct test path is via pmc_x86_get_msr() from libpmc, which issues a PMC_OP_GETMSR ioctl into the kernel amd_get_msr() code path.
Hardware validation was performed on AMD Ryzen 5 5600X (Family 19h, Zen 3), FreeBSD 16.0-CURRENT (hwpmc-amd-work-n284229-d18be873e2c2):
Mar 3 2026
Added documentation references per Adrian Chadd's review feedback.
Added AMD BKDG 24594 rev 3.37 page 440 and AMD PPR 57930-A0
references to amd_get_msr() comments.
Mar 2 2026
Updated fix based on Ali Mashtizadeh's review feedback.
Thank you for pointing to the CMN-600 approach. I've looked at
hwpmc_cmn600.c and I think it will be a good approach for new
hwpmc_amd.c code.
Thank you for the clarification. I now understand the RDPMC mapping
from AMD BKDG page 440, including the non-contiguous DF range
(ECX 6-9 and ECX 16-27).
Updated diff: simplified fix to return ri directly as flat RDPMC index.
Updated amd_get_msr() fix based on reviewer feedback from ali_mashtizadeh.
Updated amd_get_msr() fix based on reviewer feedback.