From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [PATCH] xen/arm: IRQ: Protect IRQ to be shared between domains and XEN Date: Wed, 15 Jan 2014 14:16:46 +0000 Message-ID: <52D6984E.9070909@linaro.org> References: <1389387012-26247-1-git-send-email-julien.grall@linaro.org> <1389793244.3793.25.camel@kazak.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1W3RH1-00063D-H0 for xen-devel@lists.xenproject.org; Wed, 15 Jan 2014 14:16:51 +0000 Received: by mail-we0-f171.google.com with SMTP id w61so1834998wes.16 for ; Wed, 15 Jan 2014 06:16:49 -0800 (PST) In-Reply-To: <1389793244.3793.25.camel@kazak.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: xen-devel@lists.xenproject.org, tim@xen.org, stefano.stabellini@citrix.com, patches@linaro.org List-Id: xen-devel@lists.xenproject.org On 01/15/2014 01:40 PM, Ian Campbell wrote: > On Fri, 2014-01-10 at 20:50 +0000, Julien Grall wrote: >> The current dt_route_irq_to_guest implementation set IRQ_GUEST no matter if the >> IRQ is correctly setup. >> >> As IRQ can be shared between devices, if the devices are not assigned to the >> same domain or Xen, this could result to IRQ route to the domain instead of >> Xen ... >> >> Also avoid to rely on wrong behaviour when Xen is routing an IRQ to DOM0. >> >> Signed-off-by: Julien Grall > > Does this patch relate to or rely on " setup_dt_irq: don't enable the > IRQ if the creation has failed" at all? There is no relation between the 2 patches. Each one fix a different bug. >> >> --- >> Hopefully, none of the supported platforms have UARTs (the only device >> currently used by Xen). It would be nice to have this patch for Xen 4.4 to >> avoid waste of time for developer. > > Hrm, at some point I think we have to say no and I think post-rc "nice > to avoid waste of time for developer" might be it. After all in a little > over a month developers will be using 4.5-pre with this patch applied. I'm fine to wait after Xen 4.4 release. > What actually happens without this patch? The Xen console UART stops > working because the IRQ is delivered to the guest and not to Xen? Right. > How did you discover this? Does this happen in practice on any of the > platforms which Xen supports? I think in general shared interrupts are > reasonably rare on ARM, especially for on-SoC peripherals which the UART > very often will be. By reading the code, IRQ_GUEST is set unconditionally in dt_route_irq_to_guest. All the current supported platform are safe. --- Julien Grall