diff --git a/sys/x86/include/x86_var.h b/sys/x86/include/x86_var.h index 701b982e6af..215fe056246 100644 --- a/sys/x86/include/x86_var.h +++ b/sys/x86/include/x86_var.h @@ -171,6 +171,8 @@ uint64_t rdtsc_ordered(void); /* * Where and which execution mode + * + * All modes cause execution on the target CPU(s) with interrupts disabled. */ #define MSR_OP_LOCAL 0x10000000 #define MSR_OP_SCHED_ALL 0x20000000 diff --git a/sys/x86/x86/cpu_machdep.c b/sys/x86/x86/cpu_machdep.c index 5cbcb40540b..5f8965bd561 100644 --- a/sys/x86/x86/cpu_machdep.c +++ b/sys/x86/x86/cpu_machdep.c @@ -160,6 +160,7 @@ x86_msr_op(u_int msr, u_int op, uint64_t arg1, uint64_t *res) struct thread *td; struct msr_op_arg a; cpuset_t set; + register_t flags; u_int exmode; int bound_cpu, cpu, i, is_bound; @@ -171,7 +172,9 @@ x86_msr_op(u_int msr, u_int op, uint64_t arg1, uint64_t *res) switch (exmode) { case MSR_OP_LOCAL: + flags = intr_disable(); x86_msr_op_one(&a); + intr_restore(flags); break; case MSR_OP_SCHED_ALL: td = curthread;