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 1fBdff-0001lr-5j for speck@linutronix.de; Thu, 26 Apr 2018 11:58:37 +0200 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id EA1E3AD29 for ; Thu, 26 Apr 2018 09:58:26 +0000 (UTC) Date: Thu, 26 Apr 2018 11:58:11 +0200 From: Borislav Petkov Subject: [MODERATED] Re: [PATCH v5 03/11] [PATCH v5 03/10] Linux Patch #3 Message-ID: <20180426095811.GA15043@pd.tnic> References: <20180426020545.928466392@localhost.localdomain> MIME-Version: 1.0 In-Reply-To: <20180426020545.928466392@localhost.localdomain> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable To: speck@linutronix.de List-ID: On Wed, Apr 25, 2018 at 10:04:18PM -0400, speck for konrad.wilk_at_oracle.com= wrote: > x86/bugs: Read SPEC_CTRL MSR during boot and re-use reserved bits. >=20 > The 336996-Speculative-Execution-Side-Channel-Mitigations.pdf > refers to all the other bits as reserved. The Intel SDM glossary > defines reserved as implementation specific - aka unknown. ... > diff --git a/arch/x86/kernel/cpu/bugs.c b/arch/x86/kernel/cpu/bugs.c > index ad613f73d071..4134820a3644 100644 > --- a/arch/x86/kernel/cpu/bugs.c > +++ b/arch/x86/kernel/cpu/bugs.c > @@ -28,10 +28,23 @@ > =20 > static void __init spectre_v2_select_mitigation(void); > =20 > +/* > + * Our boot-time value of SPEC_CTRL MSR. We read it once so that any > + * writes to SPEC_CTRL contain whatever reserved bits have been set. > + */ > +u64 __read_mostly x86_spec_ctrl_base; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ static u64 ... With that, 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