From: "Jan Beulich" Subject: Re: [PATCH] xen: do not unmask disabled IRQ on eoi. Date: Fri, 22 Oct 2010 10:29:43 +0200 Message-ID: <4CC16797020000780001E8F7@nat.nue.novell.com> References: <1287139966-19391-2-git-send-email-ian.campbell@citrix.com> <1287160335.2003.7973.camel@zakaz.uk.xensource.com> <1287160787.2003.7979.camel@zakaz.uk.xensource.com> <4CBC1CF1020000780001DA3F@vpn.id2.novell.com> <4CBC80E6020000780001DC78@vpn.id2.novell.com> <4CBD5883020000780001DEC4@vpn.id2.novell.com> <4CC15C5B020000780001E8B2@vpn.id2.novell.com> <1287734836.29224.648.camel@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <1287734836.29224.648.camel@localhost.localdomain> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Ian Campbell Cc: "jeremy@goop.org" , "xen-devel@lists.xensource.com" , Stefano Stabellini List-Id: xen-devel@lists.xenproject.org >>> On 22.10.10 at 10:07, Ian Campbell wrote: > On Fri, 2010-10-22 at 08:41 +0100, Jan Beulich wrote:=20 >> >>> On 21.10.10 at 15:36, Stefano Stabellini wrote: >> > --- a/drivers/xen/events.c >> > +++ b/drivers/xen/events.c >> > @@ -436,21 +436,50 @@ static bool identity_mapped_irq(unsigned irq) >> > return irq < get_nr_hw_irqs(); >> > } >> > =20 >> > -static void pirq_eoi(unsigned int irq) >> > +static void eoi_pirq(unsigned int irq) >> > { >> > struct irq_info *info =3D info_for_irq(irq); >> > struct physdev_eoi eoi =3D { .irq =3D info->u.pirq.gsi }; >> > - bool need_eoi; >> > + int evtchn =3D evtchn_from_irq(irq); >> > + int rc =3D 0, need_mask =3D 0; >> > + struct shared_info *s =3D HYPERVISOR_shared_info; >> > =20 >> > - need_eoi =3D pirq_needs_eoi(irq); >> > + if (!VALID_EVTCHN(evtchn)) >> > + return; >> > =20 >> > - if (!need_eoi || !pirq_eoi_does_unmask) >> > - unmask_evtchn(info->evtchn); >> > + move_masked_irq(irq); >>=20 >> It's not clear whether calling this function is valid when the IRQ = isn't >> really masked. >>=20 >> In any case I'd suggest adding an IRQ_DISABLED check matching >> move_native_irq()'s. >=20 > Why not just call move_native_irq instead of move_masked_irq as > appropriate? That was what I implied with the first part of my response. But I think the second part applies if a (the conditional) call to move_masked_irq() would stay. Jan