|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v8 1/9] xen/events: don't allow binding a global virq from any domain
Hi Juergen, On 11/03/2025 09:51, Jürgen Groß wrote: On 11.03.25 10:35, Julien Grall wrote:Hi Juergen, On 04/02/2025 11:33, Juergen Gross wrote:Today Xen will happily allow binding a global virq by a domain which isn't configured to receive it. This won't result in any bad actions, but the bind will appear to have succeeded with no event ever being received by that event channel. Instead of allowing the bind, error out if the domain isn't set to handle that virq. Note that this check is inside the write_lock() on purpose, as a future patch will put a related check into set_global_virq_handler() with the addition of using the same lock.> > Signed-off-by: Juergen Gross <jgross@xxxxxxxx>I see this patch was already committed. But I have a question about the logic.--- V6: - new patch V7: - move handling domain check inside locked region (Jan Beulich) - style fix (Jan Beulich) --- xen/common/event_channel.c | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/xen/common/event_channel.c b/xen/common/event_channel.c index 46281b16ce..cd6f5a1211 100644 --- a/xen/common/event_channel.c +++ b/xen/common/event_channel.c@@ -120,6 +120,13 @@ static uint8_t get_xen_consumer(xen_event_channel_notification_t fn) /* Get the notification function for a given Xen-bound event channel. */ I agree this would work for evtchn_bind_virq() because we only ever compare. But I still wonder whether get_global_virq_handler() should gain an ACCESS_ONCE()? Could the compiler decide to read global_virq_handlers[...] twice and therefore return NULL? Cheers, -- Julien Grall
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |