devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 2/3] dt-bindings: riscv: Add Svadu Entry
       [not found] <20230922085701.3164-1-yongxuan.wang@sifive.com>
@ 2023-09-22  8:56 ` Yong-Xuan Wang
  2023-09-22  9:28   ` Conor Dooley
                     ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Yong-Xuan Wang @ 2023-09-22  8:56 UTC (permalink / raw)
  To: linux-riscv, kvm-riscv
  Cc: greentime.hu, vincent.chen, tjytimi, alex, Yong-Xuan Wang,
	Conor Dooley, Rob Herring, Krzysztof Kozlowski, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, devicetree, linux-kernel

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


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH v2 2/3] dt-bindings: riscv: Add Svadu Entry
  2023-09-22  8:56 ` [PATCH v2 2/3] dt-bindings: riscv: Add Svadu Entry Yong-Xuan Wang
@ 2023-09-22  9:28   ` Conor Dooley
  2023-09-27  7:04   ` Andrew Jones
  2023-09-27 17:24   ` Stefan O'Rear
  2 siblings, 0 replies; 5+ messages in thread
From: Conor Dooley @ 2023-09-22  9:28 UTC (permalink / raw)
  To: Yong-Xuan Wang
  Cc: linux-riscv, kvm-riscv, greentime.hu, vincent.chen, tjytimi, alex,
	Rob Herring, Krzysztof Kozlowski, Paul Walmsley, Palmer Dabbelt,
	Albert Ou, devicetree, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1298 bytes --]

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>

Acked-by: Conor Dooley <conor.dooley@microchip.com>

Thanks,
Conor.

> ---
>  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
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v2 2/3] dt-bindings: riscv: Add Svadu Entry
  2023-09-22  8:56 ` [PATCH v2 2/3] dt-bindings: riscv: Add Svadu Entry Yong-Xuan Wang
  2023-09-22  9:28   ` Conor Dooley
@ 2023-09-27  7:04   ` Andrew Jones
  2023-09-27 17:24   ` Stefan O'Rear
  2 siblings, 0 replies; 5+ messages in thread
From: Andrew Jones @ 2023-09-27  7:04 UTC (permalink / raw)
  To: Yong-Xuan Wang
  Cc: linux-riscv, kvm-riscv, greentime.hu, vincent.chen, tjytimi, alex,
	Conor Dooley, Rob Herring, Krzysztof Kozlowski, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, devicetree, linux-kernel

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>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v2 2/3] dt-bindings: riscv: Add Svadu Entry
  2023-09-22  8:56 ` [PATCH v2 2/3] dt-bindings: riscv: Add Svadu Entry Yong-Xuan Wang
  2023-09-22  9:28   ` Conor Dooley
  2023-09-27  7:04   ` Andrew Jones
@ 2023-09-27 17:24   ` Stefan O'Rear
  2023-09-27 18:44     ` Jessica Clarke
  2 siblings, 1 reply; 5+ messages in thread
From: Stefan O'Rear @ 2023-09-27 17:24 UTC (permalink / raw)
  To: Yong-Xuan Wang, linux-riscv, kvm-riscv
  Cc: greentime.hu, vincent.chen, tjytimi, alex, Conor Dooley,
	Rob Herring, Krzysztof Kozlowski, Paul Walmsley, Palmer Dabbelt,
	Albert Ou, devicetree, linux-kernel

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v2 2/3] dt-bindings: riscv: Add Svadu Entry
  2023-09-27 17:24   ` Stefan O'Rear
@ 2023-09-27 18:44     ` Jessica Clarke
  0 siblings, 0 replies; 5+ messages in thread
From: Jessica Clarke @ 2023-09-27 18:44 UTC (permalink / raw)
  To: LKML
  Cc: Yong-Xuan Wang, linux-riscv, kvm-riscv, Greentime Hu,
	Vincent Chen, Jinyu Tang, Alexandre Ghiti, Conor Dooley,
	Rob Herring, Krzysztof Kozlowski, Paul Walmsley, Palmer Dabbelt,
	Albert Ou,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Stefan O'Rear

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



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-09-27 18:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20230922085701.3164-1-yongxuan.wang@sifive.com>
2023-09-22  8:56 ` [PATCH v2 2/3] dt-bindings: riscv: Add Svadu Entry Yong-Xuan Wang
2023-09-22  9:28   ` Conor Dooley
2023-09-27  7:04   ` Andrew Jones
2023-09-27 17:24   ` Stefan O'Rear
2023-09-27 18:44     ` Jessica Clarke

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).