From c0f87f10d1bfb9e72a84ddfafb5604ee1bfe9d04 Mon Sep 17 00:00:00 2001 From: Oza Pawandeep Date: Tue, 21 Jul 2026 14:57:58 -0700 Subject: lib: utils/mpxy: bind channel access to owning domain 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 Reviewed-by: Rahul Pathak Link: https://lore.kernel.org/r/20260721215758.695736-1-pawandeep.oza@oss.qualcomm.com Signed-off-by: Anup Patel --- lib/utils/mpxy/fdt_mpxy_rpmi_mbox.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/utils') diff --git a/lib/utils/mpxy/fdt_mpxy_rpmi_mbox.c b/lib/utils/mpxy/fdt_mpxy_rpmi_mbox.c index 84b7a67d..825ac9b3 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 owner domain */ + rmb->channel.owner_domain = &root; /* Callback for read RPMI attributes */ rmb->channel.read_attributes = mpxy_mbox_read_attributes; /* Callback for write RPMI attributes */ -- cgit v1.3.1