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 ; 11 Dec 2018 00:37:58 -0000 Received: from smtp.ctxuk.citrix.com ([185.25.65.24] helo=SMTP.EU.CITRIX.COM) by Galois.linutronix.de with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1gWW3g-0000DF-Vz for speck@linutronix.de; Tue, 11 Dec 2018 01:37:57 +0100 Subject: [MODERATED] Re: [PATCH v2 6/8] MDSv2 3 References: <4c82eebb25381317499b1a92b7c6d516df265536.1544464266.git.ak@linux.intel.com> From: Andrew Cooper Message-ID: Date: Tue, 11 Dec 2018 00:37:49 +0000 MIME-Version: 1.0 In-Reply-To: <4c82eebb25381317499b1a92b7c6d516df265536.1544464266.git.ak@linux.intel.com> Content-Type: multipart/mixed; boundary="ySsXsEmdc2asaIEjVZAmluugKpPtbs2sU"; protected-headers="v1" To: speck@linutronix.de List-ID: --ySsXsEmdc2asaIEjVZAmluugKpPtbs2sU Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Content-Language: en-GB On 10/12/2018 17:53, speck for Andi Kleen wrote: > From: Andi Kleen > Subject: x86/speculation/mds: Force MDS_EXIT on paranoid exit > for sw sequence > > When we use a software sequence for clearing CPU buffers an NMI > or similar interrupt could interrupt the clearing sequence. > In this case make sure we really flush by always doing the extra > clearing on paranoid interrupt exit. > > This is only needed for the software sequence because VERW > is an instruction that cannot be interrupted. Interrupting the middle of the software sequence is only one half of the problem. The other half is when an NMI/#MC/etc hits on the return to guest path after executing VERW, at which point you've just refilled all the buffers between trying to clear them, and returning to userspace. ~Andrew --ySsXsEmdc2asaIEjVZAmluugKpPtbs2sU--