]> git.baikalelectronics.ru Git - kernel.git/commit
xen/events: add a new "late EOI" evtchn framework
authorJuergen Gross <jgross@suse.com>
Mon, 7 Sep 2020 13:47:27 +0000 (15:47 +0200)
committerJuergen Gross <jgross@suse.com>
Tue, 20 Oct 2020 08:21:59 +0000 (10:21 +0200)
commitaff4aa290b8b1da2a643baf073cc5c3cff825d88
tree808771ea806e8d7a1191dd6d95606a80336db35b
parentafff7855c8f3a160e97530713942c170faf33359
xen/events: add a new "late EOI" evtchn framework

In order to avoid tight event channel related IRQ loops add a new
framework of "late EOI" handling: the IRQ the event channel is bound
to will be masked until the event has been handled and the related
driver is capable to handle another event. The driver is responsible
for unmasking the event channel via the new function xen_irq_lateeoi().

This is similar to binding an event channel to a threaded IRQ, but
without having to structure the driver accordingly.

In order to support a future special handling in case a rogue guest
is sending lots of unsolicited events, add a flag to xen_irq_lateeoi()
which can be set by the caller to indicate the event was a spurious
one.

This is part of XSA-332.

Cc: stable@vger.kernel.org
Reported-by: Julien Grall <julien@xen.org>
Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
Reviewed-by: Wei Liu <wl@xen.org>
drivers/xen/events/events_base.c
include/xen/events.h