I need to control C-State configuration. Specifically, I'd probably like to execute the following asm code:
__asm
{
rdmsr
and eax, 0x00
or eax, 0x01
wrmsr
}
Currently, I got this exception on rdmsr
line:
Unhandled exception at 0x00e3139e in MessWithCStates.exe: 0xC0000096: Privileged instruction.
How can I (permanently) elevate priviliges of my app so it could execute the code above? I use VS 2010.
NOTE: It is possible without writing a kernel-mode driver. See R/W Everything.