Privileged Instruction

I would like to use the command RDMSR and WRMSR to access the MSR of my cpu,
but theses instruction require to be executed in ring0 on processor (ie
kernel mode).
How can i do that ?

Thanx in advance

Founadi Kamel <founad_m@epitech.net> wrote in message
news:bheait$jg8$1@inn.qnx.com

I would like to use the command RDMSR and WRMSR to access the MSR of my
cpu,
but theses instruction require to be executed in ring0 on processor (ie
kernel mode).
How can i do that ?

The only way to execute a ring0 instruction is to do so in an ISR. A word
of warning, changing MSRs behind the back of the OS can be potentially
unfriendly (depending on what you change).

-Adam