From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Vrabel Subject: Re: Multiple issues with event channel on Xen on ARM Date: Wed, 5 Feb 2014 10:45:16 +0000 Message-ID: <52F2163C.1000202@citrix.com> References: <52F1753C.3010508@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <52F1753C.3010508@linaro.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Julien Grall Cc: Ian Campbell , Stefano Stabellini , david.vrabel@citrix.com, xen-devel List-Id: xen-devel@lists.xenproject.org On 04/02/14 23:18, Julien Grall wrote: > Hello David, > > I'm currently trying to use Linux 3.14-rc1 as Linux guest on Xen on ARM (Xen 4.4-rc3). > > I have multiple issues with your event channel patch series on Linux and Xen side. > I tried to use Linux 3.14-rc1 as dom0 but it was worst (unable to create guests). I think there must be two issues here as both 2-level and FIFO events are broken. > I'm using a simple guest config: > kernel="/root/zImage" > memory=32 > name="test" > vcpus=1 > autoballon="off" > extra="console=hvc0" > > If everything is ok, I should see that Linux is unable to find the root filesystem. > But here, Linux is stucked. > >>>From Linux side, after bisecting, I found that the offending commit is: > xen/events: remove unnecessary init_evtchn_cpu_bindings() > > Because the guest-side binding of an event to a VCPU (i.e., setting > the local per-cpu masks) is always explicitly done after an event > channel is bound to a port, there is no need to initialize all > possible events as bound to VCPU 0 at start of day or after a resume. > > Signed-off-by: David Vrabel > Reviewed-by: Konrad Rzeszutek Wilk > Reviewed-by: Boris Ostrovsky > > With this patch, the function __xen_evtchn_do_upcall won't be able > to find an events (pendings_bits == 0 every time). > It seems the second part of init_evtchn_cpu_bindings is necessary on ARM. I think this is because binding an interdomain or allocating an unbound event channel does call bind_evtchn_to_cpu(evtchn, 0) which is required to set the local VCPU masks. I think this happened to work on x86 because during the generic irq setup, the irq affinity is always set which then binds the event channel to the right VCPU. I guess ARM's irq setup misses this step. This shouldn't affect the FIFO-based events though since evtchn_fifo_bind_to_cpu() is a no-op. David