From: Andrew Jones <ajones@ventanamicro.com>
To: kvm-riscv@lists.infradead.org
Subject: [PATCH RFC 02/11] dt-bindings: riscv: Add Sdtrig optional CSRs existence on DT
Date: Fri, 5 Apr 2024 17:59:41 +0200 [thread overview]
Message-ID: <20240405-ebdb2943657ab08d2d563c03@orel> (raw)
In-Reply-To: <20240329-affidavit-anatomist-1118a12c3e60@wendy>
On Fri, Mar 29, 2024 at 10:31:10AM +0000, Conor Dooley wrote:
> On Fri, Mar 29, 2024 at 05:26:18PM +0800, Max Hsu wrote:
> > The mcontext/hcontext/scontext CSRs are optional in the Sdtrig extension,
> > to prevent RW operations to the missing CSRs, which will cause
> > illegal instructions.
> >
> > As a solution, we have proposed the dt format for these CSRs.
>
> As I mentioned in your other patch, I amn't sure what the actual value
> is in being told about "sdtrig" itself if so many of the CSRs are
> optional. I think we should define pseudo extensions that represent
> usable subsets that are allowed by riscv,isa-extensions, such as
> those you describe here: sdtrig + mcontext, sdtrig + scontext and
> sdtrig + hcontext. Probably also for strig + mscontext. What
> additional value does having a debug child node give us that makes
> it worth having over something like the above?
Yeah, Sdtrig, which doesn't tell you what you get, isn't nice at all.
I wonder if we can start with requiring Sdtrig to be accompanied by
Ssstrict in order to enable the context CSRs, i.e.
Sdtrig - support without optional CSRs
Sdtrig+Ssstrict - probe for optional CSRs, support what's found
If there are platforms with Sdtrig and optional CSRs, but not Ssstrict,
then maybe the optional CSRs can be detected in some vendor-specific way,
where the decision as to whether or not that vendor-specific way is
acceptable is handled case-by-case.
Thanks,
drew
>
> Thanks,
> Conor.
>
> >
> > Signed-off-by: Max Hsu <max.hsu@sifive.com>
> > ---
> > Documentation/devicetree/bindings/riscv/cpus.yaml | 18 ++++++++++++++++++
> > 1 file changed, 18 insertions(+)
> >
> > diff --git a/Documentation/devicetree/bindings/riscv/cpus.yaml b/Documentation/devicetree/bindings/riscv/cpus.yaml
> > index d87dd50f1a4b..c713a48c5025 100644
> > --- a/Documentation/devicetree/bindings/riscv/cpus.yaml
> > +++ b/Documentation/devicetree/bindings/riscv/cpus.yaml
> > @@ -137,6 +137,24 @@ properties:
> > DMIPS/MHz, relative to highest capacity-dmips-mhz
> > in the system.
> >
> > + debug:
> > + type: object
> > + properties:
> > + compatible:
> > + const: riscv,debug-v1.0.0
> > + trigger-module:
> > + type: object
> > + description: |
> > + An indication set of optional CSR existence from
> > + riscv-debug-spec Sdtrig extension
> > + properties:
> > + mcontext-present:
> > + type: boolean
> > + hcontext-present:
> > + type: boolean
> > + scontext-present:
> > + type: boolean
> > +
> > anyOf:
> > - required:
> > - riscv,isa
> >
> > --
> > 2.43.2
> >
> --
> kvm-riscv mailing list
> kvm-riscv at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/kvm-riscv
WARNING: multiple messages have this Message-ID (diff)
From: Andrew Jones <ajones@ventanamicro.com>
To: Conor Dooley <conor.dooley@microchip.com>
Cc: Max Hsu <max.hsu@sifive.com>, Conor Dooley <conor@kernel.org>,
Rob Herring <robh@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>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Pavel Machek <pavel@ucw.cz>, Anup Patel <anup@brainfault.org>,
Atish Patra <atishp@atishpatra.org>,
Paolo Bonzini <pbonzini@redhat.com>,
Shuah Khan <shuah@kernel.org>,
Palmer Dabbelt <palmer@sifive.com>,
linux-riscv@lists.infradead.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org,
kvm@vger.kernel.org, kvm-riscv@lists.infradead.org,
linux-kselftest@vger.kernel.org
Subject: Re: [PATCH RFC 02/11] dt-bindings: riscv: Add Sdtrig optional CSRs existence on DT
Date: Fri, 5 Apr 2024 17:59:41 +0200 [thread overview]
Message-ID: <20240405-ebdb2943657ab08d2d563c03@orel> (raw)
In-Reply-To: <20240329-affidavit-anatomist-1118a12c3e60@wendy>
On Fri, Mar 29, 2024 at 10:31:10AM +0000, Conor Dooley wrote:
> On Fri, Mar 29, 2024 at 05:26:18PM +0800, Max Hsu wrote:
> > The mcontext/hcontext/scontext CSRs are optional in the Sdtrig extension,
> > to prevent RW operations to the missing CSRs, which will cause
> > illegal instructions.
> >
> > As a solution, we have proposed the dt format for these CSRs.
>
> As I mentioned in your other patch, I amn't sure what the actual value
> is in being told about "sdtrig" itself if so many of the CSRs are
> optional. I think we should define pseudo extensions that represent
> usable subsets that are allowed by riscv,isa-extensions, such as
> those you describe here: sdtrig + mcontext, sdtrig + scontext and
> sdtrig + hcontext. Probably also for strig + mscontext. What
> additional value does having a debug child node give us that makes
> it worth having over something like the above?
Yeah, Sdtrig, which doesn't tell you what you get, isn't nice at all.
I wonder if we can start with requiring Sdtrig to be accompanied by
Ssstrict in order to enable the context CSRs, i.e.
Sdtrig - support without optional CSRs
Sdtrig+Ssstrict - probe for optional CSRs, support what's found
If there are platforms with Sdtrig and optional CSRs, but not Ssstrict,
then maybe the optional CSRs can be detected in some vendor-specific way,
where the decision as to whether or not that vendor-specific way is
acceptable is handled case-by-case.
Thanks,
drew
>
> Thanks,
> Conor.
>
> >
> > Signed-off-by: Max Hsu <max.hsu@sifive.com>
> > ---
> > Documentation/devicetree/bindings/riscv/cpus.yaml | 18 ++++++++++++++++++
> > 1 file changed, 18 insertions(+)
> >
> > diff --git a/Documentation/devicetree/bindings/riscv/cpus.yaml b/Documentation/devicetree/bindings/riscv/cpus.yaml
> > index d87dd50f1a4b..c713a48c5025 100644
> > --- a/Documentation/devicetree/bindings/riscv/cpus.yaml
> > +++ b/Documentation/devicetree/bindings/riscv/cpus.yaml
> > @@ -137,6 +137,24 @@ properties:
> > DMIPS/MHz, relative to highest capacity-dmips-mhz
> > in the system.
> >
> > + debug:
> > + type: object
> > + properties:
> > + compatible:
> > + const: riscv,debug-v1.0.0
> > + trigger-module:
> > + type: object
> > + description: |
> > + An indication set of optional CSR existence from
> > + riscv-debug-spec Sdtrig extension
> > + properties:
> > + mcontext-present:
> > + type: boolean
> > + hcontext-present:
> > + type: boolean
> > + scontext-present:
> > + type: boolean
> > +
> > anyOf:
> > - required:
> > - riscv,isa
> >
> > --
> > 2.43.2
> >
> --
> kvm-riscv mailing list
> kvm-riscv@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/kvm-riscv
WARNING: multiple messages have this Message-ID (diff)
From: Andrew Jones <ajones@ventanamicro.com>
To: Conor Dooley <conor.dooley@microchip.com>
Cc: Max Hsu <max.hsu@sifive.com>, Conor Dooley <conor@kernel.org>,
Rob Herring <robh@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>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Pavel Machek <pavel@ucw.cz>, Anup Patel <anup@brainfault.org>,
Atish Patra <atishp@atishpatra.org>,
Paolo Bonzini <pbonzini@redhat.com>,
Shuah Khan <shuah@kernel.org>,
Palmer Dabbelt <palmer@sifive.com>,
linux-riscv@lists.infradead.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org,
kvm@vger.kernel.org, kvm-riscv@lists.infradead.org,
linux-kselftest@vger.kernel.org
Subject: Re: [PATCH RFC 02/11] dt-bindings: riscv: Add Sdtrig optional CSRs existence on DT
Date: Fri, 5 Apr 2024 17:59:41 +0200 [thread overview]
Message-ID: <20240405-ebdb2943657ab08d2d563c03@orel> (raw)
In-Reply-To: <20240329-affidavit-anatomist-1118a12c3e60@wendy>
On Fri, Mar 29, 2024 at 10:31:10AM +0000, Conor Dooley wrote:
> On Fri, Mar 29, 2024 at 05:26:18PM +0800, Max Hsu wrote:
> > The mcontext/hcontext/scontext CSRs are optional in the Sdtrig extension,
> > to prevent RW operations to the missing CSRs, which will cause
> > illegal instructions.
> >
> > As a solution, we have proposed the dt format for these CSRs.
>
> As I mentioned in your other patch, I amn't sure what the actual value
> is in being told about "sdtrig" itself if so many of the CSRs are
> optional. I think we should define pseudo extensions that represent
> usable subsets that are allowed by riscv,isa-extensions, such as
> those you describe here: sdtrig + mcontext, sdtrig + scontext and
> sdtrig + hcontext. Probably also for strig + mscontext. What
> additional value does having a debug child node give us that makes
> it worth having over something like the above?
Yeah, Sdtrig, which doesn't tell you what you get, isn't nice at all.
I wonder if we can start with requiring Sdtrig to be accompanied by
Ssstrict in order to enable the context CSRs, i.e.
Sdtrig - support without optional CSRs
Sdtrig+Ssstrict - probe for optional CSRs, support what's found
If there are platforms with Sdtrig and optional CSRs, but not Ssstrict,
then maybe the optional CSRs can be detected in some vendor-specific way,
where the decision as to whether or not that vendor-specific way is
acceptable is handled case-by-case.
Thanks,
drew
>
> Thanks,
> Conor.
>
> >
> > Signed-off-by: Max Hsu <max.hsu@sifive.com>
> > ---
> > Documentation/devicetree/bindings/riscv/cpus.yaml | 18 ++++++++++++++++++
> > 1 file changed, 18 insertions(+)
> >
> > diff --git a/Documentation/devicetree/bindings/riscv/cpus.yaml b/Documentation/devicetree/bindings/riscv/cpus.yaml
> > index d87dd50f1a4b..c713a48c5025 100644
> > --- a/Documentation/devicetree/bindings/riscv/cpus.yaml
> > +++ b/Documentation/devicetree/bindings/riscv/cpus.yaml
> > @@ -137,6 +137,24 @@ properties:
> > DMIPS/MHz, relative to highest capacity-dmips-mhz
> > in the system.
> >
> > + debug:
> > + type: object
> > + properties:
> > + compatible:
> > + const: riscv,debug-v1.0.0
> > + trigger-module:
> > + type: object
> > + description: |
> > + An indication set of optional CSR existence from
> > + riscv-debug-spec Sdtrig extension
> > + properties:
> > + mcontext-present:
> > + type: boolean
> > + hcontext-present:
> > + type: boolean
> > + scontext-present:
> > + type: boolean
> > +
> > anyOf:
> > - required:
> > - riscv,isa
> >
> > --
> > 2.43.2
> >
> --
> kvm-riscv mailing list
> kvm-riscv@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/kvm-riscv
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
next prev parent reply other threads:[~2024-04-05 15:59 UTC|newest]
Thread overview: 51+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-29 9:26 [PATCH RFC 00/11] riscv: support Sdtrig extension hcontext/scontext CSRs Max Hsu
2024-03-29 9:26 ` Max Hsu
2024-03-29 9:26 ` Max Hsu
2024-03-29 9:26 ` [PATCH RFC 01/11] dt-bindings: riscv: Add Sdtrig ISA extension Max Hsu
2024-03-29 9:26 ` Max Hsu
2024-03-29 9:26 ` Max Hsu
2024-03-29 9:26 ` [PATCH RFC 02/11] dt-bindings: riscv: Add Sdtrig optional CSRs existence on DT Max Hsu
2024-03-29 9:26 ` Max Hsu
2024-03-29 9:26 ` Max Hsu
2024-03-29 10:31 ` Conor Dooley
2024-03-29 10:31 ` Conor Dooley
2024-03-29 10:31 ` Conor Dooley
2024-04-05 15:59 ` Andrew Jones [this message]
2024-04-05 15:59 ` Andrew Jones
2024-04-05 15:59 ` Andrew Jones
2024-04-09 15:49 ` Conor Dooley
2024-04-09 15:49 ` Conor Dooley
2024-04-09 15:49 ` Conor Dooley
2024-03-29 9:26 ` [PATCH RFC 03/11] riscv: Add ISA extension parsing for Sdtrig Max Hsu
2024-03-29 9:26 ` Max Hsu
2024-03-29 9:26 ` Max Hsu
2024-03-29 9:26 ` [PATCH RFC 04/11] riscv: Add Sdtrig CSRs definition, Smstateen bit to access Sdtrig CSRs Max Hsu
2024-03-29 9:26 ` Max Hsu
2024-03-29 9:26 ` Max Hsu
2024-03-29 9:26 ` [PATCH RFC 05/11] riscv: cpufeature: Add Sdtrig optional CSRs checks Max Hsu
2024-03-29 9:26 ` Max Hsu
2024-03-29 9:26 ` Max Hsu
2024-03-29 10:21 ` Conor Dooley
2024-03-29 10:21 ` Conor Dooley
2024-03-29 10:21 ` Conor Dooley
2026-04-15 7:05 ` Zane Leung
2026-04-15 7:05 ` Zane Leung
2026-04-15 7:05 ` Zane Leung
2024-03-29 9:26 ` [PATCH RFC 06/11] riscv: suspend: add Smstateen CSRs save/restore Max Hsu
2024-03-29 9:26 ` Max Hsu
2024-03-29 9:26 ` Max Hsu
2024-03-29 9:26 ` [PATCH RFC 07/11] riscv: Add task switch support for scontext CSR Max Hsu
2024-03-29 9:26 ` Max Hsu
2024-03-29 9:26 ` Max Hsu
2024-03-29 9:26 ` [PATCH RFC 08/11] riscv: KVM: Add Sdtrig Extension Support for Guest/VM Max Hsu
2024-03-29 9:26 ` Max Hsu
2024-03-29 9:26 ` Max Hsu
2024-03-29 9:26 ` [PATCH RFC 09/11] riscv: KVM: Add scontext to ONE_REG Max Hsu
2024-03-29 9:26 ` Max Hsu
2024-03-29 9:26 ` Max Hsu
2024-03-29 9:26 ` [PATCH RFC 10/11] riscv: KVM: Add hcontext support Max Hsu
2024-03-29 9:26 ` Max Hsu
2024-03-29 9:26 ` Max Hsu
2024-03-29 9:26 ` [PATCH RFC 11/11] KVM: riscv: selftests: Add Sdtrig Extension to get-reg-list test Max Hsu
2024-03-29 9:26 ` Max Hsu
2024-03-29 9:26 ` Max Hsu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240405-ebdb2943657ab08d2d563c03@orel \
--to=ajones@ventanamicro.com \
--cc=kvm-riscv@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.