OpenSBI Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/4] Add WorldGuard support with wgchecker2
@ 2026-07-25  2:38 Raymond Mao
  2026-07-25  2:38 ` [PATCH v2 1/4] lib: utils: fdt: add generic domain and property parsing helpers Raymond Mao
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Raymond Mao @ 2026-07-25  2:38 UTC (permalink / raw)
  To: opensbi
  Cc: scott, dave.patel, raymond.mao, robin.randhawa, samuel.holland,
	anup.patel, anuppate, anup, dhaval, peter.lin

From: Raymond Mao <raymond.mao@riscstar.com>

This series adds WorldGuard support according to the wgchecker2 DT-
binding [1] with QEMU virt integration.

The implementation base on prerequisite series [2]:
- reuse sbi_hart_protection for hart-local runtime reconfiguration
- reuse sbi_domain_data for per-domain WorldGuard state
- keep WorldGuard-specific setup and checker programming in platform
  code

At boot, the generic platform code invokes a QEMU virt WorldGuard
setup path which:
- parses wgchecker2 checker instances
- parses resource access-controller entries and programs checker MMIO
- parses per-hart CPU defaults from /cpus
- parses per-domain WorldGuard metadata under hw-isolation

During domain transitions, the WorldGuard hart protection
implementation reprograms MLWID and, when available, MWIDDELEG and
SLWID.

The series is split as follows:
1. add reusable FDT helpers needed by the WorldGuard parser
2. add WorldGuard CSR definitions and hart extension flags
3. document the current DT layout consumed by the implementation
4. add the wgchecker2 / WorldGuard runtime and QEMU virt integration

[1] dt-bindings: riscv: Add RISC-V Worlds and SiFive WorldGuard DT
    bindings
    https://patchwork.kernel.org/project/linux-riscv/list/?series=1113881
[2] [PATCH 0/5] Extend hart protection abstraction for ID configuration
    https://lore.kernel.org/opensbi/20260717074413.2536416-1-anup.patel@oss.qualcomm.com/

Raymond Mao (4):
  lib: utils: fdt: add generic domain and property parsing helpers
  hart: add WorldGuard CSR IDs and hart extension flags
  docs: document WorldGuard DT bindings
  platform: generic: add WorldGuard support with wgchecker2

 docs/domain_support.md                        | 186 ++++++
 include/sbi/riscv_encoding.h                  |   3 +
 include/sbi/sbi_hart.h                        |   4 +
 include/sbi_utils/fdt/fdt_domain.h            |  13 +
 include/sbi_utils/fdt/fdt_helper.h            |  10 +
 lib/sbi/sbi_hart.c                            |   2 +
 lib/utils/fdt/fdt_domain.c                    |  46 +-
 lib/utils/fdt/fdt_helper.c                    |  76 +++
 .../generic/include/qemu_virt_worldguard.h    |  13 +
 platform/generic/include/wgchecker2.h         |  78 +++
 platform/generic/include/worldguard.h         |  44 ++
 platform/generic/objects.mk                   |   3 +
 platform/generic/platform.c                   |  15 +-
 platform/generic/virt/qemu_virt_worldguard.c  |  25 +
 platform/generic/wgchecker2.c                 | 500 ++++++++++++++++
 platform/generic/worldguard.c                 | 553 ++++++++++++++++++
 16 files changed, 1569 insertions(+), 2 deletions(-)
 create mode 100644 platform/generic/include/qemu_virt_worldguard.h
 create mode 100644 platform/generic/include/wgchecker2.h
 create mode 100644 platform/generic/include/worldguard.h
 create mode 100644 platform/generic/virt/qemu_virt_worldguard.c
 create mode 100644 platform/generic/wgchecker2.c
 create mode 100644 platform/generic/worldguard.c

-- 
2.25.1

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

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

end of thread, other threads:[~2026-07-25  2:39 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-25  2:38 [PATCH v2 0/4] Add WorldGuard support with wgchecker2 Raymond Mao
2026-07-25  2:38 ` [PATCH v2 1/4] lib: utils: fdt: add generic domain and property parsing helpers Raymond Mao
2026-07-25  2:38 ` [PATCH v2 2/4] hart: add WorldGuard CSR IDs and hart extension flags Raymond Mao
2026-07-25  2:38 ` [PATCH v2 3/4] docs: document WorldGuard DT bindings Raymond Mao
2026-07-25  2:38 ` [PATCH v2 4/4] platform: generic: add WorldGuard support with wgchecker2 Raymond Mao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox