Rogier> There is some discussion of what the "interface" should
Rogier> be, right?
Rogier> How about this?
Rogier> rmsr is priviliged, and will signal "illegal instruction"
Rogier> when run from userspace. If the option in the kernel is
Rogier> enabled, the illegal instruction handler finds the
Rogier> [r/w]msr instruction at the faulting address, and executes
Rogier> the instruction for you and returns.
Well... I think we need to be careful about giving global access to
WRMSR. The profiling software (or other MSR-accessing software)
should do some checking first. However- RDMSR might be better to
allow anyone use- but RDPMC exists for this purpose (for profiling
MSRs). RDPMC allows (when CR4 is properly set) users to read the two
profiling counters- not all MSR registers, just the profiling regs.
Patrick
-- --------------------------------------------------------------------- M. Patrick Goda W: (505)667-5386 Los Alamos National Laboratory H: (505)989-4506 Theoretical Astrophysics, T-6 MS B288 mpg@nea.lanl.gov Los Alamos, NM 87545 http://qso.lanl.gov/~mpg --------------------------------------------------------------------- Snappy Quote: "abcdefghijklmnopqrstuvwxyz"* *some assembly required ---------------------------------------------------------------------