However, doingSystem software can temporarily disengage opportunistic processor performance operation by setting bit 32 of the
IA32_PERF_CTL MSR (0199H), using a read-modify-write sequence on the MSR.
Code: Select all
#define IA32_PERF_CTL 0x00000199
uint32_t a, d;
asm volatile (
"rdmsr\n\t"
"or $0x1, %%edx\n\t"
"wrmsr\n\t"
: "=a" (a), "=d" (d) : "c" (IA32_PERF_CTL)
);
I haven't seen any prerequisites that need to be ensured before writing to IA32_PERF_CTL, am I missing something resulting in this #GP?
