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 1f9oR8-0000Ry-Jv for speck@linutronix.de; Sat, 21 Apr 2018 11:04:05 +0200 Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 8D10CAE35 for ; Sat, 21 Apr 2018 09:03:53 +0000 (UTC) Date: Sat, 21 Apr 2018 11:03:45 +0200 From: Borislav Petkov Subject: [MODERATED] Re: [patch 07/11] [PATCH v2 07/10] Linux Patch #7 Message-ID: <20180421090345.GA18575@pd.tnic> References: <20180420022613.270943302@localhost.localdomain> <20180420174242.GO13977@pd.tnic> <20180421032701.GA4490@localhost.localdomain> MIME-Version: 1.0 In-Reply-To: <20180421032701.GA4490@localhost.localdomain> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable To: speck@linutronix.de List-ID: On Fri, Apr 20, 2018 at 11:27:07PM -0400, speck for Konrad Rzeszutek Wilk wro= te: > Adding this: > diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c > index e207eb2e8011..6a800a71b6c0 100644 > --- a/arch/x86/kernel/cpu/amd.c > +++ b/arch/x86/kernel/cpu/amd.c > @@ -676,6 +676,15 @@ static void early_init_amd(struct cpuinfo_x86 *c) > set_cpu_bug(c, X86_BUG_AMD_E400); > =20 > early_detect_mem_encrypt(c); > + > + switch (c->x86) { > + case 0x15: > + case 0x16: > + case 0x17: > + if (!rdmsrl_safe(MSR_AMD64_LS_CFG, &msr_MSR_AMD64_LS_CFG_va= l)) > + set_cpu_cap(c, X86_FEATURE_MDD); if (c->x86 >=3D 0x15 && c->x86 <=3D 0x17) set_cpu_cap(c, X86_FEATURE_MDD); is enough. --=20 Regards/Gruss, Boris. SUSE Linux GmbH, GF: Felix Imend=C3=B6rffer, Jane Smithard, Graham Norton, HR= B 21284 (AG N=C3=BCrnberg) --=20