From mboxrd@z Thu Jan 1 00:00:00 1970 From: Keir Fraser Subject: Re: [PATCH 2/3] evtchn: don't lose pending state if FIFO event array page is missing Date: Tue, 05 Nov 2013 21:07:52 +0000 Message-ID: References: <5277BD7202000078000FF1DD@nat28.tlf.novell.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 1Vdnr6-0006gG-Sn for xen-devel@lists.xenproject.org; Tue, 05 Nov 2013 21:08:09 +0000 Received: by mail-wg0-f46.google.com with SMTP id m15so4062850wgh.25 for ; Tue, 05 Nov 2013 13:08:07 -0800 (PST) In-Reply-To: <5277BD7202000078000FF1DD@nat28.tlf.novell.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: Jan Beulich , David Vrabel Cc: xen-devel List-Id: xen-devel@lists.xenproject.org On 04/11/2013 14:29, "Jan Beulich" wrote: >>>> On 31.10.13 at 16:03, David Vrabel wrote: >> From: David Vrabel >> >> When the FIFO-based ABI is in use, if an event is bound when the >> corresponding event array page is missing any attempt to set the event >> pending will lose the event (because there is nowhere to write the >> pending state). >> >> This wasn't initially considered an issue because guests were expected >> to only bind events once they had expanded the event array, however: >> >> 1. A domain may start with events already bound (by the toolstack). >> >> 2. The guest does not know what the port number will be until the >> event is bound (it doesn't know how many already bound events there >> are), so it does not know how many event array pages are required. >> This makes it difficult to expand in advanced (the current Linux >> implementation expands after binding for example). >> >> To prevent pending events from being lost because there is no array >> page, temporarily store the pending state in evtchn->pending. When an >> array page is added, use this state to set the port as pending. >> >> Signed-off-by: David Vrabel > > Reviewed-by: Jan Beulich Acked-by: Keir Fraser