Messages in this thread | | | Subject | Re: [PATCH] x86: prevent unconditional writes to DebugCtl MSR | From | Andi Kleen <> | Date | 10 Mar 2008 16:56:47 +0100 |
| |
"Jan Beulich" <jbeulich@novell.com> writes: > > +static inline void update_debugctlmsr(unsigned long debugctlmsr) > +{ > +#ifndef CONFIG_X86_DEBUGCTLMSR > + if (boot_cpu_data.x86 < 6) > + return; > +#endif > + wrmsrl(MSR_IA32_DEBUGCTLMSR, debugctlmsr);
It would be better to use checking_wrmsrl() instead of the model check because often VMs etc. are missing such MSRs too, but report the higher family number.
Also silently failing is not very nice, but that's a different issue.
-Andi
| |