All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel De Graaf <dgdegra@tycho.nsa.gov>
To: Ian Campbell <Ian.Campbell@citrix.com>
Cc: Samuel Thibault <samuel.thibault@ens-lyon.org>,
	Stefano Stabellini <Stefano.Stabellini@eu.citrix.com>,
	Ian Jackson <Ian.Jackson@eu.citrix.com>,
	Marek Marczykowski <marmarek@invisiblethingslab.com>,
	"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Subject: Re: [PATCH 0/7] Optionally add libvchan to stubdom
Date: Fri, 26 Apr 2013 12:41:54 -0400	[thread overview]
Message-ID: <517AAE52.7080009@tycho.nsa.gov> (raw)
In-Reply-To: <1366988629.3142.138.camel@zakaz.uk.xensource.com>

On 04/26/2013 11:03 AM, Ian Campbell wrote:
> The maintainers for most of this code are Samuel (stubdoms) and Daniel
> (libvchan). I've CCd them both.
>
> I assume this isn't being proposed for 4.3 at this stage?
>
> On Fri, 2013-04-26 at 15:45 +0100, Marek Marczykowski wrote:
>> This patch series enhances stubdomain with libvchan. It is disabled by default,
>> but can be easily enabled in mini-os.cfg when needed.
>> In order to do so, some parts of minios needs to be extended:
>>   - xenstore (to support transactions)
>>   - libxc - to support xc_gntshr
>>
>> This series assumes "libxc: fix xc_gntshr_munmap" already applied.
>>
>> One unsolved problem is implementation of xc_gntshr_share_page_notify. On Linux,
>> there is kernel, which can notify remote in case of server process death. In
>> stubdom there is no such place - if exit() is called anywhere, the whole
>> stubdom is terminated. Also the common case is stubdom destruction (the case
>> for ioemu stubdom - it is destroyed by toolstack at domain shutdown), I don't
>> know if stubdom even support clean shutdown.

This also mirrors the case where the Linux kernel running a libvchan process has
a crash: there is no way for notification to happen in that case.

>> Anyway I can implement some notification (which needs some additional info
>> stored by minios version of gnttab), just for clean libxenvchan_close(). But it
>> is rather rare case.

If it's not already done, the close function should do the byte clear on its own so
that a mini-os application doing a proper teardown (perhaps using atexit to handle
calls to exit()) would notify the other end the same way as a process under Linux.

>> Some workaround can be checking for domain state at client side, but IMHO it
>> isn't the best way (although still used in original Qubes OS vchan version).
>> Any ideas?

The only way to properly handle a domain crash on the other side is to watch for
that - probably via xenstore watches. This all depends on what exactly the vchan
is being used for - a domain crashing may trigger other actions that cause the
vchan client to be notified independent of the vchan's own notifications.

>> Patch 2 is independent - should be also useful for normal Linux case.

I think just this patch may have reason to go in 4.3, especially if you have
something that would see the race condition it fixes.  You'll need to discuss
that more with George, however.

>> Marek Marczykowski (7):
>>    minios: enhance xenstore available for stubdoms
>>    libvchan: create xenstore entries in one transaction
>>    libvchan: remove unnecessary includes
>>    minios: add gnttab_find_grant_of_page
>>    libxc: implement gntshr for minios
>>    stubdom: make libvchan available in stubdom
>>    libvchan: do not use xc_gntshr_share_page_notify in Mini-OS
>>

-- 
Daniel De Graaf
National Security Agency

  reply	other threads:[~2013-04-26 16:41 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-26 14:45 [PATCH 0/7] Optionally add libvchan to stubdom Marek Marczykowski
2013-04-21  1:46 ` [PATCH 2/7] libvchan: create xenstore entries in one transaction Marek Marczykowski
2013-04-26 18:04   ` David Vrabel
2013-04-28 22:43     ` Marek Marczykowski
2013-04-22  1:44 ` [PATCH 1/7] minios: enhance xenstore available for stubdoms Marek Marczykowski
2013-04-28 22:34   ` Samuel Thibault
2013-04-22  1:50 ` [PATCH 3/7] libvchan: remove unnecessary includes Marek Marczykowski
2013-04-22  2:10 ` [PATCH 6/7] stubdom: make libvchan available in stubdom Marek Marczykowski
2013-04-28 22:46   ` Samuel Thibault
2013-04-23  3:16 ` [PATCH 4/7] minios: add gnttab_find_grant_of_page Marek Marczykowski
2013-04-28 22:41   ` Samuel Thibault
2013-04-28 22:51     ` Marek Marczykowski
2013-04-23  3:17 ` [PATCH 5/7] libxc: implement gntshr for minios Marek Marczykowski
2013-04-28 22:44   ` Samuel Thibault
2013-04-28 23:17     ` Marek Marczykowski
2013-04-28 23:22       ` Samuel Thibault
2013-04-23  3:25 ` [PATCH 7/7] libvchan: do not use xc_gntshr_share_page_notify in Mini-OS Marek Marczykowski
2013-04-28 22:48   ` Samuel Thibault
2013-04-28 23:00     ` Marek Marczykowski
2013-04-26 14:55 ` [PATCH 0/7] Optionally add libvchan to stubdom George Dunlap
2013-04-26 14:56   ` Marek Marczykowski
2013-04-26 14:57     ` George Dunlap
2013-04-26 15:02       ` Marek Marczykowski
2013-04-26 15:03 ` Ian Campbell
2013-04-26 16:41   ` Daniel De Graaf [this message]
2013-04-28 22:52 ` Samuel Thibault
2013-04-28 23:08   ` Marek Marczykowski
2013-04-30 21:22     ` Samuel Thibault

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=517AAE52.7080009@tycho.nsa.gov \
    --to=dgdegra@tycho.nsa.gov \
    --cc=Ian.Campbell@citrix.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=Stefano.Stabellini@eu.citrix.com \
    --cc=marmarek@invisiblethingslab.com \
    --cc=samuel.thibault@ens-lyon.org \
    --cc=xen-devel@lists.xen.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.