From: "Jan Beulich" Subject: [PATCH v2 1/3] x86/AMD: feature masking is unavailable on Fam11 Date: Mon, 07 Apr 2014 10:41:47 +0100 Message-ID: <53428EFB02000078000060B7@nat28.tlf.novell.com> References: <53428DCC020000780000607D@nat28.tlf.novell.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=__PartC0F2DCCB.1__=" Return-path: Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WX63r-000669-QR for xen-devel@lists.xenproject.org; Mon, 07 Apr 2014 09:41:52 +0000 In-Reply-To: <53428DCC020000780000607D@nat28.tlf.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel Cc: Keir Fraser , Aravind Gopalakrishnan , suravee.suthikulpanit@amd.com List-Id: xen-devel@lists.xenproject.org This is a MIME message. If you are reading this text, you may want to consider changing to a mail reader or gateway that understands how to properly handle MIME multipart messages. --=__PartC0F2DCCB.1__= Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Reported-by: Aravind Gopalakrishnan Signed-off-by: Jan Beulich --- a/xen/arch/x86/cpu/amd.c +++ b/xen/arch/x86/cpu/amd.c @@ -107,6 +107,10 @@ static void __devinit set_cpuidmask(cons ASSERT((status =3D=3D not_parsed) && (smp_processor_id() =3D=3D = 0)); status =3D no_mask; =20 + /* Fam11 doesn't support masking at all. */ + if (c->x86 =3D=3D 0x11) + return; + if (~(opt_cpuid_mask_ecx & opt_cpuid_mask_edx & opt_cpuid_mask_ext_ecx & opt_cpuid_mask_ext_edx)) { feat_ecx =3D opt_cpuid_mask_ecx; @@ -176,7 +180,6 @@ static void __devinit set_cpuidmask(cons extfeat_ecx, extfeat_edx); =20 setmask: - /* FIXME check if processor supports CPUID masking */ /* AMD processors prior to family 10h required a 32-bit password = */ if (c->x86 >=3D 0x10) { wrmsr(MSR_K8_FEATURE_MASK, feat_edx, feat_ecx); --=__PartC0F2DCCB.1__= Content-Type: text/plain; name="x86-AMD-Fam11-no-feature-masks.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="x86-AMD-Fam11-no-feature-masks.patch" x86/AMD: feature masking is unavailable on Fam11=0A=0AReported-by: Aravind = Gopalakrishnan=0ASigned-off-by: Jan = Beulich =0A=0A--- a/xen/arch/x86/cpu/amd.c=0A+++ = b/xen/arch/x86/cpu/amd.c=0A@@ -107,6 +107,10 @@ static void __devinit = set_cpuidmask(cons=0A ASSERT((status =3D=3D not_parsed) && (smp_processor= _id() =3D=3D 0));=0A status =3D no_mask;=0A =0A+ /* Fam11 doesn't = support masking at all. */=0A+ if (c->x86 =3D=3D 0x11)=0A+ = return;=0A+=0A if (~(opt_cpuid_mask_ecx & opt_cpuid_mask_edx &=0A = opt_cpuid_mask_ext_ecx & opt_cpuid_mask_ext_edx)) {=0A = feat_ecx =3D opt_cpuid_mask_ecx;=0A@@ -176,7 +180,6 @@ static void = __devinit set_cpuidmask(cons=0A extfeat_ecx, extfeat_edx);= =0A =0A setmask:=0A- /* FIXME check if processor supports CPUID masking = */=0A /* AMD processors prior to family 10h required a 32-bit password = */=0A if (c->x86 >=3D 0x10) {=0A wrmsr(MSR_K8_FEATURE_MASK, = feat_edx, feat_ecx);=0A --=__PartC0F2DCCB.1__= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel --=__PartC0F2DCCB.1__=--