Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751939AbcJBAmq (ORCPT ); Sat, 1 Oct 2016 20:42:46 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33100 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751164AbcJBAmk (ORCPT ); Sat, 1 Oct 2016 20:42:40 -0400 Message-ID: <1475368956.21644.15.camel@redhat.com> Subject: Re: [PATCH RFC 2/5] x86,fpu: delay FPU register loading until switch to userspace From: Rik van Riel To: Andy Lutomirski Cc: "linux-kernel@vger.kernel.org" , X86 ML , Thomas Gleixner , Paolo Bonzini , Ingo Molnar , Andrew Lutomirski , "H. Peter Anvin" , Dave Hansen , Borislav Petkov Date: Sat, 01 Oct 2016 20:42:36 -0400 In-Reply-To: References: <1475353895-22175-1-git-send-email-riel@redhat.com> <1475353895-22175-3-git-send-email-riel@redhat.com> Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-Uhy+nm3x3Z+iAmTIQnWb" Mime-Version: 1.0 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Sun, 02 Oct 2016 00:42:40 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1509 Lines: 47 --=-Uhy+nm3x3Z+iAmTIQnWb Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sat, 2016-10-01 at 16:44 -0700, Andy Lutomirski wrote: > On Sat, Oct 1, 2016 at 1:31 PM,=C2=A0=C2=A0 wrote: > >=C2=A0 > >=20 > > +static inline void switch_fpu_finish(void) > > =C2=A0{ > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0set_thread_flag(TIF_LOAD_FPU= ); > > =C2=A0} >=20 > I can imagine this causing problems with kernel code that accesses > current's FPU state, e.g. get_xsave_field_ptr().=C2=A0 That makes me wonder, what test programs do people have to verify the correctness of the FPU switching code? I have a few floating point benchmarks that check the results for correctness, but nothing that adds in signals, for example. What do people use? --=20 All Rights Reversed. --=-Uhy+nm3x3Z+iAmTIQnWb Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAABCAAGBQJX8Ff8AAoJEM553pKExN6DlKAH/1UXRQZ9+hEPz/bXJAXNVw1H 7SbasLaidAlISWmYuaDnSwsXTxd5bReFn6+DYzCxqogkUWQGikR05vEZj3bsS3FA XdgRoNs5v6MzFODjPJPdAJfDvwS+J3HtcB0tDr2N6/pKb4iV5XLP0HvrhRIvQ2a9 FiJd/oq58cwt5R1M0C3LQnAswL160GCe40ppmWHFSx6da+wllhZbN1xTOM56+Qpg bYGIOJWcqcg0ZsZNmnH3rwQeJitFLVderlVFPX60Wxh2QC1OZL9ZV/TePlg6e4ml chQBzjp/XOFnYOuZyqsIEQBYw5Oy+irA3YGrvfobLjwEP0UlipcA17+jUA7pd+U= =qUFi -----END PGP SIGNATURE----- --=-Uhy+nm3x3Z+iAmTIQnWb--