AMDFamily17, IntelMSR: allow hardware-prefetcher / cache configuration MSRs#69
Open
yuzi-co wants to merge 1 commit into
Open
AMDFamily17, IntelMSR: allow hardware-prefetcher / cache configuration MSRs#69yuzi-co wants to merge 1 commit into
yuzi-co wants to merge 1 commit into
Conversation
Add the documented hardware-prefetcher / load-store / cache configuration MSRs to the read+write allow-lists so they can be used for CPU tuning: - AMDFamily17: LS_CFG (0xC0011020), IC_CFG (0xC0011021), DC_CFG (0xC0011022), LS_CFG2 (0xC001102B) -- AMD PPR, family 17h-1Ah. - IntelMSR: MSR_MISC_FEATURE_CONTROL (0x1A4) -- Intel SDM Vol. 4 prefetcher controls. Gated through the existing is_allowed_msr_read/write switches, same as the P-state / HWCR / CPPC writes the modules already permit. No arbitrary access.
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.
This adds the documented hardware-prefetcher, load-store, and cache configuration MSRs to the
AMDFamily17andIntelMSRallow-lists so they can be read and written for CPU tuning — the samekind of thing the modules already expose for P-state / HWCR / power-limit registers.
What changed
AMDFamily17.p— added to bothis_allowed_msr_readandis_allowed_msr_write:MSR_LS_CFG0xC0011020MSR_IC_CFG0xC0011021MSR_DC_CFG0xC0011022MSR_LS_CFG20xC001102B(AMD PPR for family 17h–1Ah; these registers hold the hardware prefetcher and speculation controls.)
IntelMSR.p— added to both allow-lists:MSR_MISC_FEATURE_CONTROL0x1A4Why
These are the standard, vendor-documented registers for toggling the hardware prefetchers and
related load/store behaviour. They're useful for tuning memory-latency-sensitive workloads, where
the prefetchers can hurt throughput on random-access patterns. Right now there's no signed way to
touch them on a modern (Secure Boot / HVCI) Windows box without an unsafe WinRing0-style driver —
which is exactly what PawnIO is meant to replace.
Safety / scope
is_allowed_msr_read/is_allowed_msr_writeswitches — no arbitraryMSR access is introduced; only these specific, documented config registers are permitted, exactly
as the modules already gate writes to the P-state, HWCR, CSTATE, CPPC, and power-limit MSRs.
family 0x17–0x1Acheck; Intel by theCpuVendor_Intelcheck.warnings.
Happy to adjust naming, split the AMD/Intel changes, or narrow the set if you'd prefer.