LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Andi Kleen <andi@firstfloor.org>
To: "Jan Beulich" <jbeulich@novell.com>
Cc: <mingo@elte.hu>, <tglx@linutronix.de>, <hpa@zytor.com>,
<markus.t.metzger@intel.com>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] x86: prevent unconditional writes to DebugCtl MSR
Date: 10 Mar 2008 16:56:47 +0100 [thread overview]
Message-ID: <87r6ei8tds.fsf@basil.nowhere.org> (raw)
In-Reply-To: <47D54185.76E4.0078.0@novell.com>
"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
next prev parent reply other threads:[~2008-03-10 15:57 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-10 13:11 Jan Beulich
2008-03-10 15:56 ` Andi Kleen [this message]
2008-03-10 17:14 ` Ingo Molnar
2008-04-18 19:43 Roland McGrath
2008-04-21 15:55 ` Ingo Molnar
2008-04-21 16:34 ` Jan Beulich
2008-04-21 21:30 ` Roland McGrath
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87r6ei8tds.fsf@basil.nowhere.org \
--to=andi@firstfloor.org \
--cc=hpa@zytor.com \
--cc=jbeulich@novell.com \
--cc=linux-kernel@vger.kernel.org \
--cc=markus.t.metzger@intel.com \
--cc=mingo@elte.hu \
--cc=tglx@linutronix.de \
--subject='Re: [PATCH] x86: prevent unconditional writes to DebugCtl MSR' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).