All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: xen-devel@lists.xen.org, rumpkernel-users@lists.sourceforge.net,
	Anil Madhavapeddy <anil@recoil.org>,
	Samuel Thibault <samuel.thibault@ens-lyon.org>,
	Ian Jackson <ian.jackson@eu.citrix.com>,
	Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Subject: Re: RFC: Cleaning up the Mini-OS namespace
Date: Thu, 4 Dec 2014 14:40:19 +0000	[thread overview]
Message-ID: <54807253.5000603@citrix.com> (raw)
In-Reply-To: <20141204142757.GD11192@dezo.moloch.sk>

On 04/12/14 14:27, Martin Lucina wrote:
> Hi,
>
> In rumprun-xen [1] we use Mini-OS as a "base firmware" layer in our stack.
> Currently we are using a slightly bastardized fork of the xen.git Mini-OS.
>
> We would like to avoid this turning into a permanent fork. Following
> previous discussion [2] on and openmirage-devel I would like to coordinate
> upstreaming our changes if possible.
>
> The biggest change which needs to be done is cleaning up the Mini-OS
> namespace. This is necessary as we link Mini-OS with the application, rump
> kernel and NetBSD libc to get a full application stack.
>
> The changes as implemented in a semi-automated fashion for the Mini-OS used
> by rumprun-xen can be viewed in the (since merged) pull request at [3]:
>
> - All Mini-OS functions called by rumprun-xen are renamed to minios_* or
>   _minios_* for strictly internal functions, except those in the
>   blkfront_*, netfront_*, pcifront_* and xenbus_* driver namespaces.
> - In the case of drivers, eg. init|shutdown_blkfront are renamed to
>   blkfront_*.
> - All global variables are either manually made local, or placed under
>   the _minios_* namespace, with the exception of HYPERVISOR_shared_info,
>   and those variables under driver namespaces kept above.
> - All callers are updated to use the new names. Where it makes sense,
>   macros such as alloc_page are also renamed into the minios_ namespace.
>
> Questions:
>
> - Is there a general interest in upstreaming this work?
> - Upstream Mini-OS provides things we (rumpkernel.org) don't need (stub
>   "libc", ...). If we are to move to upstream then we will need to do a
>   more general cleanup of Mini-OS to make these pluggable. Again, is there
>   upstream interest in this work?
> - As there is no formal API for Mini-OS. My changes only address the
>   "public" functionality used by rumprun-xen. Other users mileage will
>   vary; who else should I coordinate with?
> - I have not namespaced macros such as local_irq_save(). Should this be
>   done? 
>   
>   Also, the driver namespaces have been preserved (since I was lazy), these
>   should probably be renamed under the minios namespace; it's plausible
>   some day someone will try to link an application with a function called
>   blkfront_init().
>
> All comments and review welcome.
>
> Martin

I think this is a very good idea, and I am completely in favour of it.

There are already-identified issues such as MiniOS leaking things like
ARRAY_SIZE() into linked namespaces, which I havn't yet had enough tuits
to fix.

I think splitting things like the stub libc away from the "MiniOS Xen
Framework" is also a good idea.  Ideally, the result of a "MiniOS Build"
would be a small set of .a's which can then be linked against some
normal C to make a minios guest.  (How feasible this is in reality
remains to be seen.)

>From a not-public-API point of view, all you have to worry about is that
the existing minios stuff in xen.git, including the stubdom stuff,
continues to work.  We have never made any guarantees to anyone using
minios out-of-tree.

~Andrew

       reply	other threads:[~2014-12-04 14:40 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20141204142757.GD11192@dezo.moloch.sk>
2014-12-04 14:40 ` Andrew Cooper [this message]
2014-12-04 22:52   ` RFC: Cleaning up the Mini-OS namespace Antti Kantee
2014-12-05 18:22   ` Martin Lucina
     [not found]   ` <20141205182208.GC19077@dezo.moloch.sk>
2014-12-07 17:54     ` Samuel Thibault
2014-12-08 10:08       ` Ian Campbell
     [not found]   ` <5480E595.1010204@iki.fi>
2014-12-05 18:31     ` Martin Lucina
     [not found]     ` <20141205183153.GD19077@dezo.moloch.sk>
2014-12-06 12:40       ` Antti Kantee
2014-12-07 17:55     ` Samuel Thibault
2014-12-07 18:03       ` Antti Kantee
     [not found]       ` <54849675.6070008@iki.fi>
2014-12-07 18:09         ` Samuel Thibault
     [not found]         ` <20141207180904.GS3141@type.youpi.perso.aquilenet.fr>
2014-12-07 18:13           ` Antti Kantee
     [not found]           ` <548498D2.8000505@iki.fi>
2014-12-07 18:41             ` Samuel Thibault
2014-12-07 18:02 ` Samuel Thibault
2014-12-04 14:27 Martin Lucina

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=54807253.5000603@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=anil@recoil.org \
    --cc=ian.jackson@eu.citrix.com \
    --cc=rumpkernel-users@lists.sourceforge.net \
    --cc=samuel.thibault@ens-lyon.org \
    --cc=stefano.stabellini@eu.citrix.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.