* [PATCH] xen/events: Fix interrupt lost during irq_disable and irq_enable
@ 2017-07-29 16:59 Liu Shuo
2017-07-31 13:58 ` Boris Ostrovsky
2017-08-11 14:50 ` Juergen Gross
0 siblings, 2 replies; 3+ messages in thread
From: Liu Shuo @ 2017-07-29 16:59 UTC (permalink / raw)
To: linux-kernel
Cc: Liu Shuo, Boris Ostrovsky, Juergen Gross, Thomas Gleixner,
David Vrabel, Ingo Molnar, Anoob Soman, Vitaly Kuznetsov,
Len Brown, KarimAllah Ahmed,
moderated list:XEN HYPERVISOR INTERFACE
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
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] xen/events: Fix interrupt lost during irq_disable and irq_enable
2017-07-29 16:59 [PATCH] xen/events: Fix interrupt lost during irq_disable and irq_enable Liu Shuo
@ 2017-07-31 13:58 ` Boris Ostrovsky
2017-08-11 14:50 ` Juergen Gross
1 sibling, 0 replies; 3+ messages in thread
From: Boris Ostrovsky @ 2017-07-31 13:58 UTC (permalink / raw)
To: Liu Shuo, linux-kernel
Cc: Juergen Gross, Thomas Gleixner, David Vrabel, Ingo Molnar,
Anoob Soman, Vitaly Kuznetsov, Len Brown, KarimAllah Ahmed,
moderated list:XEN HYPERVISOR INTERFACE
On 07/29/2017 12:59 PM, Liu Shuo wrote:
> 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>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] xen/events: Fix interrupt lost during irq_disable and irq_enable
2017-07-29 16:59 [PATCH] xen/events: Fix interrupt lost during irq_disable and irq_enable Liu Shuo
2017-07-31 13:58 ` Boris Ostrovsky
@ 2017-08-11 14:50 ` Juergen Gross
1 sibling, 0 replies; 3+ messages in thread
From: Juergen Gross @ 2017-08-11 14:50 UTC (permalink / raw)
To: Liu Shuo, linux-kernel
Cc: Boris Ostrovsky, Thomas Gleixner, David Vrabel, Ingo Molnar,
Anoob Soman, Vitaly Kuznetsov, Len Brown, KarimAllah Ahmed,
moderated list:XEN HYPERVISOR INTERFACE
On 29/07/17 18:59, Liu Shuo wrote:
> 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>
Pushed to xen/tip.git for-linus-4.13b
Thanks,
Juergen
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-08-11 14:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-29 16:59 [PATCH] xen/events: Fix interrupt lost during irq_disable and irq_enable Liu Shuo
2017-07-31 13:58 ` Boris Ostrovsky
2017-08-11 14:50 ` Juergen Gross
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®