From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [PATCH v8 09/13] xen/arm: second irq injection while the first irq is still inflight Date: Fri, 23 May 2014 16:14:35 +0100 Message-ID: <537F65DB.5020403@linaro.org> References: <1400761950-25035-9-git-send-email-stefano.stabellini@eu.citrix.com> <537E1C67.2020302@linaro.org> <537E3C71.4070203@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Stefano Stabellini Cc: julien.grall@citrix.com, xen-devel@lists.xensource.com, Ian.Campbell@citrix.com List-Id: xen-devel@lists.xenproject.org On 05/23/2014 03:50 PM, Stefano Stabellini wrote: > The following change works: > > diff --git a/xen/arch/arm/domain.c b/xen/arch/arm/domain.c > index 33141e3..2a8456f 100644 > --- a/xen/arch/arm/domain.c > +++ b/xen/arch/arm/domain.c > @@ -644,6 +644,8 @@ int arch_set_info_guest( > else > set_bit(_VPF_down, &v->pause_flags); > > + vgic_vcpu_inject_irq(v, v->domain->arch.evtchn_irq); > + This is racy, we may not clear the _VPF_down bit in this function (depending if VGCF_online is set or not). Hopefully for ARM, libxc is setting this flags by default but it's not always true. > return 0; > } > > diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c > index af5cd6c..d597f63 100644 > --- a/xen/arch/arm/domain_build.c > +++ b/xen/arch/arm/domain_build.c > @@ -1087,6 +1087,8 @@ int construct_dom0(struct domain *d) > } > #endif > > + vgic_vcpu_inject_irq(v, v->domain->arch.evtchn_irq); > + I think it needs a comment in code. Regards, -- Julien Grall