[PATCH 00/10] Introduce Virtual IRQ (VIRQ) framework
Raymond Mao
raymondmaoca at gmail.com
Mon Jul 20 08:15:12 PDT 2026
Hi Anup,
On Mon, Jul 20, 2026 at 4:41 AM Anup Patel <anup at brainfault.org> wrote:
>
> On Fri, May 15, 2026 at 4:28 AM Raymond Mao <raymondmaoca at gmail.com> wrote:
> >
> > From: Raymond Mao <raymond.mao at riscstar.com>
> >
> > This series introduces a Virtual IRQ (VIRQ) framework for OpenSBI to
> > support domain-aware wired interrupt couriering.
> >
> > The main use case is to let OpenSBI receive a host HWIRQ in M-mode,
> > map it into a per-channel VIRQ number space, route it to a target
> > domain, notify the target S-mode payload, and let that payload
> > pop/complete the pending VIRQ through an SBI ecall interface.
> >
> > The implementation is organized as follows:
> >
> > - add irqchip helpers for S-mode pending notification
> > - extend domain context switching to support VIRQ-driven
> > cross-domain couriering and return-to-previous-domain flow
> > - add the core VIRQ mapping, routing, and per-(domain,hart)
> > pending queue framework
> > - add a VIRQ vendor ecall extension for POP and COMPLETE
> > - parse sysirq routing rules from DT under /chosen/opensbi-domains
> > - derive APLIC target hart routing from sysirq nodes
> > - update the irqchip/APLIC path to support deferred completion and
> > per-HWIRQ APLIC targets
> > - document the DT binding and routing rules
> >
> > The DT routing model is based on "opensbi,mpxy-sysirq" nodes.
> > Each interrupts-extended entry contributes one routed physical source,
> > its entry index becomes the VIRQ number within the selected
> > opensbi,mpxy-channel-id, and opensbi,domain selects the destination
> > OpenSBI domain.
> >
> > This series depends on a previous patch set:
> > [PATCH v2 1/3] lib: utils: irqchip: implement APLIC hwirq operation hooks
> > https://lore.kernel.org/opensbi/20260504171342.1655882-1-raymondmaoca@gmail.com/#t
> >
> > Raymond Mao (10):
> > lib: irqchip: add S-mode notification helpers
> > lib: sbi: domain: adaptation for supporting VIRQ couriering domain
> > context switch
> > lib: sbi: Add Virtual IRQ (VIRQ) subsystem
> > lib: sbi: Add VIRQ ecall extension
> > lib: sbi: domain: add domain lookup by name
> > lib: utils: fdt: parse sysirq routing from DT
> > lib: utils: irqchip: derive APLIC targets from sysirq nodes
> > lib: irqchip: support deferred completion and per-HWIRQ APLIC targets
> > lib: sbi: domain: ensure boot_hartid is assigned
> > docs: domain: document sysirq VIRQ mapping and routing rules
>
> This VIRQ abstraction is not needed with the improved SBI irqchip
> where each external interrupt (wired / MSI) can be uniquely identified
> by a tuple which SBI irqchip instance and hwirq number in the instance.
>
> Also, the VIRQ ecall is ad-hoc and does not correspond to any
> SBI extension.
>
> All-in-all the whole interrupt routing for supervisor domains must
> be re-written using SBI MPXY + RPMI system irq service group
> as the interface for supervisor domains.
>
> The SBI MPXY is already a ratified SBI extension and OpenSBI
> already has an extensible MPXY framework with a number of MPXY
> drivers under lib/utils/mpxy. The RPMI system irq draft specifcation
> was already shared few months back.
>
As we discussed in the SSWG meeting, the plan to support the SBI MPXY
+ RPMI system irq service group is ongoing.
It will be much appreciated if you can consider to merge this series
to enable the interrupt routing first before I post a separate series
for RPMI on top of this.
Regards,
Raymond
> Regards,
> Anup
More information about the opensbi
mailing list