From: Liu Shuo <shuo.a.liu@intel.com>
To: linux-kernel@vger.kernel.org
Cc: Liu Shuo <shuo.a.liu@intel.com>,
Boris Ostrovsky <boris.ostrovsky@oracle.com>,
Juergen Gross <jgross@suse.com>,
Thomas Gleixner <tglx@linutronix.de>,
David Vrabel <david.vrabel@citrix.com>,
Ingo Molnar <mingo@kernel.org>,
Anoob Soman <anoob.soman@citrix.com>,
Vitaly Kuznetsov <vkuznets@redhat.com>,
Len Brown <len.brown@intel.com>,
KarimAllah Ahmed <karahmed@amazon.de>,
xen-devel@lists.xenproject.org (moderated list:XEN HYPERVISOR
INTERFACE)
Subject: [PATCH] xen/events: Fix interrupt lost during irq_disable and irq_enable
Date: Sun, 30 Jul 2017 00:59:57 +0800 [thread overview]
Message-ID: <1501347598-15084-1-git-send-email-shuo.a.liu@intel.com> (raw)
Here is a device has xen-pirq-MSI interrupt. Dom0 might lost interrupt
during driver irq_disable/irq_enable. Here is the scenario,
1. irq_disable -> disable_dynirq -> mask_evtchn(irq channel)
2. dev interrupt raised by HW and Xen mark its evtchn as pending
3. irq_enable -> startup_pirq -> eoi_pirq ->
clear_evtchn(channel of irq) -> clear pending status
4. consume_one_event process the irq event without pending bit assert
which result in interrupt lost once
5. No HW interrupt raising anymore.
Now use enable_dynirq for enable_pirq of xen_pirq_chip to remove
eoi_pirq when irq_enable.
Signed-off-by: Liu Shuo <shuo.a.liu@intel.com>
---
drivers/xen/events/events_base.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/xen/events/events_base.c b/drivers/xen/events/events_base.c
index bae1f5d3..2d43118 100644
--- a/drivers/xen/events/events_base.c
+++ b/drivers/xen/events/events_base.c
@@ -574,7 +574,7 @@ static void shutdown_pirq(struct irq_data *data)
static void enable_pirq(struct irq_data *data)
{
- startup_pirq(data);
+ enable_dynirq(data);
}
static void disable_pirq(struct irq_data *data)
--
1.9.4
next reply other threads:[~2017-07-29 17:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-29 16:59 Liu Shuo [this message]
2017-07-31 13:58 ` Boris Ostrovsky
2017-08-11 14:50 ` 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=1501347598-15084-1-git-send-email-shuo.a.liu@intel.com \
--to=shuo.a.liu@intel.com \
--cc=anoob.soman@citrix.com \
--cc=boris.ostrovsky@oracle.com \
--cc=david.vrabel@citrix.com \
--cc=jgross@suse.com \
--cc=karahmed@amazon.de \
--cc=len.brown@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=tglx@linutronix.de \
--cc=vkuznets@redhat.com \
--cc=xen-devel@lists.xenproject.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
all inboxes | Powered by JetHome®