From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linutronix.de (146.0.238.70:993) by crypto-ml.lab.linutronix.de with IMAP4-SSL for ; 22 Feb 2019 07:46:03 -0000 Received: from mx1.redhat.com ([209.132.183.28]) by Galois.linutronix.de with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1gx5Wz-0007uj-C6 for speck@linutronix.de; Fri, 22 Feb 2019 08:46:02 +0100 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id EAFF7308624A for ; Fri, 22 Feb 2019 07:45:54 +0000 (UTC) Received: from tonnant.bos.jonmasters.org (ovpn-120-249.rdu2.redhat.com [10.10.120.249]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4D69B5D704 for ; Fri, 22 Feb 2019 07:45:54 +0000 (UTC) References: <20190221234431.922117624@linutronix.de> <20190221235534.731858403@linutronix.de> From: Jon Masters Message-ID: Date: Fri, 22 Feb 2019 02:45:52 -0500 MIME-Version: 1.0 In-Reply-To: <20190221235534.731858403@linutronix.de> Subject: [MODERATED] Encrypted Message Content-Type: multipart/mixed; boundary="w7lXNKtWaRYpaQgIKOkH0cHHozLcjKN7O"; protected-headers="v1" To: speck@linutronix.de List-ID: This is an OpenPGP/MIME encrypted message (RFC 4880 and 3156) --w7lXNKtWaRYpaQgIKOkH0cHHozLcjKN7O Content-Type: text/rfc822-headers; protected-headers="v1" Content-Disposition: inline From: Jon Masters To: speck for Thomas Gleixner Subject: Re: [patch V3 4/9] MDS basics 4 --w7lXNKtWaRYpaQgIKOkH0cHHozLcjKN7O Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 2/21/19 6:44 PM, speck for Thomas Gleixner wrote: > +#include > + > +/** > + * mds_clear_cpu_buffers - Mitigation for MDS vulnerability > + * > + * This uses the otherwise unused and obsolete VERW instruction in > + * combination with microcode which triggers a CPU buffer flush when t= he > + * instruction is executed. > + */ > +static inline void mds_clear_cpu_buffers(void) > +{ > + static const u16 ds =3D __KERNEL_DS; Dunno if it's worth documenting that using a specifically valid segment is faster than a zero selector according to Intel. Jon. --=20 Computer Architect | Sent with my Fedora powered laptop --w7lXNKtWaRYpaQgIKOkH0cHHozLcjKN7O--