Skip to content

hwpmc: add AMD Zen3 IBS errata workarounds (1293, 1238, 1347)#2200

Open
afscoelho wants to merge 1 commit into
freebsd:mainfrom
AMDESE:pr/pmc/ibs-errata
Open

hwpmc: add AMD Zen3 IBS errata workarounds (1293, 1238, 1347)#2200
afscoelho wants to merge 1 commit into
freebsd:mainfrom
AMDESE:pr/pmc/ibs-errata

Conversation

@afscoelho
Copy link
Copy Markdown
Contributor

@afscoelho afscoelho commented May 15, 2026

Summary

  • hwpmc: add AMD Zen3 IBS errata workarounds (# 1293, # 1238, # 1347)

@afscoelho afscoelho force-pushed the pr/pmc/ibs-errata branch from 3659f88 to 24c2050 Compare May 15, 2026 19:25
@afscoelho
Copy link
Copy Markdown
Contributor Author

Hi @mashtizadeh / @mhorne, Thanks for your time

@emaste
Copy link
Copy Markdown
Member

emaste commented May 15, 2026

What are #1293/#1238/#1347 in the commit title? GitHub renders them as three miscellaneous unrelated pull requests.

@afscoelho
Copy link
Copy Markdown
Contributor Author

What are #1293/#1238/#1347 in the commit title? GitHub renders them as three miscellaneous unrelated pull requests.

Sorry, those are AMD Family 19h errata numbers, not GitHub PR refs. Will reword to avoid the # autolink.

@afscoelho afscoelho changed the title hwpmc: add AMD Zen3 IBS errata workarounds (#1293, #1238, #1347) hwpmc: add AMD Zen3 IBS errata workarounds (1293, 1238, 1347) May 15, 2026
@mashtizadeh
Copy link
Copy Markdown
Contributor

Again this is like that other patch, if the errata only causes bits to be questionable we should resolve this in the tools I that I showed you, not in the kernel. Otherwise, wIt’s going to become a spaghetti of attempts to clear bits.

I didn’t handle any of them yet but with the new pmc tools you’ll be able to put them in one central place for post-processing. It also has the cpuids saved so you can almost verbatim copy this code into it at some point.

freebsd#1347)

Handle three Family 19h IBS errata in the consumer (pmcstat), keyed off
the producer-side cpuid carried in PMCLOG_TYPE_INITIALIZE:

- freebsd#1238 (<10h): suppress IbsIcMiss in pmcstat fetch decode -- the
  IBS_FETCH_CTL IcMiss bit reports bogus values on affected parts.
- freebsd#1293 (00h-0Fh): mask the L2Miss and OpDcMissOpenMemReqs fields of
  IBS_OP_DATA3 in pmcstat op decode when DcMissNoMabAlloc or SwPf is
  set in the same sample -- those fields (and IBS_OP_DATA2, which
  pmcstat does not display) are invalid in that case.
- freebsd#1347 (<10h): L1TLB page-size uses an alternate encoding; defer the
  decode and leave a comment for future post-processing tooling.

Sanitization lives in pmcstat, not in hwpmc, so raw pmclog data is
preserved for consumers that want to filter (or interpret) the errata
differently.

Sponsored by:   AMD
Signed-off-by:  Andre Silva <andasilv@amd.com>
@afscoelho afscoelho force-pushed the pr/pmc/ibs-errata branch from 24c2050 to d2026a7 Compare May 18, 2026 17:19
@afscoelho
Copy link
Copy Markdown
Contributor Author

afscoelho commented May 18, 2026

mashtizadeh

Hmm, ok same logic as #2143, I'll move the DATA2 zeroing and the two DATA3 bit clears into pmcstat_print_ibs_op next to the existing 1238 handling, drop the kernel hunk, and resubmmit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants