From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [PATCH 1/2] xen/arm: remove workaround to inject evtchn_irq on irq enable Date: Wed, 02 Jul 2014 16:45:03 +0100 Message-ID: <53B428FF.6030503@linaro.org> References: <1403633514-8853-1-git-send-email-stefano.stabellini@eu.citrix.com> <53AAE4B3.4080802@linaro.org> <1404315494.8137.16.camel@kazak.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1404315494.8137.16.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: julien.grall@citrix.com, xen-devel@lists.xensource.com, Stefano Stabellini List-Id: xen-devel@lists.xenproject.org On 07/02/2014 04:38 PM, Ian Campbell wrote: > On Wed, 2014-06-25 at 16:03 +0100, Julien Grall wrote: >> Hi Stefano, >> >> On 06/24/2014 07:11 PM, Stefano Stabellini 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 calling vgic_vcpu_inject_irq in the appropriate >>> places at vcpu creation time, making sure to call it after the vcpu is >>> up (_VPF_down has been cleared). >> >> While it's works perfectly on common case, as the toolstack is always >> setting VGCF_online. >> >> It would be possible to call the hypercall DOMCTL_vcpusetcontext without >> this flags enable. If so, the new VCPU will never receive event channel >> interrupt. > > I think the only other way to clear _VPF_down is the psci code, so I > suppose it needs a kick too. The function PSCI on will call arch_set_info_guest directly with VGCF_online. > The other option is VCPUOP_up whch we do not support (or wire up) on > ARM. Hmmm... right I was looking directly to do_vcpu_op, but we have an extra layer on ARM (do_arm_vcpu_op). In this case, I would return an error if VGCF_online is not set. I will allow us to catch easily an error later if we decide to implement VCPUOP_up. Regards, -- Julien Grall