From: "Jan Beulich" Subject: Re: [PATCH v10 07/10] xen: remove workaround to inject evtchn_irq on irq enable Date: Tue, 05 Aug 2014 13:00:56 +0100 Message-ID: <53E0E39802000078000296F8@mail.emea.novell.com> References: <1407237989-27654-7-git-send-email-stefano.stabellini@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1XEdQK-00076x-Hj for xen-devel@lists.xenproject.org; Tue, 05 Aug 2014 12:01:00 +0000 In-Reply-To: <1407237989-27654-7-git-send-email-stefano.stabellini@eu.citrix.com> Content-Disposition: inline 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 , Ian.Campbell@citrix.com List-Id: xen-devel@lists.xenproject.org >>> On 05.08.14 at 13:26, wrote: > evtchn_upcall_pending is already set by common code at vcpu creation, > therefore on ARM we also need to call vgic_vcpu_inject_irq for it. > Currently we do that from vgic_enable_irqs as a workaround. > > Do this properly by introducing an appropriate arch specific hook: > arch_evtchn_inject. arch_evtchn_inject is called by map_vcpu_info to > inject the evtchn irq into the guest. On ARM is implemented by calling > vgic_vcpu_inject_irq. > > On x86 guests typically don't call VCPUOP_register_vcpu_info on vcpu0, > therefore avoiding the issue. However theoretically they could call > VCPUOP_register_vcpu_info on vcpu0 and in that case Xen would need to > inject the event channel notification into the guest if the guest is > HVM. So implement arch_evtchn_inject on x86 by calling > hvm_assert_evtchn_irq. > > Signed-off-by: Stefano Stabellini For the non-ARM parts Acked-by: Jan Beulich provided you make ... > --- a/xen/include/xen/event.h > +++ b/xen/include/xen/event.h > @@ -69,6 +69,9 @@ int guest_enabled_event(struct vcpu *v, uint32_t virq); > /* Notify remote end of a Xen-attached event channel.*/ > void notify_via_xen_event_channel(struct domain *ld, int lport); > > +/* inject an event channel notification into the guest */ > +void arch_evtchn_inject(struct vcpu *v); ... this comment match coding style. Jan