Message ID | 20230922085701.3164-3-yongxuan.wang@sifive.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:172:b0:3f2:4152:657d with SMTP id h50csp5766114vqi; Fri, 22 Sep 2023 10:54:27 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHuY4xIKIAjC4o9psm2iWe/N2MdpiiKUwo3rEyRjQWxnOK9d3gbsFvqVvgs5GHagWBWA+VE X-Received: by 2002:a05:6a21:788e:b0:133:f0b9:856d with SMTP id bf14-20020a056a21788e00b00133f0b9856dmr334907pzc.17.1695405266657; Fri, 22 Sep 2023 10:54:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695405266; cv=none; d=google.com; s=arc-20160816; b=ovQc3d7veWlxB6N0WF9b4stPY1LLwDHBz6kCkYhrdxR6pde1zavT7hzs7ki/8iXomV Dy7YN0kSN5PYGYvJhFs9HsnomI1+75/ASW6qdKddy9Lbst01FXlIdLFE3ICUOqfboaZN dzhh6mAc5n1JZkhsJEMNL+MYpfQQJuI+46T1K4zPbDFP/C7xuHriiFdXJvdEouLUiP2q M0sm6DnZcxxmhIIRo4v97zv1VKfRqP64Y6yoYnW9036MkXC568S7u4IWnWN9lWAPr8FG F0k/n6MlSuMsD8ENWB8gT9SOYbWIVmKdXykHUK0bExH2Qh7yy2/JY4bTtclWFv1du9qg K7eQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from:dkim-signature; bh=RDJs3U1rqa7YI0/roeh/1SBiVi3tTUp7AZYFFQzYY+8=; fh=+uZnt4Sd9pWjbKbQctw8oiWGuUpRhYgs4oyDrLP/J+8=; b=PgFamWdOFqesKHxSDhqUNgPki5LbU5Xs/duxVOu4855W1nI07JXrq+zO2Nhlu7KZ1j XALB+kQhv2ONzWv2IGlg0Rl89AeyvJ1Ef2Xc0yP9/1m1nFeICrRMIMdq2T52aCfHSiST crd66SJHL30yEBKX7raZtMRt0dagJsenMH0LU7C9ZfAfzcJenHsMA4ZmDZY6ZoXPCszt DrV4UjIUaFoQgAzVxpHGmSebfijrr15A3JAx7FfR+3xXPaGB4MldGbqj0awg7PNS2W0r 2TmANvqz6t2QWSBRvhHnQLahH4aoB5HnnBDRc/mKCJ5BUmycP9mp1RyHiEAJdZtHbKmK HaKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b=A22TP6mB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=sifive.com Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id bw9-20020a056a00408900b0068fc49cc456si4325941pfb.248.2023.09.22.10.54.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Sep 2023 10:54:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b=A22TP6mB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=sifive.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 9A73482B7CBB; Fri, 22 Sep 2023 01:57:46 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232758AbjIVI5a (ORCPT <rfc822;chrisfriedt@gmail.com> + 30 others); Fri, 22 Sep 2023 04:57:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46290 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232719AbjIVI53 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 22 Sep 2023 04:57:29 -0400 Received: from mail-pj1-x1035.google.com (mail-pj1-x1035.google.com [IPv6:2607:f8b0:4864:20::1035]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DF234BB for <linux-kernel@vger.kernel.org>; Fri, 22 Sep 2023 01:57:22 -0700 (PDT) Received: by mail-pj1-x1035.google.com with SMTP id 98e67ed59e1d1-274972a4cb6so1382119a91.1 for <linux-kernel@vger.kernel.org>; Fri, 22 Sep 2023 01:57:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; t=1695373042; x=1695977842; darn=vger.kernel.org; h=references:in-reply-to:message-id:date:subject:cc:to:from:from:to :cc:subject:date:message-id:reply-to; bh=RDJs3U1rqa7YI0/roeh/1SBiVi3tTUp7AZYFFQzYY+8=; b=A22TP6mBKkhBhsokDD0dytb++Qhl90MPUcW6CZ8LOan6CSc1di7aeIYmcQk8e5S3q4 gYpZlV8ZmqbKYi5gXzQYvjbwguGdM7J7xz+3DXgxpy8WVelte2dNvBXM2eaBilpwrC+6 t7Z4NLbRLpPLLNdo+piJlkO2Q3bOhSdJ6V7L3v1GRuAgUATMORceR4WX28dLkDoDzPUL Bs8LBD67D3VCyfkwUjqufH+837oy/alGIHqq7EN8u13UQQZVa7zRsoZ5TgwWOQnVZqjb O86rqbCPOfekzsQVrr3xfWI8dUxGTmpCOxSiOsLXhZ5CS0Wdwgf0C5zb9S5IvBaZtm2V UX0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695373042; x=1695977842; h=references:in-reply-to:message-id:date:subject:cc:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=RDJs3U1rqa7YI0/roeh/1SBiVi3tTUp7AZYFFQzYY+8=; b=YAkfuhw8YZTKcTOaMzZygqJ6mCUUiUwFE4Nfhaf2GijQEW0/74mqltmyVKx6W7lehO 8h56FISfuxb2aoDzIsz2uEclFHbJR+9FV20EEGQsXEh6g7QiAh+987Q/4ND8zsPayVwQ rnhXto6TjlVaM9ppo4NmrbbBdb/mk9ikGHFhYcr+f4nzrSkC/AlmFDmOw60IE5J0Rkdo 1gQJZ3aA6k22/ESUcvn+eqibBhvAsEWc0XgSzBfYwmX69YqcpYR7dfBoOBg26YECtgi7 hu9BKM4MdrP2MoK8wru8kUb14ofaYNGH36VV1Rh63bh+R/Wwlj2m6rY8NFqmhrpoJTvS ViZg== X-Gm-Message-State: AOJu0Yzs8A2HEm+HoLbGEJb4LvYz2VNXJ7mzYLNIfP2XP+ERAUWA/X2K wOQAJxy3ucQE47h+XnNGSsftEQ== X-Received: by 2002:a17:90a:f687:b0:274:74ee:eda5 with SMTP id cl7-20020a17090af68700b0027474eeeda5mr7847201pjb.4.1695373042268; Fri, 22 Sep 2023 01:57:22 -0700 (PDT) Received: from hsinchu26.internal.sifive.com (59-124-168-89.hinet-ip.hinet.net. [59.124.168.89]) by smtp.gmail.com with ESMTPSA id t15-20020a17090a024f00b00256b67208b1sm4815024pje.56.2023.09.22.01.57.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Sep 2023 01:57:21 -0700 (PDT) From: Yong-Xuan Wang <yongxuan.wang@sifive.com> To: linux-riscv@lists.infradead.org, kvm-riscv@lists.infradead.org Cc: greentime.hu@sifive.com, vincent.chen@sifive.com, tjytimi@163.com, alex@ghiti.fr, Yong-Xuan Wang <yongxuan.wang@sifive.com>, Conor Dooley <conor@kernel.org>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Paul Walmsley <paul.walmsley@sifive.com>, Palmer Dabbelt <palmer@dabbelt.com>, Albert Ou <aou@eecs.berkeley.edu>, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 2/3] dt-bindings: riscv: Add Svadu Entry Date: Fri, 22 Sep 2023 08:56:48 +0000 Message-Id: <20230922085701.3164-3-yongxuan.wang@sifive.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230922085701.3164-1-yongxuan.wang@sifive.com> References: <20230922085701.3164-1-yongxuan.wang@sifive.com> X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Fri, 22 Sep 2023 01:57:46 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1777730026478102952 X-GMAIL-MSGID: 1777761272962256005 |
Series |
[v2,1/3] RISC-V: Detect and Enable Svadu Extension Support
|
|
Commit Message
Yong-Xuan Wang
Sept. 22, 2023, 8:56 a.m. UTC
Add an entry for the Svadu extension to the riscv,isa-extensions property.
Signed-off-by: Yong-Xuan Wang <yongxuan.wang@sifive.com>
---
Documentation/devicetree/bindings/riscv/extensions.yaml | 6 ++++++
1 file changed, 6 insertions(+)
Comments
On Fri, Sep 22, 2023 at 08:56:48AM +0000, Yong-Xuan Wang wrote: > Add an entry for the Svadu extension to the riscv,isa-extensions property. > > Signed-off-by: Yong-Xuan Wang <yongxuan.wang@sifive.com> > --- > Documentation/devicetree/bindings/riscv/extensions.yaml | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/Documentation/devicetree/bindings/riscv/extensions.yaml b/Documentation/devicetree/bindings/riscv/extensions.yaml > index cc1f546fdbdc..b5a0aed0165b 100644 > --- a/Documentation/devicetree/bindings/riscv/extensions.yaml > +++ b/Documentation/devicetree/bindings/riscv/extensions.yaml > @@ -147,6 +147,12 @@ properties: > ratified at commit 3f9ed34 ("Add ability to manually trigger > workflow. (#2)") of riscv-time-compare. > > + - const: svadu > + description: | > + The standard Svadu supervisor-level extension for hardware updating > + of PTE A/D bits as frozen at commit b65e07c ("move to Frozen > + state") of riscv-svadu. > + > - const: svinval > description: > The standard Svinval supervisor-level extension for fine-grained > -- > 2.17.1 > Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
On Fri, Sep 22, 2023, at 4:56 AM, Yong-Xuan Wang wrote: > Add an entry for the Svadu extension to the riscv,isa-extensions property. > > Signed-off-by: Yong-Xuan Wang <yongxuan.wang@sifive.com> > --- > Documentation/devicetree/bindings/riscv/extensions.yaml | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/Documentation/devicetree/bindings/riscv/extensions.yaml > b/Documentation/devicetree/bindings/riscv/extensions.yaml > index cc1f546fdbdc..b5a0aed0165b 100644 > --- a/Documentation/devicetree/bindings/riscv/extensions.yaml > +++ b/Documentation/devicetree/bindings/riscv/extensions.yaml > @@ -147,6 +147,12 @@ properties: > ratified at commit 3f9ed34 ("Add ability to manually > trigger > workflow. (#2)") of riscv-time-compare. > > + - const: svadu > + description: | > + The standard Svadu supervisor-level extension for hardware updating > + of PTE A/D bits as frozen at commit b65e07c ("move to Frozen > + state") of riscv-svadu. > + This is incomplete without a specification of the behavior of the HADE bit implied by svadu being present. The ratified RVA20 requires page table accesses with A/D = 0 to trap, in other words HADE = 0 for RVA20 conformance. If we are serious about compatibility, I think that we need platforms to be able to conform to both RVA20 and RVA23, which requires HADE = 0 at kernel entry with a SBI call to set HADE = 1. For the same reason KVM should probably default to HADE = 0 so that the default configuration remains conformant to RVA20. -s > - const: svinval > description: > The standard Svinval supervisor-level extension for fine-grained > -- > 2.17.1 > > > _______________________________________________ > linux-riscv mailing list > linux-riscv@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-riscv
On 27 Sep 2023, at 18:24, Stefan O'Rear <sorear@fastmail.com> wrote: > > On Fri, Sep 22, 2023, at 4:56 AM, Yong-Xuan Wang wrote: >> Add an entry for the Svadu extension to the riscv,isa-extensions property. >> >> Signed-off-by: Yong-Xuan Wang <yongxuan.wang@sifive.com> >> --- >> Documentation/devicetree/bindings/riscv/extensions.yaml | 6 ++++++ >> 1 file changed, 6 insertions(+) >> >> diff --git a/Documentation/devicetree/bindings/riscv/extensions.yaml >> b/Documentation/devicetree/bindings/riscv/extensions.yaml >> index cc1f546fdbdc..b5a0aed0165b 100644 >> --- a/Documentation/devicetree/bindings/riscv/extensions.yaml >> +++ b/Documentation/devicetree/bindings/riscv/extensions.yaml >> @@ -147,6 +147,12 @@ properties: >> ratified at commit 3f9ed34 ("Add ability to manually >> trigger >> workflow. (#2)") of riscv-time-compare. >> >> + - const: svadu >> + description: | >> + The standard Svadu supervisor-level extension for hardware updating >> + of PTE A/D bits as frozen at commit b65e07c ("move to Frozen >> + state") of riscv-svadu. >> + > > This is incomplete without a specification of the behavior of the HADE bit implied > by svadu being present. > > The ratified RVA20 requires page table accesses with A/D = 0 to trap, in other > words HADE = 0 for RVA20 conformance. If we are serious about compatibility, > I think that we need platforms to be able to conform to both RVA20 and RVA23, > which requires HADE = 0 at kernel entry with a SBI call to set HADE = 1. For > the same reason KVM should probably default to HADE = 0 so that the default > configuration remains conformant to RVA20. I’ve filed https://github.com/riscv/riscv-svadu/issues/21 to track this broken ISA design, as discussed on IRC. As a FreeBSD RISC-V developer, and sometime reviewer of Linux RISC-V patches, this is a NAK from me for this ISA design. Which does beg the question of how much sense the current RISC-V processes make, given for freezing a spec you just need to send out the relevant RFC patches, they don’t actually need to have any review from the project in question that says it’s a sensible design, instead treating that as part of the public review period, where it’s much harder to fundamentally change the spec, despite being the first time most people see it or take it seriously as a thing to look at. In my opinion there is a serious need for knowledgeable people on the software side to review the ISA extension and its interaction with software *before* it can be frozen so that these things can be fixed. And of course, if they do get fixed during/after public review, what good is the frozen state anyway, because a spec that changes is not very frozen. But I’m probably preaching to the choir here about RISC-V processes being unfit for purpose. Jess >> - const: svinval >> description: >> The standard Svinval supervisor-level extension for fine-grained >> -- >> 2.17.1 >> >> >> _______________________________________________ >> linux-riscv mailing list >> linux-riscv@lists.infradead.org >> http://lists.infradead.org/mailman/listinfo/linux-riscv > > _______________________________________________ > linux-riscv mailing list > linux-riscv@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-riscv
diff --git a/Documentation/devicetree/bindings/riscv/extensions.yaml b/Documentation/devicetree/bindings/riscv/extensions.yaml index cc1f546fdbdc..b5a0aed0165b 100644 --- a/Documentation/devicetree/bindings/riscv/extensions.yaml +++ b/Documentation/devicetree/bindings/riscv/extensions.yaml @@ -147,6 +147,12 @@ properties: ratified at commit 3f9ed34 ("Add ability to manually trigger workflow. (#2)") of riscv-time-compare. + - const: svadu + description: | + The standard Svadu supervisor-level extension for hardware updating + of PTE A/D bits as frozen at commit b65e07c ("move to Frozen + state") of riscv-svadu. + - const: svinval description: The standard Svinval supervisor-level extension for fine-grained