From: Ian Campbell Subject: Re: [PATCH for-4.5 7/8] xen/irq: Handle multiple action per IRQ Date: Fri, 21 Mar 2014 14:06:03 +0000 Message-ID: <1395410763.19839.92.camel@kazak.uk.xensource.com> References: <1390581822-32624-1-git-send-email-julien.grall@linaro.org> <1390581822-32624-8-git-send-email-julien.grall@linaro.org> <1392810905.29739.19.camel@kazak.uk.xensource.com> <530673BD.9010301@linaro.org> <530B5275.7010008@citrix.com> <530B6606020000780011ED39@nat28.tlf.novell.com> <530B5BAC.2010100@linaro.org> <531F28D5.1000901@linaro.org> <531F431D0200007800122EC3@nat28.tlf.novell.com> <53276389.8080109@linaro.org> <1395135184.12847.1.camel@kazak.uk.xensource.com> <53283B8D.4030401@linaro.org> <53285E08.1040508@linaro.org> <1395154945.12847.63.camel@kazak.uk.xensource.com> <53286178.1090003@linaro.org> <1395155449.12847.67.camel@kazak.uk.xensource.com> <53286265.5030402@linaro.org> <1395156414.12847.69.camel@kazak.uk.xensource.com> <5329D169.5040507@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WR05I-0005pV-BX for xen-devel@lists.xenproject.org; Fri, 21 Mar 2014 14:06:08 +0000 In-Reply-To: <5329D169.5040507@linaro.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Julien Grall Cc: Keir Fraser , patches@linaro.org, Stefano Stabellini , tim@xen.org, stefano.stabellini@citrix.com, Jan Beulich , xen-devel@lists.xenproject.org List-Id: xen-devel@lists.xenproject.org On Wed, 2014-03-19 at 17:18 +0000, Julien Grall wrote: > What is the final decision for the interrupt handling? Stefano would > prefer to let the SMMU drivers handle a such case. Ian, do you have any > opinion? It does sound like the end result is that shared interrupts need to be handled somehow. One potential issue is that a driver needs to be somewhat aware that it can be using a shared interrupt (and e.g. not log spurious looking interrupts). Linux solves this by having an explicit IRQF_SHARED which the driver must pass iff it is prepared to cope with this situation and the core should detect mismatches, which isn't a bad solution. I think it's pretty clear from the discussion that routing an IRQ to the guest must be equivalent to a driver which does not pass IRQF_SHARED. There's also the question of error handling if/when a spurious interrupt does occur (i.e. none of the multiple handlers dealt with it). Interrupt handlers should perhaps return a status to say whether or not they did anything with the interrupt, which the core code can then deal with (logging, quenching etc). Ian.