This is a note to let you know that I've just added the patch titled xen/events: switch user event channels to lateeoi model to the 4.4-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: xen-events-switch-user-event-channels-to-lateeoi-model.patch and it can be found in the queue-4.4 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From foo@baz Tue Nov 17 12:26:02 PM CET 2020 From: Juergen Gross <jgross@xxxxxxxx> Date: Tue, 3 Nov 2020 17:22:35 +0100 Subject: xen/events: switch user event channels to lateeoi model To: stable@xxxxxxxxxxxxxxx Message-ID: <20201103162238.30264-11-jgross@xxxxxxxx> From: Juergen Gross <jgross@xxxxxxxx> commit c44b849cee8c3ac587da3b0980e01f77500d158c upstream. Instead of disabling the irq when an event is received and enabling it again when handled by the user process use the lateeoi model. This is part of XSA-332. Cc: stable@xxxxxxxxxxxxxxx Reported-by: Julien Grall <julien@xxxxxxx> Signed-off-by: Juergen Gross <jgross@xxxxxxxx> Tested-by: Stefano Stabellini <sstabellini@xxxxxxxxxx> Reviewed-by: Stefano Stabellini <sstabellini@xxxxxxxxxx> Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx> Reviewed-by: Wei Liu <wl@xxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/xen/evtchn.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) --- a/drivers/xen/evtchn.c +++ b/drivers/xen/evtchn.c @@ -173,7 +173,6 @@ static irqreturn_t evtchn_interrupt(int "Interrupt for port %d, but apparently not enabled; per-user %p\n", evtchn->port, u); - disable_irq_nosync(irq); evtchn->enabled = false; spin_lock(&u->ring_prod_lock); @@ -299,7 +298,7 @@ static ssize_t evtchn_write(struct file evtchn = find_evtchn(u, port); if (evtchn && !evtchn->enabled) { evtchn->enabled = true; - enable_irq(irq_from_evtchn(port)); + xen_irq_lateeoi(irq_from_evtchn(port), 0); } } @@ -399,8 +398,8 @@ static int evtchn_bind_to_user(struct pe if (rc < 0) goto err; - rc = bind_evtchn_to_irqhandler(port, evtchn_interrupt, 0, - u->name, evtchn); + rc = bind_evtchn_to_irqhandler_lateeoi(port, evtchn_interrupt, 0, + u->name, evtchn); if (rc < 0) goto err; Patches currently in stable-queue which might be from jgross@xxxxxxxx are queue-4.4/xen-blkback-use-lateeoi-irq-binding.patch queue-4.4/xen-events-block-rogue-events-for-some-time.patch queue-4.4/xen-events-fix-race-in-evtchn_fifo_unmask.patch queue-4.4/xen-events-switch-user-event-channels-to-lateeoi-model.patch queue-4.4/xen-events-defer-eoi-in-case-of-excessive-number-of-events.patch queue-4.4/xen-events-add-a-new-late-eoi-evtchn-framework.patch queue-4.4/xen-events-use-a-common-cpu-hotplug-hook-for-event-channels.patch queue-4.4/xen-events-avoid-removing-an-event-channel-while-handling-it.patch queue-4.4/xen-netback-use-lateeoi-irq-binding.patch queue-4.4/xen-pciback-use-lateeoi-irq-binding.patch queue-4.4/xen-events-add-a-proper-barrier-to-2-level-uevent-unmasking.patch queue-4.4/xen-scsiback-use-lateeoi-irq-binding.patch