Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752239AbdGaN6f (ORCPT ); Mon, 31 Jul 2017 09:58:35 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:45444 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751705AbdGaN6e (ORCPT ); Mon, 31 Jul 2017 09:58:34 -0400 Subject: Re: [PATCH] xen/events: Fix interrupt lost during irq_disable and irq_enable To: Liu Shuo , linux-kernel@vger.kernel.org References: <1501347598-15084-1-git-send-email-shuo.a.liu@intel.com> Cc: Juergen Gross , Thomas Gleixner , David Vrabel , Ingo Molnar , Anoob Soman , Vitaly Kuznetsov , Len Brown , KarimAllah Ahmed , "moderated list:XEN HYPERVISOR INTERFACE" From: Boris Ostrovsky Message-ID: <7409e669-89b3-42cc-3bb9-93d99a8aef2b@oracle.com> Date: Mon, 31 Jul 2017 09:58:07 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <1501347598-15084-1-git-send-email-shuo.a.liu@intel.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Source-IP: aserv0022.oracle.com [141.146.126.234] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 776 Lines: 18 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 Reviewed-by: Boris Ostrovsky