All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Vrabel <david.vrabel@citrix.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: xen-devel <xen-devel@lists.xenproject.org>, Keir Fraser <keir@xen.org>
Subject: Re: [PATCH] evtchn: don't lose pending state if FIFO event array page is missing
Date: Fri, 18 Oct 2013 15:47:20 +0100	[thread overview]
Message-ID: <526149F8.706@citrix.com> (raw)
In-Reply-To: <526164D202000078000FC1E9@nat28.tlf.novell.com>

On 18/10/13 15:41, Jan Beulich wrote:
>>>> On 18.10.13 at 16:06, David Vrabel <david.vrabel@citrix.com> wrote:
>> From: David Vrabel <david.vrabel@citrix.com>
>>
>> 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).
> 
> But a domain wouldn't start in FIFO mode, would it?

Yes, guests always start in 2-level mode, but if the guest doesn't
unmask the events they should still be pending after switching to FIFO
mode so must copy the pending bits from the 2-level array and set them
pending in the into the FIFO event array (when the pages turn up).

David

>> 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.

  reply	other threads:[~2013-10-18 14:47 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-18 14:06 [PATCH] evtchn: don't lose pending state if FIFO event array page is missing David Vrabel
2013-10-18 14:41 ` Jan Beulich
2013-10-18 14:47   ` David Vrabel [this message]
2013-10-18 15:06 ` Jan Beulich
2013-10-18 16:19   ` David Vrabel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=526149F8.706@citrix.com \
    --to=david.vrabel@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=keir@xen.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.