summaryrefslogtreecommitdiff
path: root/include/sbi/sbi_mpxy.h
diff options
context:
space:
mode:
authorOza Pawandeep <[email protected]>2026-07-21 14:57:58 -0700
committerAnup Patel <[email protected]>2026-07-22 13:58:30 +0530
commitc0f87f10d1bfb9e72a84ddfafb5604ee1bfe9d04 (patch)
tree7f58f2b8165d8a8c77c374dfca189117bd6d9614 /include/sbi/sbi_mpxy.h
parent7a90f41fb966e48a160637e841b91864e7a2c81c (diff)
lib: utils/mpxy: bind channel access to owning domainHEADmaster
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 <[email protected]> Reviewed-by: Rahul Pathak <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Anup Patel <[email protected]>
Diffstat (limited to 'include/sbi/sbi_mpxy.h')
-rw-r--r--include/sbi/sbi_mpxy.h4
1 files changed, 3 insertions, 1 deletions
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 <sbi/sbi_list.h>
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