From: Conor Dooley <conor@kernel.org>
To: Krzysztof Kozlowski <krzk@kernel.org>
Cc: Yu-Chien Peter Lin <peter.lin@sifive.com>,
devicetree@vger.kernel.org, linux-riscv@lists.infradead.org,
linux-kernel@vger.kernel.org, robh@kernel.org,
krzk+dt@kernel.org, conor+dt@kernel.org, pjw@kernel.org,
palmer@dabbelt.com, aou@eecs.berkeley.edu, alex@ghiti.fr,
samuel.holland@sifive.com, dlan@kernel.org, guodong@riscstar.com,
dfustini@oss.tenstorrent.com, michal.simek@amd.com,
junhui.liu@pigmoral.tech, darshan.prajapati@einfochips.com,
akpm@linux-foundation.org, zhangchunyan@iscas.ac.cn,
luxu.kernel@bytedance.com, pincheng.plct@isrc.iscas.ac.cn,
nick.hu@sifive.com, jim.shu@sifive.com, zong.li@sifive.com,
greentime.hu@sifive.com, robin.randhawa@sifive.com,
scott@riscstar.com, dave.patel@riscstar.com,
raymond.mao@riscstar.com, anup@brainfault.org,
pawandeep.oza@oss.qualcomm.com
Subject: Re: [PATCH v2 3/3] dt-bindings: sifive: Add WorldGuard Checker
Date: Thu, 30 Jul 2026 18:36:27 +0100 [thread overview]
Message-ID: <20260730-component-wake-80840a196f8d@spud> (raw)
In-Reply-To: <20260730-towering-modest-horse-ccbdcc@quoll>
[-- Attachment #1: Type: text/plain, Size: 6180 bytes --]
On Thu, Jul 30, 2026 at 09:35:02AM +0200, Krzysztof Kozlowski wrote:
> On Thu, Jul 30, 2026 at 12:39:08AM +0800, Yu-Chien Peter Lin wrote:
> > Add YAML binding schema for the SiFive wgChecker, a programmable
>
> There is no "YAML" binding schema.
>
> > access controller integrated in the interconnect fabric of RISC-V
> > Worlds-capable SoCs.
> >
> > wgChecker enforces World ID (WID) based access control on downstream
> > bus transactions. Each checker slot encodes a 2-bit permission field
> > per WID (read/write), enabling fine-grained memory partitioning and
> > device isolation between execution contexts. Violations are reported
> > via bus errors, interrupts, or both, selectable and lockable per slot.
> >
> > The binding registers wgChecker as an access-controllers provider.
> > Consumers (i.e. its protected device) reference it via the standard
> > access-controllers phandle to declare their access requirements.
> >
> > Also document the sifive,trustedwid property for the /cpus node,
> > identifying the privileged WID authorized to configure all checkers
> > on the platform.
> >
> > Link: https://github.com/riscvarchive/security/blob/main/papers/worldguard%20proposal.pdf
> > Signed-off-by: Yu-Chien Peter Lin <peter.lin@sifive.com>
> > Reviewed-by: Zong Li <zong.li@sifive.com>
> > Reviewed-by: Jim Shu <jim.shu@sifive.com>
>
> What exactly these reviews pointed out?
>
> > ---
> > .../devicetree/bindings/riscv/worlds.yaml | 9 +
> > .../bindings/sifive/sifive,wgchecker2.yaml | 356 ++++++++++++++++++
> > 2 files changed, 365 insertions(+)
> > create mode 100644 Documentation/devicetree/bindings/sifive/sifive,wgchecker2.yaml
> >
> > diff --git a/Documentation/devicetree/bindings/riscv/worlds.yaml b/Documentation/devicetree/bindings/riscv/worlds.yaml
> > index cc8b3747591e..c39a06c2dd8d 100644
> > --- a/Documentation/devicetree/bindings/riscv/worlds.yaml
> > +++ b/Documentation/devicetree/bindings/riscv/worlds.yaml
> > @@ -34,6 +34,14 @@ properties:
> > minimum: 2
> > maximum: 64
> >
> > + sifive,trustedwid:
>
> No, for the same reasons.
I am not entirely sure that this is defined by the platform compatible,
if you've got something like a FPGA with lots of configurability then it
may be needed. Then again, yeah maybe it can just come from the platform
compatible unlike a device shows up that actually needs it.
This is especially true if the consumer of the property is the SBI
firmware.
(that's assuming "same reason" follows on from your comment on the
prior binding)
>
> > + $ref: /schemas/types.yaml#/definitions/uint32
> > + maximum: 31
> > + description: |
> > + The World ID (WID) designated as the trusted WID for this platform.
> > + Transactions tagged with this WID are authorized to access and configure
> > + WorldGuard blocks, including wgCheckers and wgMarkers.
> > +
> > additionalProperties: true
> >
> > examples:
> > @@ -44,6 +52,7 @@ examples:
> > #size-cells = <0>;
> > timebase-frequency = <1000000>;
> > riscv,nworlds = <4>;
> > + sifive,trustedwid = <3>;
> >
> > cpu@0 {
> > device_type = "cpu";
> > diff --git a/Documentation/devicetree/bindings/sifive/sifive,wgchecker2.yaml b/Documentation/devicetree/bindings/sifive/sifive,wgchecker2.yaml
> > new file mode 100644
> > index 000000000000..c025a4765cb3
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/sifive/sifive,wgchecker2.yaml
>
> No, you do not get per vendor directory. NAK.
>
> Do you see Qcom? Or TI? Or NXP?
>
> Place it in appropriate directory matching the hardware.
Which would be access-controllers.
>
>
> > @@ -0,0 +1,356 @@
> > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > +# Copyright (C) 2026 SiFive, Inc.
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/sifive/sifive,wgchecker2.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: SiFive WorldGuard Checker
> > +
> > +maintainers:
> > + - Yu-Chien Peter Lin <peter.lin@sifive.com>
> > +
> > +description: |
> > + The RISC-V Worlds ISA extension defines World IDs (WIDs) as architectural
> > + identifiers that tag each system transaction with its originating context.
> > + System integrators assign WIDs to execution contexts such as privilege modes,
> > + trusted execution environments, or other isolation boundaries.
> > +
> > + The SiFive WorldGuard Checker is a hardware firewall positioned in the
> > + system interconnect fabric. It inspects every transaction, evaluating the
> > + WID against access control policies encoded in checker slots for each
> > + protected resource. Transactions from unauthorized WIDs are blocked and
> > + reported as bus errors, interrupts, or both.
> > +
> > + This enables spatial partitioning of memory regions and memory-mapped devices
> > + across execution contexts. Different address ranges can enforce distinct
> > + policies, allowing isolated workloads to coexist with hardware-enforced
> > + protection.
> > +
> > + The wgChecker acts as an access-controller provider as defined in the
> > + access-controllers framework. Protected devices are consumers that declare
> > + their access policy via the access-controllers property. The hardware
> > + supports up to 32 World IDs.
> > +
> > + The World ID authorized to configure WorldGuard blocks is specified by the
> > + sifive,trustedwid property in the /cpus node.
> > +
> > +allOf:
> > + - $ref: /schemas/access-controllers/access-controllers.yaml#
> > +
> > +properties:
> > + compatible:
> > + oneOf:
> > + - items:
> > + - const: qemu,wgchecker2
> > + - const: sifive,wgchecker2
> > + - const: sifive,wgchecker2
>
> You need soc specific compatibles.
>
> I do not believe the two review tags did any actual real review. They
> would tell you to read writing bindings document, wouldn't they?
I did okay the qemu compatible FWIW, the standalone sifive one though I
did not.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
prev parent reply other threads:[~2026-07-30 17:36 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-29 16:39 [PATCH v2 0/3] dt-bindings: riscv: Add RISC-V Worlds and SiFive WorldGuard DT bindings Yu-Chien Peter Lin
2026-07-29 16:39 ` [PATCH v2 1/3] dt-bindings: riscv: Add Worlds ISA extensions Yu-Chien Peter Lin
2026-07-29 16:45 ` sashiko-bot
2026-07-29 16:39 ` [PATCH v2 2/3] dt-bindings: riscv: Add Worlds per-hart properties Yu-Chien Peter Lin
2026-07-29 16:52 ` sashiko-bot
2026-07-29 18:06 ` Rob Herring (Arm)
2026-07-30 7:30 ` Krzysztof Kozlowski
2026-07-29 16:39 ` [PATCH v2 3/3] dt-bindings: sifive: Add WorldGuard Checker Yu-Chien Peter Lin
2026-07-29 18:07 ` Rob Herring (Arm)
2026-07-30 7:35 ` Krzysztof Kozlowski
2026-07-30 7:37 ` Krzysztof Kozlowski
2026-07-30 17:36 ` Conor Dooley [this message]
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=20260730-component-wake-80840a196f8d@spud \
--to=conor@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=alex@ghiti.fr \
--cc=anup@brainfault.org \
--cc=aou@eecs.berkeley.edu \
--cc=conor+dt@kernel.org \
--cc=darshan.prajapati@einfochips.com \
--cc=dave.patel@riscstar.com \
--cc=devicetree@vger.kernel.org \
--cc=dfustini@oss.tenstorrent.com \
--cc=dlan@kernel.org \
--cc=greentime.hu@sifive.com \
--cc=guodong@riscstar.com \
--cc=jim.shu@sifive.com \
--cc=junhui.liu@pigmoral.tech \
--cc=krzk+dt@kernel.org \
--cc=krzk@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=luxu.kernel@bytedance.com \
--cc=michal.simek@amd.com \
--cc=nick.hu@sifive.com \
--cc=palmer@dabbelt.com \
--cc=pawandeep.oza@oss.qualcomm.com \
--cc=peter.lin@sifive.com \
--cc=pincheng.plct@isrc.iscas.ac.cn \
--cc=pjw@kernel.org \
--cc=raymond.mao@riscstar.com \
--cc=robh@kernel.org \
--cc=robin.randhawa@sifive.com \
--cc=samuel.holland@sifive.com \
--cc=scott@riscstar.com \
--cc=zhangchunyan@iscas.ac.cn \
--cc=zong.li@sifive.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox