Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1506912imu; Mon, 5 Nov 2018 22:59:54 -0800 (PST) X-Google-Smtp-Source: AJdET5fKJ+KLyHki7jBCoJP+cjqk1Tqpnqj2AIlGD3244SB5nH0P5PVOtgBckyaKmhPvi/wJtIzz X-Received: by 2002:a62:2211:: with SMTP id i17-v6mr18758232pfi.35.1541487594102; Mon, 05 Nov 2018 22:59:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541487594; cv=none; d=google.com; s=arc-20160816; b=Y08fTmRixfKo1tBlodvpNJbxiIDuXpILYDZElgAMhaEfLuzLznITMPLQztc3JAUr/h KIrb0hTL6KqyG6hC8d9glbuCXHG/6atJ28S2A9tEvs4W2el8cq9OzNrArJTmse65KgH2 RO7ZDT8Uhdge9lf3+CnhvGDto8XYPH3QmgzGdtmFeG2kEtWdwaF8vtjw65CLkm/4Wlhv dRXCPHcViVxEAuIOxdho2xmAY9+mL+tGr33nztDf6HYOkjeEhjIoWAXof3PuyDI9XeJm GJsijDXP3Rb4ZO7vw4sqzCp8OZ4+AL3Si36pNzW1iRpBKvpSjkqGL6ht+7IUuimUJZib kSPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=Dd+b8IQmQmmRE6HUq8tX/PNCCErs5mlTNIq7kwrdtt0=; b=w7YuYAQEv5sjlTdJOpnMox7dYENcpFirThFIqJVHVP3HbfqYQd/otAKpkPxWtPFMdm p/Gzs7PJPQR3cw+kooRp9OwoSYgqCy59zjqJnQnUPrSi0TzZL38pzIdsRyR4qgQowSaR H9w/7LDBfDkZrRClsRRn+BdEDIjpdgdypXIEuFDhmwzjz+Hx6lh5+ndA4wRbBD7SKsF4 EFM6j/xEpwnKGGQQZNwPfnJASemCphecPsr/qKqegz0wpygAEPfS2Uy/9MBjlBjhX5w3 fc2atBSU4YJqMMD1lDUF3szz3rG5QcFA557RkauGeEqNPpLFJKFRDfK+bg3joXQOPaZl Lr4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=XmGyjmXs; 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 y73si32933375pgd.478.2018.11.05.22.59.38; Mon, 05 Nov 2018 22:59:54 -0800 (PST) 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=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=XmGyjmXs; 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 S2387579AbeKFQXA (ORCPT + 99 others); Tue, 6 Nov 2018 11:23:00 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:52826 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387469AbeKFQW7 (ORCPT ); Tue, 6 Nov 2018 11:22:59 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=Dd+b8IQmQmmRE6HUq8tX/PNCCErs5mlTNIq7kwrdtt0=; b=XmGyjmXsFguXJOCnYaxp1+RHK fuEdoGkYoMzrvCqC2lhcvy91kXBohZhKP4mlyf+rY8ocLo7sLcQdH1wOaFUesWFGQjmPlTvdIQo5w UUb+jcCxj3Dk2xydSjNbKGn0tHDgbJ6QxaLPfhy5na1KxahtenfxiQv6sOAuDJth2LjkNsvaxEvdW cXziQJvN4vLTXqswRyiOoe6CYiQlGFV6GWtGvoYqPcYLNqTlybqAym811IxoCovDoB6gtNjBc535e +ZeCzHIB9hV4v6Gv2AWzynRC1Fvx+hPHs6srtY59W/VYL+Fgop+LpKJyXbKpj8+VQctUteJ24JiIX sZQ7iWjSw==; Received: from hch by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1gJvKR-0004sB-V2; Tue, 06 Nov 2018 06:59:11 +0000 Date: Mon, 5 Nov 2018 22:59:11 -0800 From: Christoph Hellwig To: Arnd Bergmann Cc: Christoph Hellwig , zong@andestech.com, aou@eecs.berkeley.edu, alankao@andestech.com, greentime@andestech.com, palmer@sifive.com, linux-kernel@vger.kernel.org, Vincent Chen , kito@andestech.com, linux-riscv@lists.infradead.org, deanbo422@gmail.com Subject: Re: [RFC 0/2] RISC-V: A proposal to add vendor-specific code Message-ID: <20181106065911.GB13526@infradead.org> References: <20181101174857.du2zu4vnrhpu5asf@excalibur.cnev.de> <20181105065807.GA1286@andestech.com> <20181105070551.GA7274@infradead.org> <20181105090852.GA14924@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.2 (2017-12-15) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 05, 2018 at 02:51:33PM +0100, Arnd Bergmann wrote: > With the stricter policy you suggest, we'd loose the ability to support > some extensions that might be common: > > - an extension for user space that adds new registers that must be > saved and restored on a task switch, e.g. FPU, DSP or NPU > instructions. ARM supports several incompatible extensions like > that in one kernel, and this is really ugly, but I suspect RISC-V > will already need the same thing to support all combinations of > standard extensions, so from a practical perspective it's not > much different for custom extension, aside from the question > how far you want to go to discourage custom extensions by > requiring users to patch their kernels. Palmer already explain that this is supposed to be handled by the XS bit + SBI calls. I'm personally not totally sold on the SBI call and standard ways to save the state in the instruction set, similar to modern x86 might be a better option, but that is something the privileged spec working group will have to decide. > - A crypto instruction for a cipher that is used in the kernel > for speeding up network or block data encryption. > This would typically be a standalone loadable module, so > the impact of allowing custom extensions in addition to > standard ones is minimal. And that is a prime example for something that should never be vendor specific. If an instruction set extension is useful for something entirely generic it should be standardized in a working group as an extension.