OpenSBI Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Yu-Chien Peter Lin <peter.lin@sifive.com>
To: Anup Patel <anup@brainfault.org>,
	pawandeep.oza@oss.qualcomm.com, rkrcmar@qti.qualcomm.com
Cc: opensbi@lists.infradead.org, raymond.mao@riscstar.com,
	robin.randhawa@sifive.com, samuel.holland@sifive.com,
	zong.li@sifive.com, greentime.hu@sifive.com
Subject: Re: [PATCH v3 0/9] Add RISC-V Worlds ISA support to OpenSBI
Date: Fri, 30 Oct 2026 18:49:40 +0800	[thread overview]
Message-ID: <auR2RJRs5RHKGdvp@plin-1878> (raw)
In-Reply-To: <CAAhSdy3C=w+Si19sfpn7ioqVSRMdz+2=eZ5gzdn3ohnoj8q3MQ@mail.gmail.com>

Hi Anup,

On Wed, Oct 28, 2026 at 04:50:24PM +0530, Anup Patel wrote:
> Hi Peter,
> 
> On Tue, Oct 27, 2026 at 2:05 PM Yu-Chien Peter Lin <peter.lin@sifive.com> wrote:
> >
> > This patch series adds support for the RISC-V Worlds ISA extensions in
> > OpenSBI, introducing a WID-based hart protection backend to enforce
> > hardware isolation boundaries across domains.
> >
> > Trust Model and Boot-time Roles
> > -------------------------------
> >
> > The implementation adheres to the two-phase M-mode trust model:
> >
> > - RoT M-mode phase: An earlier boot stage (e.g., ROM or SPL) may program
> >   mwid and mlwidlist, locking mwid prior to handing off execution to
> >   OpenSBI.
> >
> > - Regular M-mode phase (OpenSBI): OpenSBI treats the non-ISA platform
> >   constraints (pmwid, pmwidlist, pmlwidlist) and CSR states (mwid,
> >   mlwidlist) as immutable input policies from the hardware/RoT. It locks
> >   mwid if still unlocked, preventing subsequent M-mode software from
> >   altering its own WID, and programs per-domain mlwid and mwiddeleg based
> >   on device tree configuration.
> >
> > Device Tree Bindings
> > --------------------
> >
> > Per-hart properties defined in Linux kernel DT bindings v3 [1]:
> > - riscv,pmwid: M-mode World ID
> > - riscv,pmwidlist: M-mode permitted WID bitmap
> > - riscv,pmlwidlist: S/U-mode permitted WID bitmap
> >
> > Per-domain properties (see docs/domain_support.md):
> > - wid: World ID assigned to this domain for S/U-mode
> > - widdeleg: WID delegation bitmap for this domain
> >
> > Changes since v2
> > ----------------
> > - Make 'wid' property mandatory for all domains (including root) when
> >   Smlwid is implemented; reject misconfigured domains at boot.
> > - Remove M-mode WID fallback logic (mwid/pmwid) for S-mode domain WID.
> > - Validate domain wid and widdeleg against pmlwidlist and mlwidlist masks.
> > - Introduce a new patch to propagate error from sbi_hart_protection_reconfigure()
> >   in sbi_domain_context.
> > - Adapt to upstream domain state framework API rename (sbi_domain_data ->
> >   sbi_domain_state).
> > - Update documentation and boot log output accordingly.
> >
> > [1] https://patchwork.kernel.org/project/linux-riscv/cover/20260812122131.1534906-1-peter.lin@sifive.com/
> >
> > Yu-Chien Peter Lin (9):
> >   lib: sbi_hart: detect RISC-V Worlds ISA extensions
> >   lib: utils: fdt_helper: parse RISC-V Worlds per-hart WID properties
> >   lib: fdt_domain: parse domain WID properties
> >   lib: sbi_hart: lock mwid CSR for RoT immutability
> >   lib: sbi_domain_context: propagate error from
> >     sbi_hart_protection_reconfigure
> >   lib: sbi_hart_worlds: Implement WID hart protection backend
> >   include: sbi_types: add PRIx64 format macro
> >   lib: sbi: display World ID configuration at boot
> >   docs: document WID DT properties
> >
> >  docs/domain_support.md             |  36 +++++
> >  include/sbi/riscv_encoding.h       |  12 ++
> >  include/sbi/sbi_domain.h           |   6 +
> >  include/sbi/sbi_hart.h             |  15 +++
> >  include/sbi/sbi_hart_worlds.h      |  24 ++++
> >  include/sbi/sbi_types.h            |   2 +
> >  include/sbi_utils/fdt/fdt_helper.h |   2 +
> >  lib/sbi/objects.mk                 |   1 +
> >  lib/sbi/sbi_domain.c               |  20 +++
> >  lib/sbi/sbi_domain_context.c       |   5 +-
> >  lib/sbi/sbi_hart.c                 |  38 ++++++
> >  lib/sbi/sbi_hart_worlds.c          | 210 +++++++++++++++++++++++++++++
> >  lib/sbi/sbi_init.c                 |  13 ++
> >  lib/utils/fdt/fdt_domain.c         |  84 ++++++++++++
> >  lib/utils/fdt/fdt_helper.c         |  90 +++++++++++++
> >  platform/generic/platform.c        |  13 +-
> >  16 files changed, 569 insertions(+), 2 deletions(-)
> >  create mode 100644 include/sbi/sbi_hart_worlds.h
> >  create mode 100644 lib/sbi/sbi_hart_worlds.c
> >
> > --
> > 2.43.7
> >
> 
> Overall, this series is in great shape. Once, I will
> merge once my comments are addressed.

Sure, comments are addressed accordingly.

Hi Oza, Radim,

Please re-review the PATCHv4.

Thanks,
Peter Lin

> 
> Thanks,
> Anup

-- 
opensbi mailing list
opensbi@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/opensbi

      reply	other threads:[~2026-10-30 10:49 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-27  8:35 [PATCH v3 0/9] Add RISC-V Worlds ISA support to OpenSBI Yu-Chien Peter Lin
2026-10-27  8:35 ` [PATCH v3 1/9] lib: sbi_hart: detect RISC-V Worlds ISA extensions Yu-Chien Peter Lin
2026-10-28 10:33   ` Anup Patel
2026-10-27  8:35 ` [PATCH v3 2/9] lib: utils: fdt_helper: parse RISC-V Worlds per-hart WID properties Yu-Chien Peter Lin
2026-10-27 18:22   ` Pawandeep Oza
2026-10-28 10:40     ` Anup Patel
2026-10-27  8:35 ` [PATCH v3 3/9] lib: fdt_domain: parse domain " Yu-Chien Peter Lin
2026-10-27 18:22   ` Pawandeep Oza
2026-10-28 10:52   ` Anup Patel
2026-10-27  8:35 ` [PATCH v3 4/9] lib: sbi_hart: lock mwid CSR for RoT immutability Yu-Chien Peter Lin
2026-10-28 10:53   ` Anup Patel
2026-10-27  8:35 ` [PATCH v3 5/9] lib: sbi_domain_context: propagate error from sbi_hart_protection_reconfigure Yu-Chien Peter Lin
2026-10-27 18:23   ` Pawandeep Oza
2026-10-28 10:54   ` Anup Patel
2026-10-30 12:26   ` Radim Krcmar
2026-10-27  8:35 ` [PATCH v3 6/9] lib: sbi_hart_worlds: Implement WID hart protection backend Yu-Chien Peter Lin
2026-10-27 18:23   ` Pawandeep Oza
2026-10-28 11:19   ` Anup Patel
2026-10-27  8:35 ` [PATCH v3 7/9] include: sbi_types: add PRIx64 format macro Yu-Chien Peter Lin
2026-10-28 11:12   ` Anup Patel
2026-10-27  8:35 ` [PATCH v3 8/9] lib: sbi: display World ID configuration at boot Yu-Chien Peter Lin
2026-10-27 18:24   ` Pawandeep Oza
2026-10-28 11:11   ` Anup Patel
2026-10-27  8:35 ` [PATCH v3 9/9] docs: document WID DT properties Yu-Chien Peter Lin
2026-10-27 18:24   ` Pawandeep Oza
2026-10-28 11:10   ` Anup Patel
2026-10-30 12:49   ` Radim Krcmar
2026-10-28 11:20 ` [PATCH v3 0/9] Add RISC-V Worlds ISA support to OpenSBI Anup Patel
2026-10-30 10:49   ` Yu-Chien Peter Lin [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=auR2RJRs5RHKGdvp@plin-1878 \
    --to=peter.lin@sifive.com \
    --cc=anup@brainfault.org \
    --cc=greentime.hu@sifive.com \
    --cc=opensbi@lists.infradead.org \
    --cc=pawandeep.oza@oss.qualcomm.com \
    --cc=raymond.mao@riscstar.com \
    --cc=rkrcmar@qti.qualcomm.com \
    --cc=robin.randhawa@sifive.com \
    --cc=samuel.holland@sifive.com \
    --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