[PATCH v2] lib: utils/mpxy: bind channel access to owning domain

Rahul Pathak rahul.pathak at oss.qualcomm.com
Sat Jul 11 01:32:47 PDT 2026


On Thu, Jul 9, 2026 at 6:29 AM Pawandeep Oza
<pawandeep.oza at oss.qualcomm.com> wrote:
>
> From: Oza Pawandeep <pawandeep.oza at oss.qualcomm.com>
>
> The MPXY framework currently stores registered channels in a global
> list and exposes them to all callers. However, the intended model is
> that each channel is assigned to a single supervisor domain at boot and
> remains owned by that domain for its lifetime.
>
> Introduce fixed owner-domain tracking in struct sbi_mpxy_channel and
> make channel lookup and enumeration domain-aware. A channel is now
> visible only when accessed from its owning domain. Also require the
> owner to be set before channel registration.
>
> This allows MPXY to support systems where the same hart may be reused by
> multiple domains while keeping channel ownership and visibility fixed to
> the domain that owns the service.
>
> Signed-off-by: Oza Pawandeep <pawandeep.oza at oss.qualcomm.com>
> ---
>  include/sbi/sbi_mpxy.h              |  5 +--
>  lib/sbi/sbi_mpxy.c                  | 53 ++++++++++++++++++++++++-----
>  lib/utils/mpxy/fdt_mpxy_rpmi_mbox.c |  2 ++
>  3 files changed, 49 insertions(+), 11 deletions(-)
>
> diff --git a/lib/utils/mpxy/fdt_mpxy_rpmi_mbox.c b/lib/utils/mpxy/fdt_mpxy_rpmi_mbox.c
> index 84b7a67d..d2d420de 100644
> --- a/lib/utils/mpxy/fdt_mpxy_rpmi_mbox.c
> +++ b/lib/utils/mpxy/fdt_mpxy_rpmi_mbox.c
> @@ -299,6 +299,8 @@ int mpxy_rpmi_mbox_init(const void *fdt, int nodeoff, const struct fdt_match *ma
>         /* Setup MPXY mbox client */
>         /* Channel ID*/
>         rmb->channel.channel_id = channel_id;
> +       /* Set the onwer domain */

%s/onwer/owner

> +       rmb->channel.owner_domain = &root;
>         /* Callback for read RPMI attributes */
>         rmb->channel.read_attributes = mpxy_mbox_read_attributes;
>         /* Callback for write RPMI attributes */
> --

Reviewed-by: Rahul Pathak <rahul.pathak at oss.qualcomm.com>

Thanks
Rahul



More information about the opensbi mailing list