Skip to content

Commit 27e0445

Browse files
firscitykartben
authored andcommitted
drivers: xen: return hypercall results from notify_evtchn
Xen event channel notification may fail during hypervisor handling, so it will be good for user to have a possibility to check results. Previous implementation ignored hypervisor return code, now it will be passed to caller. Signed-off-by: Dmytro Firsov <dmytro_firsov@epam.com>
1 parent c73c306 commit 27e0445

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

drivers/xen/events.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2021 EPAM Systems
2+
* Copyright (c) 2021-2025 EPAM Systems
33
* Copyright (c) 2022 Arm Limited (or its affiliates). All rights reserved.
44
*
55
* SPDX-License-Identifier: Apache-2.0
@@ -111,7 +111,7 @@ int evtchn_set_priority(evtchn_port_t port, uint32_t priority)
111111
return HYPERVISOR_event_channel_op(EVTCHNOP_set_priority, &set);
112112
}
113113

114-
void notify_evtchn(evtchn_port_t port)
114+
int notify_evtchn(evtchn_port_t port)
115115
{
116116
struct evtchn_send send;
117117

@@ -121,7 +121,7 @@ void notify_evtchn(evtchn_port_t port)
121121

122122
send.port = port;
123123

124-
HYPERVISOR_event_channel_op(EVTCHNOP_send, &send);
124+
return HYPERVISOR_event_channel_op(EVTCHNOP_send, &send);
125125
}
126126

127127
int bind_event_channel(evtchn_port_t port, evtchn_cb_t cb, void *data)

include/zephyr/xen/events.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2021 EPAM Systems
2+
* Copyright (c) 2021-2025 EPAM Systems
33
* Copyright (c) 2022 Arm Limited (or its affiliates). All rights reserved.
44
*
55
* SPDX-License-Identifier: Apache-2.0
@@ -26,7 +26,7 @@ typedef struct event_channel_handle evtchn_handle_t;
2626
int evtchn_status(evtchn_status_t *status);
2727
int evtchn_close(evtchn_port_t port);
2828
int evtchn_set_priority(evtchn_port_t port, uint32_t priority);
29-
void notify_evtchn(evtchn_port_t port);
29+
int notify_evtchn(evtchn_port_t port);
3030

3131
/*
3232
* Allocate event-channel between caller and remote domain

0 commit comments

Comments
 (0)