Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp5353577imm; Tue, 18 Sep 2018 08:14:23 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZjhd4ZgGCQxyn026UhP2yfei7eTnbIQk/56m1sOBGc8cY+wfIKg0CMImSUDmXwlemnuXYT X-Received: by 2002:a63:2f45:: with SMTP id v66-v6mr27876767pgv.91.1537283662980; Tue, 18 Sep 2018 08:14:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537283662; cv=none; d=google.com; s=arc-20160816; b=v6PMJS0dvYQ9TWD1vdhDWzRO12DuwmupIAsr2P0s58tXxq+e0u+G/LdSr8yo56taEe nTnUmsMOR0ahO6+H1nV8huptu9xRPGi59+Ns4v31YMyDcgJl/FzzXjJqjTJ28mNW13Yy FU4Pa9k0Co2/ykjCwA41DyYOBK7iPDS37wPxZ7a1BdkMM0Cs3gpyNIAUXFGZmpBZAc7L DKXSEbrsYnQegA60vuJTMimdHxz20ti5YxsdSjVvA0wKjxQ1HvpnJMAtqE8d9/ahhFWb 6NhynA3qK6X2lzC1HRXONZpKhwdeTirpoF+2IoE7usG+lxyhtF9HgSg+FDOjPdOGAM1n s6vw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to:date :cc:to:from:subject:message-id; bh=3qqbhX7q2n60LlSycfjiKbHRzMBvSpe8YuYwA97Bwao=; b=mdlpJnGVkim6QKsleI8AbHLReVBDsxXSHGsdp/lLFjBr4869dALNYgZKD2S2BJLuG4 wi8XLChm2oAW0NmDAafgdZI6IizH2ZWL2aFVaPc5FJAh2A04oPnWB5hBoQ/Ghjuw2NjX 7F5Zin1s8tngVvQOgshXcerIZ8eVcvT0UpA6SIocZkhQ4czFEgzpPO3uaMMfMG334WMW Wvf1828Lj3LeHCC1MTTYp8KGDNZFwEixkjT003XAkzKKkg/bhyPJNaFzZL+sgQkJbtzA Ib3jSv9JI8TFiFDDYVtU3fL2yaWVnA1vTWLly1xQFAV34J5a0qXSeOql6U0WY7PsEw29 IoLg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p2-v6si18272457plo.246.2018.09.18.08.13.53; Tue, 18 Sep 2018 08:14:22 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729932AbeIRUoX (ORCPT + 99 others); Tue, 18 Sep 2018 16:44:23 -0400 Received: from shelob.surriel.com ([96.67.55.147]:41694 "EHLO shelob.surriel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727228AbeIRUoX (ORCPT ); Tue, 18 Sep 2018 16:44:23 -0400 Received: from imladris.surriel.com ([96.67.55.152]) by shelob.surriel.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1g2Heq-0001r4-Qp; Tue, 18 Sep 2018 11:11:20 -0400 Message-ID: <83e271e1298d603c1105dd0dbea32d67da9cf1fa.camel@surriel.com> Subject: Re: [RFC PATCH 04/10 v2 ] x86/fpu: eager switch PKRU state From: Rik van Riel To: Paolo Bonzini , Sebastian Andrzej Siewior Cc: linux-kernel@vger.kernel.org, x86@kernel.org, Andy Lutomirski , Radim =?UTF-8?Q?Kr=C4=8Dm=C3=A1=C5=99?= , kvm@vger.kernel.org, "Jason A. Donenfeld" Date: Tue, 18 Sep 2018 11:11:20 -0400 In-Reply-To: <7e9a13f3-93f5-fe4a-20d2-f4f9407bd43b@redhat.com> References: <20180912133353.20595-1-bigeasy@linutronix.de> <20180912133353.20595-5-bigeasy@linutronix.de> <8e5b64e4-b3e6-f884-beb6-b7b69ab2d8c1@redhat.com> <20180914203501.qibhpmueosvkr74w@linutronix.de> <20180918142701.atfb4ul45k7tl6ew@linutronix.de> <7e9a13f3-93f5-fe4a-20d2-f4f9407bd43b@redhat.com> Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-c268XyDDyxQNM28MvnHT" X-Mailer: Evolution 3.28.5 (3.28.5-1.fc28) Mime-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=-c268XyDDyxQNM28MvnHT Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, 2018-09-18 at 17:07 +0200, Paolo Bonzini wrote: > On 18/09/2018 16:27, Sebastian Andrzej Siewior wrote: > > > Likewise, move this to fpu__clear and outside "if > > > (static_cpu_has(X86_FEATURE_FPU))"? > >=20 > > okay. But if there is no FPU we did not save/restore the pkru > > value. Is > > this supposed to be an improvement? >=20 > Honestly it just seemed "more correct", but now that I think about > it, > kernel threads should run with PKRU=3D0. maybe there's a preexisting > bug > that your patch has the occasion to fix. I don't think it matters what the PKRU state is for kernel threads, since kernel PTEs should not be using protection keys anyway. --=20 All Rights Reversed. --=-c268XyDDyxQNM28MvnHT Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEEKR73pCCtJ5Xj3yADznnekoTE3oMFAluhFZgACgkQznnekoTE 3oNJbwf6AoBSP1/VOt6BOOQyRo7whsUYPZoXm/nP5aAUt6ujM0sf49T/gQUgO7Rw O7I2zbvZUlKijD6Mf3be/2QNYjs8Y14hf84HvUmo2pSAPbq+wRTCVhvut6SHMnHd sOeAfJHLUZ6olAZZt5HwXZUdU72hG85anEfMuy3oJU6G1bG4h46QiBkyICAgYKtt ui4BopFK+mX+yPbohcjG448aitAXG5vNqNsdxYPGhx9ovcTpw3KDqJgUy5olrtPn /OtqfNyKwmc9FYIEwyebfwnaWhsQ+UdA6p45Me2Ajx9gPpvci9XCsn/NnZkq5/RL kM70oAa8N6bczzkf1byEvPMZWcUlMg== =s8Yo -----END PGP SIGNATURE----- --=-c268XyDDyxQNM28MvnHT--