diff mbox series

[1/8] xen/evtchn: make evtchn_bind_interdomain global

Message ID b8324e47bcbd7feeb992501b22b46f0ede3c2c3d.1655903088.git.rahul.singh@arm.com (mailing list archive)
State Superseded
Headers show
Series xen/evtchn: implement static event channel signaling | expand

Commit Message

Rahul Singh June 22, 2022, 2:37 p.m. UTC
Event channel support will be added for dom0less domains to allocate
static event channel. It is necessary to have access to the
evtchn_bind_interdomain function to do that, so make
evtchn_bind_interdomain global and also make it __must_check.

Signed-off-by: Rahul Singh <rahul.singh@arm.com>
---
 xen/common/event_channel.c | 2 +-
 xen/include/xen/event.h    | 3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)

Comments

Jan Beulich July 5, 2022, 2:56 p.m. UTC | #1
On 22.06.2022 16:37, Rahul Singh wrote:
> Event channel support will be added for dom0less domains to allocate
> static event channel. It is necessary to have access to the
> evtchn_bind_interdomain function to do that, so make
> evtchn_bind_interdomain global and also make it __must_check.
> 
> Signed-off-by: Rahul Singh <rahul.singh@arm.com>

In light of MISRA I don't think this should be a separate change.

Jan
Rahul Singh July 6, 2022, 11:53 a.m. UTC | #2
Hi Jan,


> On 5 Jul 2022, at 3:56 pm, Jan Beulich <jbeulich@suse.com> wrote:
> 
> On 22.06.2022 16:37, Rahul Singh wrote:
>> Event channel support will be added for dom0less domains to allocate
>> static event channel. It is necessary to have access to the
>> evtchn_bind_interdomain function to do that, so make
>> evtchn_bind_interdomain global and also make it __must_check.
>> 
>> Signed-off-by: Rahul Singh <rahul.singh@arm.com>
> 
> In light of MISRA I don't think this should be a separate change.

I will merge patch #1 #3 and #4 in next version.

Regards,
Rahul
diff mbox series

Patch

diff --git a/xen/common/event_channel.c b/xen/common/event_channel.c
index e60cd98d75..8cbe9681da 100644
--- a/xen/common/event_channel.c
+++ b/xen/common/event_channel.c
@@ -347,7 +347,7 @@  static void double_evtchn_unlock(struct evtchn *lchn, struct evtchn *rchn)
     evtchn_write_unlock(rchn);
 }
 
-static int evtchn_bind_interdomain(evtchn_bind_interdomain_t *bind)
+int evtchn_bind_interdomain(evtchn_bind_interdomain_t *bind)
 {
     struct evtchn *lchn, *rchn;
     struct domain *ld = current->domain, *rd;
diff --git a/xen/include/xen/event.h b/xen/include/xen/event.h
index f3021fe304..61615ebbe3 100644
--- a/xen/include/xen/event.h
+++ b/xen/include/xen/event.h
@@ -74,6 +74,9 @@  int evtchn_allocate_port(struct domain *d, unsigned int port);
 /* Allocate a new event channel */
 int __must_check evtchn_alloc_unbound(evtchn_alloc_unbound_t *alloc);
 
+/* Bind an event channel port to interdomain */
+int __must_check evtchn_bind_interdomain(evtchn_bind_interdomain_t *bind);
+
 /* Unmask a local event-channel port. */
 int evtchn_unmask(unsigned int port);