From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mx2.suse.de ([195.135.220.15]) by Galois.linutronix.de with esmtps (TLS1.0:DHE_RSA_CAMELLIA_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1fIBUr-00020W-JO for speck@linutronix.de; Mon, 14 May 2018 13:18:29 +0200 Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 3562DADB4 for ; Mon, 14 May 2018 11:18:24 +0000 (UTC) Date: Mon, 14 May 2018 13:18:13 +0200 From: Borislav Petkov Subject: [MODERATED] Re: [patch 05/15] Hidden 5 Message-ID: <20180514111813.GH18407@pd.tnic> References: <20180513140048.543641807@linutronix.de> <20180513140538.633132990@linutronix.de> MIME-Version: 1.0 In-Reply-To: <20180513140538.633132990@linutronix.de> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable To: speck@linutronix.de List-ID: On Sun, May 13, 2018 at 04:00:53PM +0200, speck for Thomas Gleixner wrote: > Subject: [patch 05/15] x86/cpufeatures: Add FEATURE_ZEN > From: Thomas Gleixner >=20 > Add a ZEN feature bit so family-dependent static_cpu_has() optimizations > can be built for ZEN. >=20 > Signed-off-by: Thomas Gleixner > --- > arch/x86/include/asm/cpufeatures.h | 1 + > arch/x86/kernel/cpu/amd.c | 1 + > 2 files changed, 2 insertions(+) >=20 > --- a/arch/x86/include/asm/cpufeatures.h > +++ b/arch/x86/include/asm/cpufeatures.h > @@ -218,6 +218,7 @@ > #define X86_FEATURE_IBRS ( 7*32+25) /* Indirect Branch Restricted Specula= tion */ > #define X86_FEATURE_IBPB ( 7*32+26) /* Indirect Branch Prediction Barrier= */ > #define X86_FEATURE_STIBP ( 7*32+27) /* Single Thread Indirect Branch Pre= dictors */ > +#define X86_FEATURE_ZEN ( 7*32+28) /* "" CPU is AMD family 0x17 (Zen) */ > =20 > /* Virtualization flags: Linux defined, word 8 */ > #define X86_FEATURE_TPR_SHADOW ( 8*32+ 0) /* Intel TPR Shadow */ > --- a/arch/x86/kernel/cpu/amd.c > +++ b/arch/x86/kernel/cpu/amd.c > @@ -812,6 +812,7 @@ static void init_amd_bd(struct cpuinfo_x > =20 > static void init_amd_zn(struct cpuinfo_x86 *c) > { > + set_cpu_cap(c, X86_FEATURE_ZEN); > /* > * Fix erratum 1076: CPB feature bit not being set in CPUID. It affects > * all up to and including B1. >=20 Reviewed-by: Borislav Petkov --=20 Regards/Gruss, Boris. SUSE Linux GmbH, GF: Felix Imend=C3=B6rffer, Jane Smithard, Graham Norton, HR= B 21284 (AG N=C3=BCrnberg) --=20