From: "Jan Beulich" Subject: Re: [PATCH 4/4] xen/events: mask events when changing their VCPU binding Date: Thu, 15 Aug 2013 13:48:36 +0100 Message-ID: <520CEA4402000078000EC2FD@nat28.tlf.novell.com> References: <1376569267-11653-1-git-send-email-david.vrabel@citrix.com> <1376569267-11653-5-git-send-email-david.vrabel@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1376569267-11653-5-git-send-email-david.vrabel@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: David Vrabel Cc: Boris Ostrovsky , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org >>> On 15.08.13 at 14:21, David Vrabel wrote: > From: David Vrabel > > When a event is being bound to a VCPU there is a window between the > EVTCHNOP_bind_vpcu call and the adjustment of the local per-cpu masks > where an event may be lost. The hypervisor upcalls the new VCPU but > the kernel thinks that event is still bound to the old VCPU and > ignores it. > > There is even a problem when the event is being bound to the same VCPU > as there is a small window beween the clear_bit() and set_bit() calls > in bind_evtchn_to_cpu(). When scanning for pending events, the kernel > may read the bit when it is momentarily clear and ignore the event. > > Avoid this by masking the event during the whole bind operation. > > Signed-off-by: David Vrabel Interesting that this got lost at some point of the porting from the XenoLinux tree. Reviewed-by: Jan Beulich Jan