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 --- include/sbi/sbi_mpxy.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/sbi/sbi_mpxy.h b/include/sbi/sbi_mpxy.h index 9da2791e..3eec5266 100644 --- a/include/sbi/sbi_mpxy.h +++ b/include/sbi/sbi_mpxy.h @@ -13,6 +13,7 @@ #include struct sbi_scratch; +struct sbi_domain; #define SBI_MPXY_MSGPROTO_VERSION(Major, Minor) ((Major << 16) | Minor) @@ -97,6 +98,8 @@ struct sbi_mpxy_channel { /** List head to a set of channels */ struct sbi_dlist head; u32 channel_id; + + struct sbi_domain *owner_domain; struct sbi_mpxy_channel_attrs attrs; /** @@ -181,5 +184,4 @@ int sbi_mpxy_send_message(u32 channel_id, u8 msg_id, /** Get Message proxy notification events */ int sbi_mpxy_get_notification_events(u32 channel_id, unsigned long *events_len); - #endif -- cgit v1.3.1