[PATCH 0/7] Add WorldGuard hwiso support
Raymond Mao
raymondmaoca at gmail.com
Fri Jul 24 19:52:41 PDT 2026
Hi Peter and Anup,
On Tue, Jul 21, 2026 at 2:32 AM Peter Lin <peter.lin at sifive.com> wrote:
>
> Thanks Raymond,
>
> For the WorldGuard checker part, we are still addressing
> reviewer feedback [1]. Please expect changes that may
> impact your implementation in OpenSBI.
>
> [1] https://patchwork.kernel.org/project/linux-riscv/patch/20260619105834.1277302-4-peter.lin@sifive.com/
>
I have posted a v2 series "[PATCH v2 0/4] Add WorldGuard support with
wgchecker2" [1] based on Anup's series [2] and Peter's DT-binding RFC
[3].
All implementations of WG are on top of sbi_hart_protection and sbi_domain_data.
Please kindly provide your feedback.
[1] https://lore.kernel.org/opensbi/20260725023821.3795618-1-raymondmaoca@gmail.com/
[2] https://lore.kernel.org/opensbi/20260717074413.2536416-1-anup.patel@oss.qualcomm.com/
[3] https://patchwork.kernel.org/project/linux-riscv/list/?series=1113881
Thanks and regards,
Raymond
> On Mon, Jul 20, 2026 at 11:09 PM Raymond Mao <raymondmaoca at gmail.com> wrote:
>>
>> Hi Anup,
>>
>> On Mon, Jul 20, 2026 at 4:41 AM Anup Patel <anup at brainfault.org> wrote:
>> >
>> > On Wed, May 20, 2026 at 2:03 AM Raymond Mao <raymondmaoca at gmail.com> wrote:
>> > >
>> > > From: Raymond Mao <raymond.mao at riscstar.com>
>> > >
>> > > This series adds WorldGuard implementation for OpenSBI on top of the
>> > > generic hardware isolation (HWISO) hooks.
>> > >
>> > > The goal is to let OpenSBI:
>> > > - program platform WorldGuard checker state at boot
>> > > - parse per-domain WorldGuard metadata from the device tree
>> > > - reprogram hart WorldGuard runtime state during domain transitions
>> > >
>> > > The current implementation targets the WorldGuard model of
>> > > `sifive,wgchecker2` checker plus per-hart and per-domain WorldGuard
>> > > metadata from DT.
>> > >
>> > > The series is organized as follows:
>> > > 1. add the WorldGuard CSR definitions and hart extension flags needed
>> > > to detect support for MLWID, MWIDDELEG, and SLWID
>> > > 2. document the HWISO / WorldGuard device-tree metadata used by the
>> > > current implementation
>> > > 3. add a QEMU virt DT overlay that describes domain WID/WID list
>> > > assignment and checker permission policy for the current test flow
>> > > 4. add generic-platform WorldGuard runtime support together with
>> > > `wgchecker2` checker parsing and boot-time MMIO programming
>> > > 5. add generic HWISO SBIUNIT coverage
>> > > 6. add QEMU virt WorldGuard mechanism-specific SBIUNIT checks for
>> > > boot-time checker programming and runtime CSR state
>> > > 7. add a QEMU virt failure-mode SBIUNIT test that intentionally
>> > > triggers a denied WorldGuard access and verifies the expected trap
>> > >
>> > > Notes:
>> > > - The implementation has been verified with QEMU virt that supports
>> > > `wg=on`[1].
>> > > - This series depends on previous patches ([2] and [3]) for
>> > > introducing HWISO framework.
>> > >
>> > > [1] https://github.com/cwshu/qemu/tree/riscv-wg-dts
>> > > [2] [PATCH 1/2] sbi: add hardware isolation abstraction framework
>> > > https://lore.kernel.org/opensbi/20260504173948.1663823-1-raymondmaoca@gmail.com/
>> > > [3] [PATCH 2/2] sbi: route domain lifecycle transitions through hwiso hooks
>> > > https://lore.kernel.org/opensbi/20260504173948.1663823-2-raymondmaoca@gmail.com/
>> > >
>> > > Raymond Mao (7):
>> > > hart: add WorldGuard CSR IDs and hart extension flags
>> > > docs: document hwiso WorldGuard DT bindings
>> > > [NOT-FOR-UPSTREAM] platform: virt: add QEMU WorldGuard hwiso overlay
>> > > platform: generic: add WorldGuard hwiso support with wgchecker2
>> > > test: add generic hwiso SBI unit coverage
>> > > platform: virt: add QEMU virt WorldGuard hwiso tests
>> > > platform: virt: add WorldGuard HWISO failure-mode SBIUNIT test
>> >
>> > I will consider this series superseded by "Add RISC-V Worlds ISA
>> > support to OpenSBI" posted by Yu-Chein Peter Lin (SiFive).
>> >
>>
>> Not really, the one from Peter is with the ISA and DT-bings but
>> without the WG implementations.
>> But I will rebase my series on top of his one and send a v2.
>>
>> Regards,
>> Raymond
>>
>> > Regards,
>> > Anup
More information about the opensbi
mailing list