Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp607552imm; Sat, 1 Sep 2018 13:35:34 -0700 (PDT) X-Google-Smtp-Source: ANB0Vda2cpWqDyHQet8ntkGgtV7hUpogLcljsWI+ahW6e3xiBi+RdXv2kJqRKH4K/lCA2UJrt4oP X-Received: by 2002:a62:ce81:: with SMTP id y123-v6mr18707928pfg.140.1535834133979; Sat, 01 Sep 2018 13:35:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535834133; cv=none; d=google.com; s=arc-20160816; b=Ku2Unlvk0AYLaYrPKBWlhbM5F9/pIqn7M09Rq0PFxROWx7LFG+K37BEb/oISAEwJor UoZ/Z/XMvjJs61zytwl0iusQ5eHPFdFz6UM0/xOUV8S6jrlivdd1N6GedaAwMpQ6Swqj Rbdhu1ETNfh1DW+Ng4zPec67OWwrKQ1ozBZ+GpWhbTWxESD73v5gWQ7rqxSovXgjJ15U btiZu902zvseWRs8do5ZfsJPhEoq1EKQoP4M9M+/27XpxH1gogCdpSplbEUy9gTGac8S +GeuoKIJLPJJTtqXnkXTbp6lzUZ4Hw2Jf8BL9R+7tx0Acx/8U6ZbmDEvsB6t4j8zr+bo A6qA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature :arc-authentication-results; bh=FKv265YD2i/u8Ujl+994vG2lfxBb+LZ67lkCLAT2iJE=; b=Di6ChX5AoqjmCwZreLRR7MAB+cOisg5hQH7XwvPfTsGE84ZnGEzC+hp17ddjIYK4oF 78VCjaQfq7HGDCqeVcLP1904axBH/WKEygATSTcTT5nOnhCvhQULFpFqyaF1RPO79s+K pzgxGfI96mY3uQjpEDG8RGL4zszZFoWZ/+A7ZVnwdEp3m3tKYEtjpvpOs+hqwA0qcoRU 5C9hHKHZjtZvhOlMcs7BpJGaKURyXQR/2zQeP+agB+v6jvBJ7iCve1zAjYmQlzvFRIub 87HP4Fxqa7RdY8QrHWvCT4ac7+AJ14RUIJwgznf7TX23zOpsksM77t7wJvNukx0rbWve OvhQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@zx2c4.com header.s=mail header.b=ZB1z2bFv; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zx2c4.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v70-v6si14280135pfa.103.2018.09.01.13.35.19; Sat, 01 Sep 2018 13:35:33 -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; dkim=pass header.i=@zx2c4.com header.s=mail header.b=ZB1z2bFv; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zx2c4.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727338AbeIBArX (ORCPT + 99 others); Sat, 1 Sep 2018 20:47:23 -0400 Received: from frisell.zx2c4.com ([192.95.5.64]:34767 "EHLO frisell.zx2c4.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727000AbeIBArX (ORCPT ); Sat, 1 Sep 2018 20:47:23 -0400 Received: by frisell.zx2c4.com (ZX2C4 Mail Server) with ESMTP id 8098b4a3; Sat, 1 Sep 2018 20:18:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=zx2c4.com; h=mime-version :references:in-reply-to:from:date:message-id:subject:to:cc :content-type; s=mail; bh=T+5omoo9pWmGmG3M36oUeMsRkEY=; b=ZB1z2b FvVnYsmjNVtr4XnsMqUb1pfrNIvhva63DI02jWDw30yzjP0LMM66TUO7zvBbI2nZ ftI7dYHDd230v8xCZPlbHYvDxdoMVLi+OA7Zh+QpH0Wyr/uX2xx1FfY17C4djF3S gAXuByGJiIEelKn9ONKJnKUVilHsKs4UJJpnE1XzsB7sZbW9VsK1r/5kWSC3cCPp BuHecpD1pKCw0tKsvIzSOnW2YvaNSxhRZEdO9obl/l7LzvwKb7CZXAC47oPzeo5v i7T139leNtZwPF92NLLbgW4q4FbuM2P8iAbAm1Yrpso6fyj6e896CTfrWNhU+RVG r8fdDWl9BH57tgVA== Received: by frisell.zx2c4.com (ZX2C4 Mail Server) with ESMTPSA id cbcd6bef (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128:NO); Sat, 1 Sep 2018 20:18:47 +0000 (UTC) Received: by mail-oi0-f50.google.com with SMTP id l202-v6so27502634oig.7; Sat, 01 Sep 2018 13:34:13 -0700 (PDT) X-Gm-Message-State: APzg51DJiyxpZP793T8HHkP0xTm5g2Ub14/Jt1LKXbtZ4XMExbyp13ae SsUYClBYsJ54Xuuqnqyg8W5Fq4aJUnBS77nd4x4= X-Received: by 2002:aca:310b:: with SMTP id x11-v6mr1193015oix.74.1535834052904; Sat, 01 Sep 2018 13:34:12 -0700 (PDT) MIME-Version: 1.0 References: <20180824213849.23647-1-Jason@zx2c4.com> <20180824213849.23647-2-Jason@zx2c4.com> In-Reply-To: From: "Jason A. Donenfeld" Date: Sat, 1 Sep 2018 14:34:01 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 01/17] asm: simd context helper API To: Andrew Lutomirski Cc: Thomas Gleixner , LKML , Netdev , David Miller , Greg Kroah-Hartman , Samuel Neves , linux-arch@vger.kernel.org, Rik van Riel Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.