All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andi Kleen <ak@linux.intel.com>
To: Vladimir Davydov <vdavydov@parallels.com>
Cc: Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
	Borislav Petkov <borislav.petkov@amd.com>,
	x86@kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] cpu: intel, amd: mask cleared cpuid features
Date: Fri, 20 Jul 2012 10:10:02 -0700	[thread overview]
Message-ID: <20120720171002.GE13032@tassilo.jf.intel.com> (raw)
In-Reply-To: <dd185bfa60b6478e7eb1bce455c9d082ec884abe.1342801662.git.vdavydov@parallels.com>

> +					unsigned int *msr_ext_cpuid_mask)
> +{
> +	unsigned int msr, msr_ext;
> +
> +	msr = msr_ext = 0;
> +
> +	switch (c->x86_model) {

You have to check the family too.

> +
> +	return msr;
> +}
> +
> +static void __cpuinit intel_mask_cpu_caps(struct cpuinfo_x86 *c)
> +{
> +	u32 low, high;
> +	unsigned int msr_cpuid_mask, msr_ext_cpuid_mask;
> +
> +	msr_cpuid_mask = intel_cpuid_mask_msr(c, &msr_ext_cpuid_mask);
> +	if (msr_cpuid_mask) {
> +		set_cpu_cap(c, X86_FEATURE_CPUIDMASK);
> +
> +		rdmsr(msr_cpuid_mask, low, high);

And please use rdmsrl(), rdmsr() is so 90ies

Other than that patch looks good. I presume it will be useful for
other things than just migration too.

-Andi

-- 
ak@linux.intel.com -- Speaking for myself only

  reply	other threads:[~2012-07-20 17:10 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-20 16:37 [PATCH 1/2] cpu: common: make clearcpuid option take bits list Vladimir Davydov
2012-07-20 16:37 ` [PATCH 2/2] cpu: intel, amd: mask cleared cpuid features Vladimir Davydov
2012-07-20 17:10   ` Andi Kleen [this message]
2012-07-20 17:18     ` H. Peter Anvin
2012-07-25 11:51     ` Vladimir Davydov
2012-07-20 17:20   ` H. Peter Anvin
2012-07-20 18:21     ` Vladimir Davydov
2012-07-20 20:19       ` H. Peter Anvin
2012-07-20 20:37         ` Vladimir Davydov
2012-07-21 10:37   ` Borislav Petkov
2012-07-24  7:06     ` Vladimir Davydov
2012-07-24  7:48       ` Borislav Petkov
2012-07-24  8:14       ` Andre Przywara
2012-07-24  8:29         ` Vladimir Davydov
2012-07-24 10:10           ` Borislav Petkov
2012-07-24 11:09             ` Vladimir Davydov
2012-07-24 12:34               ` Andre Przywara
2012-07-24 12:44                 ` Alan Cox
2012-07-25 10:31                   ` Vladimir Davydov
2012-07-25 10:58                     ` Andre Przywara
2012-07-25 11:02                       ` Vladimir Davydov
2012-07-25 11:17                         ` Andre Przywara
2012-07-25 11:43                           ` Vladimir Davydov
2012-07-25 11:31                     ` Alan Cox
2012-07-25 11:46                       ` Vladimir Davydov
2012-07-25 10:31                 ` Vladimir Davydov
2012-07-25 10:43                   ` Borislav Petkov
2012-07-25 11:39                     ` Vladimir Davydov
2012-07-25  0:57               ` H. Peter Anvin
2012-07-25  6:58                 ` Vladimir Davydov
2012-07-25 14:13                   ` H. Peter Anvin
2012-07-25 11:49                 ` Vladimir Davydov
2012-07-24  9:50         ` Borislav Petkov
2012-07-24 10:32           ` Alan Cox
2012-07-24 11:04             ` Borislav Petkov

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=20120720171002.GE13032@tassilo.jf.intel.com \
    --to=ak@linux.intel.com \
    --cc=borislav.petkov@amd.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=vdavydov@parallels.com \
    --cc=x86@kernel.org \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.