Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp552657imm; Thu, 6 Sep 2018 06:45:17 -0700 (PDT) X-Google-Smtp-Source: ANB0Vdb+sS6B7oZURYumM2TT5IHYM/GsNz9c2yml9224+LGO32l2RL2AeWVdtQqJJ2ee3wdLibr/ X-Received: by 2002:a62:411a:: with SMTP id o26-v6mr2890664pfa.111.1536241517296; Thu, 06 Sep 2018 06:45:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536241517; cv=none; d=google.com; s=arc-20160816; b=Ot4zNL1NSYPHg5CdjubbXA/fV5RYMjbJKU93bVP4+QSKCgCSTWEo1pfq3sEOZVBWPN 4IOclBz54UV/yQ0HQpfS6ISpNuFvHI/Xbe8hDh/h7tAIvlMxPDA1jMFRxqgeomr1laI2 OH0S235jSNMIASOd8pawHJSLS+jzG50BgGm1tymRjXkKifgSl1qv7NeI9kOdyTXQghUn ZvoPnistSh7yFDpBFrZ1h/7c8oLtjFZQYC9bxP4aAr7a0TeFXUe4B9TonIqut3ohw/9Q q8Dh1SEODFlTZOLN0z553YZOHA3p+UaQ297jwtOhheajL7zKCr0sRQm08Eepw1Qf29ii o9zw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=YLtQQt0soz7KV1Cs1v195AitvOQjRVv5LwYdoxWGyhY=; b=b2U0FMgNf7e+QovXesu7rBny35EayXuBQsACEFalQTHGHBBIWAycgotryVvNc4zMTj u/GPo6a9IPs09Vhqf83JMMIZyRUBNQ+tyLOAsFfuEnjlN2om65PpVO5eu2L3ZY5/vVaU Nn96i+l2Wt427WzJj7zRE81Yps0kK+ObWXnvpJtC2fIILt7fUKt3apR5ns67pDHyTf52 I3PMRjCoZSVFzi277ryQw3mMyrBRCiEax+mkZdIxMRnIyL9Z0WJ8E87tzDNERLz23ecZ ElZx3BAtlXABaK0njFg9ffRMZdNJCQN46Yh5O2AwIlsLraWYST1U1xrQrBn+sfgLSatX LyXA== 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 x37-v6si5468960pgl.544.2018.09.06.06.45.01; Thu, 06 Sep 2018 06:45:17 -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 S1729857AbeIFSSb (ORCPT + 99 others); Thu, 6 Sep 2018 14:18:31 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:34066 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729842AbeIFSSa (ORCPT ); Thu, 6 Sep 2018 14:18:30 -0400 Received: from hsi-kbw-5-158-153-52.hsi19.kabel-badenwuerttemberg.de ([5.158.153.52] helo=nanos.tec.linutronix.de) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1fxuYW-0008OH-Kx; Thu, 06 Sep 2018 15:42:44 +0200 Date: Thu, 6 Sep 2018 15:42:44 +0200 (CEST) From: Thomas Gleixner To: "Jason A. Donenfeld" cc: Andrew Lutomirski , LKML , Netdev , David Miller , Greg Kroah-Hartman , Samuel Neves , linux-arch@vger.kernel.org, Rik van Riel Subject: Re: [PATCH v2 01/17] asm: simd context helper API In-Reply-To: Message-ID: References: <20180824213849.23647-1-Jason@zx2c4.com> <20180824213849.23647-2-Jason@zx2c4.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 1 Sep 2018, Jason A. Donenfeld wrote: > On Sat, Sep 1, 2018 at 2:32 PM Andy Lutomirski wrote: > > I tend to think the right approach is to merge Jason's code and then > > make it better later. Even with a totally perfect lazy FPU restore > > implementation on x86, we'll probably still need some way of dealing > > with SIMD contexts. I think we're highly unlikely to ever a allow > > SIMD usage in all NMI contexts, for example, and there will always be > > cases where we specifically don't want to use all available SIMD > > capabilities even if we can. For example, generating random numbers > > does crypto, but we probably don't want to do *SIMD* crypto, since > > that will force a save and restore and will probably fire up the > > AVX512 unit, and that's not worth it unless we're already using it for > > some other reason. > > > > Also, as Rik has discovered, lazy FPU restore is conceptually > > straightforward but isn't entirely trivial :) > > Sounds good. I'll move ahead on this basis. Fine with me.