All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefano Stabellini <sstabellini@kernel.org>
To: Andrii Anisov <andrii_anisov@epam.com>
Cc: Stefano Stabellini <sstabellini@kernel.org>,
	Volodymyr Babchuk <vlad.babchuk@gmail.com>,
	Dario Faggioli <dario.faggioli@citrix.com>,
	george.dunlap@citrix.com, Xen Devel <xen-devel@lists.xen.org>,
	Julien Grall <julien.grall@arm.com>,
	Artem Mygaiev <joculator@gmail.com>
Subject: Re: [ARM] Native application design and discussion (I hope)
Date: Fri, 5 May 2017 12:28:40 -0700 (PDT)	[thread overview]
Message-ID: <alpine.DEB.2.10.1705051211550.2892@sstabellini-ThinkPad-X260> (raw)
In-Reply-To: <29f244da-2346-70a7-13f0-e5c0cbf490d7@epam.com>

On Fri, 5 May 2017, Andrii Anisov wrote:
> Hello Stefano,
> 
> On 24.04.17 21:08, Stefano Stabellini wrote:
> > Stubdomains (stubdoms in short) are small domains, each running a single
> > application. Typically they run unikernels rather than a full fledged
> > operating system. A classic example is QEMU stubdoms on x86: one QEMU
> > stubdoms is started for each regular guest domain. Each QEMU stubdom
> > instance provides emulation for one guest - it runs one instance of
> > QEMU.
> I'm wondering if there are any examples of practical usage of stub domains
> with ARM?

Good question. I don't think so: there have been practical examples of
unikernels running on Xen on ARM, but not stubdoms, because we haven't
needed to run large emulation pieces yet.


> >  From Xen point of view, they are regular domain, except that they are
> > privilege in regards to one particular guest only (they can map a page
> > of the guest they are servicing, but they cannot map any random page in
> > memory). If you do "xl list" you would see stubdoms in the output.
> So they are the regular XEN domains with sort of specific permissions.
> > The advantages of using stubdoms are:
> > - they already exist
> > - their security properties are well known
> Could you please point me to some up to date documentation about stubdoms and
> their security properties?

Stubdoms have been talked about in the Xen community for a very long
time:

https://hal.inria.fr/inria-00329969/PDF/final.pdf
http://www.cs.ubc.ca/~andy/papers/xoar-sosp-final.pdf
https://wiki.xen.org/wiki/Dom0_Disaggregation

Both OpenXT and Qubes OS use stubdoms.


> > In this thread, we are discussing whether it makes sense to introduce a
> > *new* model, one that has different properties, therefore different
> > advantages and disadvantages. Let's call it EL0 apps.
> > 
> > An EL0 app is an application that runs on top of the Xen hypervisor
> > directly in EL0 mode. It is not a domain, and it doesn't show up on "xl
> > list". It runs on the same timeslot of the guest vcpu it is servicing.
> > It is scheduled deterministically: right after a guest vcpu traps into
> > the hypervisor. The build is simple. Writing an EL0 app should be
> > (almost) as simple as writing a regular emulator for Xen. An EL0
> > app is not scheduled, but it could register a timer with Xen. The
> > interface between EL0 apps and Xen is small: the number of
> > functionalities exposed are very limited.
> Any reason to have an interface between XEN and EL0 app to be bound to an app
> functionality?
> Why not to introduce a generic (simplistic) interface and do not limit the
> functionality of the EL0 app?

Because if we did that there would be no security benefits in having EL0
apps: we might as well run the emulator in the hypervisor.


> > The advantages of using EL0 apps are:
> > - scheduled deterministically
> > - faster context switch
> > - lower and deterministic latency
> > - EL0 apps execution time is accounted appropriately to the guest that
> >    they are servicing
> Can't the EL0 app be servicing XEN itself?

Short answer: no.

Long answer follows. EL0 apps will run in a different context. It was
suggested to keep track of their state in the guest vcpu struct, which
looks like a good idea to me. If we did that, the only way to have an
EL0 app running without being bound to a specific guest, would be to run
it on the idle vcpu, which I think is a bad idea.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

  reply	other threads:[~2017-05-05 19:28 UTC|newest]

Thread overview: 82+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-06 20:21 [ARM] Native application design and discussion (I hope) Volodymyr Babchuk
2017-04-06 21:31 ` Stefano Stabellini
2017-04-07 11:03   ` Volodymyr Babchuk
2017-04-07 23:36     ` Stefano Stabellini
2017-04-11 20:32       ` Stefano Stabellini
2017-04-12 18:13         ` Dario Faggioli
2017-04-12 19:17           ` Stefano Stabellini
2017-04-20 20:20             ` Volodymyr Babchuk
2017-04-21 14:42               ` Andrii Anisov
2017-04-21 15:49                 ` Julien Grall
2017-04-21 16:08                   ` Volodymyr Babchuk
2017-04-21 16:20                   ` Andrii Anisov
2017-04-21 20:58                 ` Stefano Stabellini
2017-04-21 21:17                   ` Stefano Stabellini
2017-04-24 16:56                   ` Andrii Anisov
2017-04-24 18:08                     ` Stefano Stabellini
2017-04-25 10:15                       ` Andrii Anisov
2017-05-05 10:51                       ` Andrii Anisov
2017-05-05 19:28                         ` Stefano Stabellini [this message]
2017-05-08 10:46                           ` George Dunlap
2017-05-08 18:31                             ` Stefano Stabellini
2017-05-08 18:33                               ` Julien Grall
2017-05-09  8:53                               ` George Dunlap
2017-05-10 16:38                                 ` Andrii Anisov
2017-05-09 10:13                           ` Dario Faggioli
2017-05-09 10:32                             ` Julien Grall
2017-05-09 11:08                               ` Dario Faggioli
2017-05-09 11:19                                 ` Julien Grall
2017-05-09 18:29                                 ` Stefano Stabellini
2017-05-10  9:56                                   ` George Dunlap
2017-05-10 10:00                                     ` Julien Grall
2017-05-10 10:03                                       ` George Dunlap
2017-05-10 10:48                                         ` Julien Grall
2017-05-10 17:37                                           ` Volodymyr Babchuk
2017-05-10 18:05                                             ` Stefano Stabellini
2017-05-10 19:04                                             ` Julien Grall
2017-05-11 10:07                                               ` Julien Grall
2017-05-11 11:28                                                 ` Volodymyr Babchuk
2017-05-10 18:08                                     ` Andrii Anisov
2017-05-10 18:24                                       ` Stefano Stabellini
2017-05-11 15:19                                         ` Volodymyr Babchuk
2017-05-11 15:35                                           ` Modules support in Xen (WAS: Re: [ARM] Native application design and discussion (I hope)) Julien Grall
2017-05-11 16:35                                             ` George Dunlap
2017-05-11 17:14                                               ` Volodymyr Babchuk
2017-05-11 17:20                                                 ` George Dunlap
2017-05-11 17:53                                                   ` Lars Kurth
2017-05-11 17:14                                             ` George Dunlap
2017-05-11 17:16                                               ` George Dunlap
2017-05-11 18:13                                               ` Volodymyr Babchuk
2017-05-12 11:48                                                 ` George Dunlap
2017-05-12 18:43                                                   ` Stefano Stabellini
2017-05-12 19:04                                                     ` Volodymyr Babchuk
2017-05-15 11:21                                                       ` George Dunlap
2017-05-15 17:32                                                         ` Stefano Stabellini
2017-05-11 18:04                                             ` Stefano Stabellini
2017-05-11 18:39                                               ` Volodymyr Babchuk
2017-05-05 11:09                       ` [ARM] Native application design and discussion (I hope) Andrii Anisov
2017-04-24 19:11                     ` Julien Grall
2017-04-24 21:41                       ` Volodymyr Babchuk
2017-04-25 11:43                         ` Julien Grall
2017-04-26 21:44                           ` Volodymyr Babchuk
2017-04-27 17:26                             ` Volodymyr Babchuk
2017-05-02 12:52                               ` Julien Grall
2017-05-02 12:42                             ` Julien Grall
2017-04-25  8:52                       ` Andrii Anisov
2017-04-21 15:57               ` Julien Grall
2017-04-21 16:16                 ` Volodymyr Babchuk
2017-04-21 16:47                   ` Julien Grall
2017-04-21 17:04                     ` Volodymyr Babchuk
2017-04-21 17:38                       ` Julien Grall
2017-04-21 18:35                         ` Volodymyr Babchuk
2017-04-24 11:00                           ` Julien Grall
2017-04-24 21:29                             ` Volodymyr Babchuk
2017-04-21 21:24                         ` Stefano Stabellini
2017-04-24 16:14                           ` Andrii Anisov
2017-04-24 16:46                           ` Andrii Anisov
2017-04-27 15:25                           ` George Dunlap
2017-05-02 12:45                             ` Julien Grall
2017-05-12 18:47 Volodymyr Babchuk
2017-05-15 12:51 ` George Dunlap
2017-05-15 17:35   ` Stefano Stabellini
2017-05-15 13:54 ` Andrii Anisov

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=alpine.DEB.2.10.1705051211550.2892@sstabellini-ThinkPad-X260 \
    --to=sstabellini@kernel.org \
    --cc=andrii_anisov@epam.com \
    --cc=dario.faggioli@citrix.com \
    --cc=george.dunlap@citrix.com \
    --cc=joculator@gmail.com \
    --cc=julien.grall@arm.com \
    --cc=vlad.babchuk@gmail.com \
    --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.