Re: MSR: some random thoughts (it's saturday, sorry if they feel a , little week-endish...)

Rogier Wolff (R.E.Wolff@BitWizard.nl)
Sun, 16 Nov 1997 01:15:33 +0100 (MET)


Lorenzo M. Catucci wrote:
>
> Stephan, and the other,
> at first, I think that MSR stuff should go into /proc/_PID_
> pseudofiles, to make the owner of the process able to track its
> performances. Since /proc/_PID_ is owned from the owner of the process,
> all of the security issues could be stopped then. Tell me if I am wrong...
> Second, I think that we should some way attempt to mimic the
> performance saver idea from FPU context switch: don't save MSR status when
> unneeded: just add a single flag to signal that some MSR was set/read, and
> then do the expensive MSR save in context switch only if the flag is
> enabled. I fear many people would otherwise avoid compiling MSR support
> into the kernel.
>
> Nice time to anybody...

There is some discussion of what the "interface" should be, right?

How about this?

rmsr is priviliged, and will signal "illegal instruction" when run
from userspace. If the option in the kernel is enabled, the illegal
instruction handler finds the [r/w]msr instruction at the faulting
address, and executes the instruction for you and returns.

Roger.

-- 
** R.E.Wolff@BitWizard.nl ** +31-15-2137555 ** http://www.BitWizard.nl/ **
Florida -- A 39 year old construction worker woke up this morning when a
109-car freight train drove over him. According to the police the man was 
drunk. The man himself claims he slipped while walking the dog. 080897