Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4125703pxj; Tue, 25 May 2021 00:39:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwGQnxb2iMZEQ893wxeCnCbNyStNDJAdfBMvH2q4DZwBdSH95zk99AjBcM0gCnE1xx2kEG5 X-Received: by 2002:a05:6402:781:: with SMTP id d1mr31094597edy.32.1621928387107; Tue, 25 May 2021 00:39:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621928387; cv=none; d=google.com; s=arc-20160816; b=g3nugPxqD7dazzMdsLL4q+91OPyMSzgHTg965LbdALHGCrjtV5ylzI5f/5K8UGrvfh LxDSyjuTp/1cbXvIogypRjyI6nh1foe1nQy7lqumH4TPUa53uGj2xzZB2NlZpAP9Bq+1 EUGao3oUNh+j9tGrjlIA6jn9f2vwQIZgf4dmY0A/Yz2G9JEUm2TnmilDyrYQMHeKtTGT Q2oRn0tdQ5C4mCBq0vqGP+n4gngNNseahRWwZEkk8sqBY39gLPikqdpP9DK4niTXvS/p Dd7JzK2kyho9m+ED6y2PencFt2EGeiGs3ZdOTxuS2f9AMAsuKw7jfCx+BipBLStVfx8r uTcg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=c2vtRa+xeWD6tsBrBkgUQwWNBstKrFtysR/4V20XmjA=; b=YKkAjF0QqITeJNQRM7l5BuWc8z8wMw1mK4wNWT7tIJW6NtkEsAjPjnuLEK0lAcmOEL r8JNATwtfcjORTCJSX4PWrHWqmEw1QcYv09ypkblgsS9bjEyJGuR649jQCzDLY3J7Fdy GKprVm0V3Y+YxrcYC6GD3yKTaQRhCIW/lF29xxNnBgOt1yYiT7Np/GhOVlzx9hGSVOc1 a8Nj2oWxHcQhRTdGArTLJ991Gh27pfiEgLUmG/hnoxMfnrfrG35WETgeBitnlvZ45SjJ CAade3RNYNsGMyKM7YW1u07VHK48PyGBK86hOS5dSIDEfSMYIPJP44n1ERgsiLKLO9nH ujNQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Nnvhn2zw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v21si14969913edq.476.2021.05.25.00.39.24; Tue, 25 May 2021 00:39:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Nnvhn2zw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231793AbhEYHio (ORCPT + 99 others); Tue, 25 May 2021 03:38:44 -0400 Received: from mail.kernel.org ([198.145.29.99]:34268 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231477AbhEYHin (ORCPT ); Tue, 25 May 2021 03:38:43 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 511F161417; Tue, 25 May 2021 07:37:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621928233; bh=8smSQFHHk77+VQ3Wa9iNI4/luQ0j33dqUigN4+FCyA0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Nnvhn2zwdz8/ljqYIFSsXNkn8JbOP+hM4SLU8Y7IPP8G6iufLkG/MhQGUS4+/STU+ kK8D3TJ5NZN7ePf7Ew91EPvVyIrqTWc8srHDmGLM9ysBnq3thLheXQCh1Ik+TC+Ld4 KS0WPD5LBDeKyCYg5QKqIrpwyaXMHejofwOT6mgY= Date: Tue, 25 May 2021 09:37:11 +0200 From: Greg KH To: Damien Le Moal Cc: Palmer Dabbelt , "guoren@kernel.org" , Anup Patel , Paul Walmsley , "aou@eecs.berkeley.edu" , "pbonzini@redhat.com" , "corbet@lwn.net" , "graf@amazon.com" , Atish Patra , Alistair Francis , "anup@brainfault.org" , "kvm@vger.kernel.org" , "kvm-riscv@lists.infradead.org" , "linux-riscv@lists.infradead.org" , "linux-doc@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-staging@lists.linux.dev" Subject: Re: [PATCH v18 00/18] KVM RISC-V Support Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 24, 2021 at 11:08:30PM +0000, Damien Le Moal wrote: > On 2021/05/25 7:57, Palmer Dabbelt wrote: > > On Mon, 24 May 2021 00:09:45 PDT (-0700), guoren@kernel.org wrote: > >> Thx Anup, > >> > >> Tested-by: Guo Ren (Just on qemu-rv64) > >> > >> I'm following your KVM patchset and it's a great job for riscv > >> H-extension. I think hardware companies hope Linux KVM ready first > >> before the real chip. That means we can ensure the hardware could run > >> mainline linux. > > > > I understand that it would be wonderful for hardware vendors to have a > > guarantee that their hardware will be supported by the software > > ecosystem, but that's not what we're talking about here. Specifically, > > the proposal for this code is to track the latest draft extension which > > would specifically leave vendors who implement the current draft out in > > the cold was something to change. In practice that is the only way to > > move forward with any draft extension that doesn't have hardware > > available, as the software RISC-V implementations rapidly deprecate > > draft extensions and without a way to test our code it is destined to > > bit rot. > > To facilitate the process of implementing, and updating, against draft > specifications, I proposed to have arch/riscv/staging added. This would be the > place to put code based on drafts. Some simple rules can be put in place: > 1) The code and eventual ABI may change any time, no guarantees of backward > compatibility > 2) Once the specifications are frozen, the code is moved out of staging > somewhere else. > 3) The code may be removed any time if the specification proposal is dropped, or > any other valid reason (can't think of any other right now) > 4) ... > > This way, the implementation process would be greatly facilitated and > interactions between different extensions can be explored much more easily. > > Thoughts ? It will not work, unless you are mean and ruthless and people will get mad at you. I do not recommend it at all. Once code shows up in the kernel tree, and people rely on it, you now _have_ to support it. Users don't know the difference between "staging or not staging" at all. We have reported problems of staging media drivers breaking userspace apps and people having problems with that, despite the media developers trying to tell the world, "DO NOT RELY ON THESE!". And if this can't be done with tiny simple single drivers, you are going to have a world-of-hurt if you put arch/platform support into arch/riscv/. Once it's there, you will never be able to delete it, trust me. If you REALLY wanted to do this, you could create drivers/staging/riscv/ and try to make the following rules: - stand-alone code only, can not depend on ANYTHING outside of the directory that is not also used by other in-kernel code - does not expose any userspace apis - interacts only with existing in-kernel code. - can be deleted at any time, UNLESS someone is using it for functionality on a system But what use would that be? What could you put into there that anyone would be able to actually use? Remember the rule we made to our user community over 15 years ago: We will not break userspace functionality* With the caveat of "* - in a way that you notice". That means we can remove and change things that no one relies on anymore, as long as if someone pops up that does rely on it, we put it back. We do this because we never want anyone to be afraid to drop in a new kernel, because they know we did not break their existing hardware and userspace workloads. And if we did, we will work quickly to fix it. So back to the original issue here, what is the problem that you are trying to solve? Why do you want to have in-kernel code for hardware that no one else can have access to, and that isn't part of a "finalized spec" that ends up touching other subsystems and is not self-contained? Why not take the energy here and go get that spec ratified so we aren't having this argument anymore? What needs to be done to make that happen and why hasn't anyone done that? There's nothing keeping kernel developers from working on spec groups, right? thanks, greg k-h