All of lore.kernel.org
 help / color / mirror / Atom feed
* RFC: Cleaning up the Mini-OS namespace
@ 2014-12-04 14:27 Martin Lucina
  0 siblings, 0 replies; 14+ messages in thread
From: Martin Lucina @ 2014-12-04 14:27 UTC (permalink / raw)
  To: xen-devel
  Cc: rumpkernel-users, Samuel Thibault, Stefano Stabellini,
	Ian Jackson, Anil Madhavapeddy

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

[1] http://repo.rumpkernel.org/rumprun-xen
[2] http://thread.gmane.org/gmane.comp.rumpkernel.user/514
[3] https://github.com/rumpkernel/rumprun-xen/pull/10

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2014-12-08 10:08 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20141204142757.GD11192@dezo.moloch.sk>
2014-12-04 14:40 ` RFC: Cleaning up the Mini-OS namespace Andrew Cooper
2014-12-04 22:52   ` 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

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.