From: Juergen Gross <jgross@suse.com>
To: stable@vger.kernel.org
Subject: [PATCH v2 11/14] xen/events: switch user event channels to lateeoi model
Date: Tue, 3 Nov 2020 15:29:08 +0100 [thread overview]
Message-ID: <20201103142911.21980-12-jgross@suse.com> (raw)
In-Reply-To: <20201103142911.21980-1-jgross@suse.com>
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.
This is upstream commit c44b849cee8c3ac587da3b0980e01f77500d158c
Cc: stable@vger.kernel.org
Reported-by: Julien Grall <julien@xen.org>
Signed-off-by: Juergen Gross <jgross@suse.com>
Tested-by: Stefano Stabellini <sstabellini@kernel.org>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Wei Liu <wl@xen.org>
---
drivers/xen/evtchn.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/xen/evtchn.c b/drivers/xen/evtchn.c
index 055123f48039..0770f427beb2 100644
--- a/drivers/xen/evtchn.c
+++ b/drivers/xen/evtchn.c
@@ -166,7 +166,6 @@ static irqreturn_t evtchn_interrupt(int irq, void *data)
"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);
@@ -292,7 +291,7 @@ static ssize_t evtchn_write(struct file *file, const char __user *buf,
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);
}
}
@@ -392,8 +391,8 @@ static int evtchn_bind_to_user(struct per_user_data *u, int port)
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;
--
2.26.2
next prev parent reply other threads:[~2020-11-03 14:30 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-03 14:28 [PATCH v2 00/14] Backport of patch series for stable 4.14 branch Juergen Gross
2020-11-03 14:28 ` [PATCH v2 01/14] xen/events: don't use chip_data for legacy IRQs Juergen Gross
2020-11-03 14:28 ` [PATCH v2 02/14] xen/events: avoid removing an event channel while handling it Juergen Gross
2020-11-03 14:29 ` [PATCH v2 03/14] xen/events: add a proper barrier to 2-level uevent unmasking Juergen Gross
2020-11-03 14:29 ` [PATCH v2 04/14] xen/events: fix race in evtchn_fifo_unmask() Juergen Gross
2020-11-03 14:29 ` [PATCH v2 05/14] xen/events: add a new "late EOI" evtchn framework Juergen Gross
2020-11-03 14:29 ` [PATCH v2 06/14] xen/blkback: use lateeoi irq binding Juergen Gross
2020-11-03 14:29 ` [PATCH v2 07/14] xen/netback: " Juergen Gross
2020-11-03 14:29 ` [PATCH v2 08/14] xen/scsiback: " Juergen Gross
2020-11-03 14:29 ` [PATCH v2 09/14] xen/pvcallsback: " Juergen Gross
2020-11-03 14:29 ` [PATCH v2 10/14] xen/pciback: " Juergen Gross
2020-11-03 14:29 ` Juergen Gross [this message]
2020-11-03 14:29 ` [PATCH v2 12/14] xen/events: use a common cpu hotplug hook for event channels Juergen Gross
2020-11-03 14:29 ` [PATCH v2 13/14] xen/events: defer eoi in case of excessive number of events Juergen Gross
2020-11-03 14:29 ` [PATCH v2 14/14] xen/events: block rogue events for some time Juergen Gross
2020-11-17 11:42 ` [PATCH v2 00/14] Backport of patch series for stable 4.14 branch Greg KH
-- strict thread matches above, loose matches on Subject: below --
2020-11-03 14:19 [PATCH v2 00/14] Backport of patch series for stable 4.19 branch Juergen Gross
2020-11-03 14:19 ` [PATCH v2 11/14] xen/events: switch user event channels to lateeoi model Juergen Gross
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201103142911.21980-12-jgross@suse.com \
--to=jgross@suse.com \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox