HomeFreeBSD

x86: Handle when MPERF/APERF MSRs aren't writable

Description

x86: Handle when MPERF/APERF MSRs aren't writable

For performance and/or correct reasons some hypervisors allow
MPERF/APERF MSRs to be read but not written to. This change
modifies the handling of these MSRs to not rely on writes.
This patch is part of Google Cloud Engine (GCE) C4-LSSD turnup.

Sponsored by: Google
Tested by: NetApp (previous)
PR: 292808
MFC after: 3 days
Co-authored-by: Jim Mattson <jmattson@google.com>
Reviewed by: jrtc27, imp, kib, markj, olce, obiwac
Differential Revision: https://reviews.freebsd.org/D55996

(cherry picked from commit 7e7d4e711ff94d114c93fd522d4125aa9bd9f5cd)

Details

Provenance
Matt Delco <delco@google.com>Authored on Mar 26 2026, 5:30 PM
ziaeeCommitted on Aug 6 2026, 10:25 PM
Reviewer
jrtc27
Differential Revision
D55996: x86: Handle when MPERF/APERF MSRs aren't writable
Parents
rG7a068100b4b5: x86: Guard clock frequency against a divide by 0
Branches
Unknown
Tags
Unknown