]> xenbits.xensource.com Git - rumpuser-xen.git/log
rumpuser-xen.git
10 years agorumprun: Change delimiter for BLKSPEC and NETSPEC to comma
Martin Lucina [Fri, 14 Nov 2014 16:54:56 +0000 (17:54 +0100)]
rumprun: Change delimiter for BLKSPEC and NETSPEC to comma

Will work much better for IPv6 and/or NFS.

Signed-off-by: Martin Lucina <martin@lucina.net>
10 years agoRename rumprun-xen to rumprun
Martin Lucina [Fri, 14 Nov 2014 16:37:06 +0000 (17:37 +0100)]
Rename rumprun-xen to rumprun

To reflect the intent to support different stacks in future (eg. kvm),
rumprun-xen is renamed to just rumprun, with a mandatory STACK as its
first argument.

Signed-off-by: Martin Lucina <martin@lucina.net>
10 years agoapp-tools/specs.configure.in: Add rumpnet_config components
Martin Lucina [Fri, 14 Nov 2014 13:11:38 +0000 (14:11 +0100)]
app-tools/specs.configure.in: Add rumpnet_config components

The rumpconfig module depends on rumpnet_config, without this change
rumpapp-xen-configure does not work ("C compiler cannot create
executables").

Signed-off-by: Martin Lucina <martin@lucina.net>
10 years agoxr: Rename to rumprun-xen
Martin Lucina [Fri, 14 Nov 2014 12:40:09 +0000 (13:40 +0100)]
xr: Rename to rumprun-xen

Rename the "xr" driver script to "rumprun-xen" to better reflect it's
purpose and scope.

Signed-off-by: Martin Lucina <martin@lucina.net>
10 years agoxr: Add -N and -M options
Martin Lucina [Fri, 14 Nov 2014 12:36:11 +0000 (13:36 +0100)]
xr: Add -N and -M options

Signed-off-by: Martin Lucina <martin@lucina.net>
10 years agoAdd support for static IPv4 configuration
Martin Lucina [Fri, 14 Nov 2014 12:28:50 +0000 (13:28 +0100)]
Add support for static IPv4 configuration

Signed-off-by: Martin Lucina <martin@lucina.net>
10 years agoConfigure rumprun-xen application stacks from Xenstore
Martin Lucina [Thu, 13 Nov 2014 10:40:08 +0000 (11:40 +0100)]
Configure rumprun-xen application stacks from Xenstore

In order to run rumprun-xen applications that are actually useful, we
need to be able to configure block devices and network interfaces.
These changes implement a basic mechanism to do this using Xenstore.

Conceptually the changes consist of the following parts which work
together:

- The rumpconfig module provides _rumprun_config() and
  _rumprun_deconfig() functions. These are called before and after the
  application main() function, and also in the case of deconfig when
  _exit() is called.

- These functions rely on keys like the following being present in
  Xenstore at the time the domain is started:

  /local/domain/<domid>/rumprun/net/0/... (first network interface)
  /local/domain/<domid>/rumprun/net/1/... (second network interface)
  /local/domain/<domid>/rumprun/blk/0/... (first block device)
  /local/domain/<domid>/rumprun/blk/1/... (second block device)

- The "xr" driver script, currently located in app-tools/. The
  motivation for this script is twofold:

  Firstly, in order to write the configuration to Xenstore the domain
  must be created in a paused state so that we can retrieve its unique
  <domid>. Only then do we know where in Xenstore to write the
  configuration data.

  Secondly, it is my intention with this work to provide a
  "docker-alike" interface for running rumprun applications. The "xr"
  script is therefore the CLI for running such applications.

Note that in this initial version, only configuring IPv4 network
interfaces with DHCP is supported, and only using image files with ffs
or cd9660 filesystems for block devices is supported.

Signed-off-by: Martin Lucina <martin@lucina.net>
10 years agoAdd .gitignore for tests/configure autoconf cruft
Martin Lucina [Tue, 11 Nov 2014 15:49:40 +0000 (16:49 +0100)]
Add .gitignore for tests/configure autoconf cruft

Signed-off-by: Martin Lucina <martin@lucina.net>
10 years agoMerge pull request #11 from mato/wip-exit
Martin Lucina [Tue, 11 Nov 2014 15:44:10 +0000 (16:44 +0100)]
Merge pull request #11 from mato/wip-exit

rumpuser_exit(), _exit(): Cleanly halt Mini-OS.

10 years agorumpuser_exit(), _exit(): Cleanly halt Mini-OS.
Martin Lucina [Tue, 11 Nov 2014 15:11:46 +0000 (16:11 +0100)]
rumpuser_exit(), _exit(): Cleanly halt Mini-OS.

rumpuser_exit() and _exit() were calling minios_do_exit() which is
intended to be called from an exception context and/or other "panic"
situation.  This was causing the stack trace code in minios_do_exit() to
walk off into never never land when the rumprun-xen application called
exit() or returned from main().

This commit adds a new minios_do_halt(reason) function, with the reason
code intended to mirror SHUTDOWN_* in xen/sched.h. Of those, currently
only poweroff and crash are implemented.

We then modify the rumpuser_exit() and _exit() functions to correctly
shut down the domain by calling minios_stop_kernel() followed by
minios_do_halt(MINIOS_HALT_POWEROFF).

Signed-off-by: Martin Lucina <martin@lucina.net>
10 years agoMerge pull request #10 from mato/wip-xenos
Martin Lucina [Tue, 11 Nov 2014 14:47:08 +0000 (15:47 +0100)]
Merge pull request #10 from mato/wip-xenos

Clean up Mini-OS namespace

10 years agoReinstate old demos
Martin Lucina [Mon, 10 Nov 2014 17:12:34 +0000 (18:12 +0100)]
Reinstate old demos

Xen project osstest CI depends on them, and we do not want to remove
them before a replacement is ready.

Signed-off-by: Martin Lucina <martin@lucina.net>
10 years agoSynchronise x86_32.o with Mini-OS namespace cleanup.
Martin Lucina [Mon, 10 Nov 2014 10:05:31 +0000 (11:05 +0100)]
Synchronise x86_32.o with Mini-OS namespace cleanup.

These changes sync the x86_32 arch-specific entrypoints with the Mini-OS
namespace cleanups. Now builds and runs correctly on x86.

Signed-off-by: Martin Lucina <martin@lucina.net>
10 years agoMinor improvement to hello demo
Martin Lucina [Fri, 7 Nov 2014 17:17:00 +0000 (18:17 +0100)]
Minor improvement to hello demo

Sleep in the demo to prove at least scheduling is working after all the
renaming changes.

Signed-off-by: Martin Lucina <martin@lucina.net>
10 years agoLocalize all non-public Mini-OS symbols
Martin Lucina [Fri, 7 Nov 2014 17:14:50 +0000 (18:14 +0100)]
Localize all non-public Mini-OS symbols

Pass 3 of X in Mini-OS namespace cleanup.

We define a set of prefixes in the Makefile for the symbol namespaces we
wish to keep. Then, when linking minios.o we use objcopy to localize all
other symbols. Note the sole exception of the arch-specific startup file
(x86_64.o) as this is used as the linker %startfile.

Signed-off-by: Martin Lucina <martin@lucina.net>
10 years agoClean up Mini-OS public namespace
Martin Lucina [Fri, 7 Nov 2014 16:52:39 +0000 (17:52 +0100)]
Clean up Mini-OS public namespace

Pass 2 of X in cleaning up Mini-OS namespace:

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

Signed-off-by: Martin Lucina <martin@lucina.net>
10 years agoBuild Mini-OS and rump kernel middleware as discrete objects
Martin Lucina [Thu, 6 Nov 2014 16:11:24 +0000 (17:11 +0100)]
Build Mini-OS and rump kernel middleware as discrete objects

In order to be able to make Mini-OS symbols local using objcopy we need to
build Mini-OS as a discrete relocatable object. While we're here, put the
various rump kernel middleware (libc stubs, rumphyper implementation)
into its own object file also.

Signed-off-by: Martin Lucina <martin@lucina.net>
10 years agoClean up x86_64.o entry point namespace
Martin Lucina [Thu, 6 Nov 2014 16:06:46 +0000 (17:06 +0100)]
Clean up x86_64.o entry point namespace

This is pass 1 of X of cleaning up mini-os symbol namespace:

- Namespace all globals in x86_64.o (except _start) as _minios_XXX.
- Fix dependent calling code to use the new namespace
  (hypercall-x86_64.h, sched.h, xen/arch/x86/*.c).

Signed-off-by: Martin Lucina <martin@lucina.net>
10 years agoUpdate .gitignore
Martin Lucina [Thu, 6 Nov 2014 10:35:54 +0000 (11:35 +0100)]
Update .gitignore

Signed-off-by: Martin Lucina <martin@lucina.net>
10 years agoRemove old demo from build, add simple hello-world test
Martin Lucina [Thu, 6 Nov 2014 09:58:25 +0000 (10:58 +0100)]
Remove old demo from build, add simple hello-world test

In preparation for cleaning up minios/xenos to resolve (among other
things) symbol namespacing issues, remove the old non-app-tools-based
demo from the build.

As a temporary replacement add in a simple (not configure-based) "Hello,
world!" in tests/hello.

Signed-off-by: Martin Lucina <martin@lucina.net>
10 years agoChange wording to accept people with a single contribution as authors.
Antti Kantee [Fri, 7 Nov 2014 15:58:33 +0000 (15:58 +0000)]
Change wording to accept people with a single contribution as authors.

[ci skip]

10 years agoadd AUTHORS
Antti Kantee [Fri, 7 Nov 2014 11:14:18 +0000 (11:14 +0000)]
add AUTHORS

seed with myself, others can add themselves if they wish to
[ci skip]

10 years agoCOPYING -> LICENSE
Antti Kantee [Fri, 7 Nov 2014 11:08:53 +0000 (11:08 +0000)]
COPYING -> LICENSE

consistency with everything else on repo.rumpkernel.org

10 years agoupdate src-netbsd
Antti Kantee [Mon, 3 Nov 2014 22:50:21 +0000 (22:50 +0000)]
update src-netbsd

NetBSD SA 2014-015

10 years agoMerge pull request #9 from mato/wip-gcc49-lto
Antti Kantee [Thu, 30 Oct 2014 16:36:20 +0000 (16:36 +0000)]
Merge pull request #9 from mato/wip-gcc49-lto

Fix non-working stunt ld with GCC 4.9 on Debian

10 years agostunt ld: Drop (LTO) -plugin and -plugin-opt from ld command
Martin Lucina [Thu, 30 Oct 2014 15:28:18 +0000 (16:28 +0100)]
stunt ld: Drop (LTO) -plugin and -plugin-opt from ld command

With (at least) GCC 4.9 on Debian jessie the GCC spec files have changed
to always use -plugin / -plugin-opt and load the LTO plugin, even if
-flto is not specified to GCC.

This breaks stunt ld which does not understand these options. Dropping
them from the linker command appears to do no harm.

10 years agoMerge pull request #8 from mato/wip-pullup
Antti Kantee [Thu, 30 Oct 2014 14:23:53 +0000 (14:23 +0000)]
Merge pull request #8 from mato/wip-pullup

Pull in latest buildrump.sh

10 years agoPull in latest buildrump.sh
Martin Lucina [Thu, 30 Oct 2014 14:11:02 +0000 (15:11 +0100)]
Pull in latest buildrump.sh

10 years agopull in latest src-netbsd, updates to NetBSD 7.99.1 kernel
Antti Kantee [Tue, 26 Aug 2014 12:39:44 +0000 (12:39 +0000)]
pull in latest src-netbsd, updates to NetBSD 7.99.1 kernel

10 years agopull in latest buildrump.sh
Antti Kantee [Tue, 26 Aug 2014 12:39:10 +0000 (12:39 +0000)]
pull in latest buildrump.sh

10 years agoupdate travis urls
Antti Kantee [Wed, 30 Jul 2014 12:12:54 +0000 (12:12 +0000)]
update travis urls

10 years agoupdate wiki url (repo rename rumpuser-xen -> rumprun-xen)
Antti Kantee [Wed, 30 Jul 2014 12:11:39 +0000 (12:11 +0000)]
update wiki url (repo rename rumpuser-xen -> rumprun-xen)

10 years agodisplay message after successful build
Antti Kantee [Mon, 28 Jul 2014 11:36:56 +0000 (11:36 +0000)]
display message after successful build

10 years ago-D__RUMPAPP__ in addition to -D__RUMPUSER_XEN__
Antti Kantee [Thu, 24 Jul 2014 13:18:27 +0000 (13:18 +0000)]
-D__RUMPAPP__ in addition to -D__RUMPUSER_XEN__

All new code should use the former, the latter will be removed at
some point.

10 years agoUsually $PATH works better if components are separated with :
Antti Kantee [Thu, 24 Jul 2014 13:15:02 +0000 (13:15 +0000)]
Usually $PATH works better if components are separated with :

10 years agorun a simple app-tools test
Antti Kantee [Thu, 24 Jul 2014 13:06:22 +0000 (13:06 +0000)]
run a simple app-tools test

10 years agoAdd a simple app-tools test which exercises configure and make.
Antti Kantee [Thu, 24 Jul 2014 13:05:04 +0000 (13:05 +0000)]
Add a simple app-tools test which exercises configure and make.

(also add the megabyte of autoconf glue that comes with the
few hundred byte test)

10 years agoPull in latest rumpsrc for symbol aliasing improvements.
Antti Kantee [Thu, 24 Jul 2014 12:17:06 +0000 (12:17 +0000)]
Pull in latest rumpsrc for symbol aliasing improvements.

E.g. select is now available also as select, instead of as __select50
which is renamed using sys/select.h.  this fixes e.g. configure scripts
which do not include headers.

10 years agoSpeed up app-configure by a factor of many.
Antti Kantee [Thu, 24 Jul 2014 08:55:39 +0000 (08:55 +0000)]
Speed up app-configure by a factor of many.

This is done by not linking in the full rump kernel at the configure
stage.  A cross-configure configure script will only do compile tests and
it does not really care about what is present in the kernel.  Since all
of the "libc" bits are in librump (apart from ones we handle directly on
top of minios), just linking in librump at the configure stage is enough.

10 years agoMake it easy to not link the networking stack.
Antti Kantee [Thu, 24 Jul 2014 08:50:41 +0000 (08:50 +0000)]
Make it easy to not link the networking stack.

Alternatively, could not link this file into the image, but it's easier
this way around.  Notably, the hypercalls should somehow be bundled
with the virtif driver, but that's build system rototill for another,
rainier day.

10 years agoSeparate LDFLAGS out of LDLIBS
Antti Kantee [Thu, 24 Jul 2014 08:22:02 +0000 (08:22 +0000)]
Separate LDFLAGS out of LDLIBS

XXX: Makefile needs to be put through a lawnmower

10 years agoExpand OBJS and LDLIBS separately for app-tools substitution
Antti Kantee [Thu, 24 Jul 2014 08:03:38 +0000 (08:03 +0000)]
Expand OBJS and LDLIBS separately for app-tools substitution

No functional change

10 years agoput demo objs into a separate variable
Antti Kantee [Thu, 24 Jul 2014 08:00:09 +0000 (08:00 +0000)]
put demo objs into a separate variable

10 years agoadd missing "$@" for exec'ing the real configure script
Antti Kantee [Wed, 23 Jul 2014 14:33:41 +0000 (14:33 +0000)]
add missing "$@" for exec'ing the real configure script

10 years agoSlightly revamp app-tools. Provide temporary compat wrappers for old usage.
Antti Kantee [Wed, 23 Jul 2014 14:27:49 +0000 (14:27 +0000)]
Slightly revamp app-tools.  Provide temporary compat wrappers for old usage.

User-visible changes:

rename rumpxen-app-foo -> rumpapp-xen-foo
  rationale: easier to see what is the platform, hopefully useful if
             the tools see usage beyond rump kernels on Xen

adjust usage of make so that the actual make is passed in the env
via $RUMP_APPTOOLS_MAKE, defaults to "make"
  rationale: matches usage of make with actual make

introduce rumpapp-xen-gmake
  rationale: saves typing RUMP_APPTOOLS_MAKE=gmake

10 years agoWEAKASM aliases (_sys_foo) are now provided by rumpsrc.
Antti Kantee [Wed, 23 Jul 2014 11:59:02 +0000 (11:59 +0000)]
WEAKASM aliases (_sys_foo) are now provided by rumpsrc.

This makes it possible to build pthread_cancelstub.c

10 years agog/c rumpuser_dl_globalsym(), it's not called by the rump kernel anymore.
Antti Kantee [Wed, 16 Jul 2014 10:12:43 +0000 (10:12 +0000)]
g/c rumpuser_dl_globalsym(), it's not called by the rump kernel anymore.

10 years agoTone down the catastrophy levels.
Antti Kantee [Wed, 16 Jul 2014 10:09:10 +0000 (10:09 +0000)]
Tone down the catastrophy levels.

The TIMETOPANIC() stuff was mostly meant as a development phase thing to
make sure we catch unimplemented functions.  Replace it with a function
returning ENOTSUP.

10 years agocallmain: Print something before and after main()
Ian Jackson [Mon, 14 Jul 2014 11:14:43 +0000 (12:14 +0100)]
callmain: Print something before and after main()

This makes it easier to find the application program's output.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
10 years agoapp-tools: Pass -I.../rumpuser-xen/include
Ian Jackson [Mon, 14 Jul 2014 11:22:41 +0000 (12:22 +0100)]
app-tools: Pass -I.../rumpuser-xen/include

Applications may want the Xen or minios headers.  We pass that as the
last -isystem (because these headers aren't very namespace clean -
particularly, the minios headers are very bad).

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
10 years agoapp-tools: -U various unwanted predefines
Ian Jackson [Fri, 11 Jul 2014 11:40:30 +0000 (12:40 +0100)]
app-tools: -U various unwanted predefines

Find the list of things to undefine by running rumpmake on
rumptools/mk.conf: we take everything that rumpmake's CPPFLAGS would
undefine and undefine that ourselves.

The result is that we never (for example) provide -D__linux__.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
10 years agoapp-tools: Use s///g in seddery
Ian Jackson [Mon, 14 Jul 2014 11:18:08 +0000 (12:18 +0100)]
app-tools: Use s///g in seddery

Substitute even multiple occurrences in a single line.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
10 years agopass --{start,end}-group through to linker
Antti Kantee [Mon, 14 Jul 2014 12:33:27 +0000 (12:33 +0000)]
pass --{start,end}-group through to linker

as a parameter analoguous to --{,no-}whole-archive

10 years agoPull in new rumpsrc for historic libc compat functions
Antti Kantee [Mon, 14 Jul 2014 12:25:14 +0000 (12:25 +0000)]
Pull in new rumpsrc for historic libc compat functions

e.g. getdtablesize()

10 years agoExplicitly handle -z to encode knowledge that it takes an argument
Antti Kantee [Mon, 14 Jul 2014 12:24:02 +0000 (12:24 +0000)]
Explicitly handle -z to encode knowledge that it takes an argument

from Ian Jackson

10 years agoMerge branch 'tools-x64'
Antti Kantee [Mon, 14 Jul 2014 12:13:01 +0000 (12:13 +0000)]
Merge branch 'tools-x64'

10 years agonblibs is no more, so fix paths.
Antti Kantee [Mon, 14 Jul 2014 12:12:00 +0000 (12:12 +0000)]
nblibs is no more, so fix paths.

(things happened to work due to lazy globbing)

10 years agoMerge branch 'newsrc'
Ian Jackson [Mon, 14 Jul 2014 09:49:59 +0000 (10:49 +0100)]
Merge branch 'newsrc'

10 years agostub out set/getpriority (used by libc/nice)
Antti Kantee [Sat, 12 Jul 2014 11:45:56 +0000 (11:45 +0000)]
stub out set/getpriority (used by libc/nice)

10 years agopull in latest buildrump.sh (for rpcgen fixes)
Antti Kantee [Sat, 12 Jul 2014 11:13:20 +0000 (11:13 +0000)]
pull in latest buildrump.sh (for rpcgen fixes)

10 years agono longer remove rumpsrc in distcleanrump
Antti Kantee [Sat, 12 Jul 2014 11:12:56 +0000 (11:12 +0000)]
no longer remove rumpsrc in distcleanrump

10 years agopass -z through to real linker
Antti Kantee [Fri, 11 Jul 2014 14:31:05 +0000 (14:31 +0000)]
pass -z through to real linker

10 years agodo not default to 32bit build
Antti Kantee [Fri, 11 Jul 2014 14:25:40 +0000 (14:25 +0000)]
do not default to 32bit build

10 years agouse homegrown submodule update for now
Antti Kantee [Wed, 9 Jul 2014 16:18:29 +0000 (16:18 +0000)]
use homegrown submodule update for now

10 years agoupdate submodules
Antti Kantee [Wed, 9 Jul 2014 16:17:38 +0000 (16:17 +0000)]
update submodules

10 years agoadd src-netbsd branch appstack-src as a submodule
Antti Kantee [Wed, 9 Jul 2014 16:16:41 +0000 (16:16 +0000)]
add src-netbsd branch appstack-src as a submodule

10 years agono longer ignore rumpsrc, will be a git submodule
Antti Kantee [Wed, 9 Jul 2014 16:14:16 +0000 (16:14 +0000)]
no longer ignore rumpsrc, will be a git submodule

10 years agoremove nblibs, going to be superceded by src-netbsd
Antti Kantee [Wed, 9 Jul 2014 16:13:04 +0000 (16:13 +0000)]
remove nblibs, going to be superceded by src-netbsd

10 years agoupdate buildrump.sh
Antti Kantee [Wed, 9 Jul 2014 16:10:49 +0000 (16:10 +0000)]
update buildrump.sh

10 years agoMakefile etc.: Use -no-integrated-cpp
Ian Jackson [Wed, 25 Jun 2014 13:14:25 +0000 (14:14 +0100)]
Makefile etc.: Use -no-integrated-cpp

I have found that GCC 4.7.2 (Debian i386 4.7.2-5) sometimes misreports
errors relating to broken #includes when the integrated cpp is in use.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
10 years agoapp-tools: Provide rumpxen-app-* helpers
Ian Jackson [Tue, 24 Jun 2014 17:39:09 +0000 (18:39 +0100)]
app-tools: Provide rumpxen-app-* helpers

Provide:

 * A GCC wrapper which allows a naive Makefile to compile and link an
   "executable" to generate a rump kernel image.  This uses:

 * A GCC specs file.  This provides the right "system" include
   directories - that is, the headers for the rump kernel application
   environment.  It also uses:

 * A stunt wrapper for "ld".  Building a minios-based Xen image needs
   two runs of ld.  This ld wrapper parses and categorises its
   arguments and runs the two appropriate link steps.

 * A pair of simple wrapper scripts for configure and make, which set
   CC and pass the --host= option.

With these changes, and a suitably modified xen.git, we can run
configure and build a relevant subset of the Xen management libraries
and tools.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
10 years agoMakefile: break out LDSCRIPT variable
Ian Jackson [Tue, 24 Jun 2014 17:39:23 +0000 (18:39 +0100)]
Makefile: break out LDSCRIPT variable

We are going to want to use this value separately in the next commit.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
10 years agoMakefile: remove a whitespace error
Ian Jackson [Tue, 24 Jun 2014 17:39:34 +0000 (18:39 +0100)]
Makefile: remove a whitespace error

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
10 years agorestore default demo
Antti Kantee [Fri, 27 Jun 2014 11:16:51 +0000 (11:16 +0000)]
restore default demo

10 years agosupport !TIMER_ABSTIME too (here we have only CLOCK_MONOTONIC)
Antti Kantee [Fri, 27 Jun 2014 11:14:46 +0000 (11:14 +0000)]
support !TIMER_ABSTIME too (here we have only CLOCK_MONOTONIC)

10 years agominor fixes and adjustments
Antti Kantee [Fri, 27 Jun 2014 11:12:19 +0000 (11:12 +0000)]
minor fixes and adjustments

10 years agoaccept hex string as demo mask
Antti Kantee [Thu, 26 Jun 2014 23:20:58 +0000 (23:20 +0000)]
accept hex string as demo mask

10 years agorun demos in a more sensible order
Antti Kantee [Thu, 26 Jun 2014 21:01:13 +0000 (21:01 +0000)]
run demos in a more sensible order

ones which don't loop forever are run first

10 years agoSupport NetBSD libpthread by implementing the _lwp_fun() interface.
Antti Kantee [Thu, 26 Jun 2014 18:19:18 +0000 (18:19 +0000)]
Support NetBSD libpthread by implementing the _lwp_fun() interface.

10 years agoxendev_component: Fix printf format in panic
Ian Jackson [Tue, 24 Jun 2014 18:25:23 +0000 (19:25 +0100)]
xendev_component: Fix printf format in panic

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
10 years agobuildxen.sh: Do "make links".
Ian Jackson [Tue, 24 Jun 2014 18:04:45 +0000 (19:04 +0100)]
buildxen.sh: Do "make links".

This fixes the build which I just broke.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
10 years agorumpxendev: Provide /dev/xen/xenbus
Ian Jackson [Mon, 9 Jun 2014 15:36:38 +0000 (16:36 +0100)]
rumpxendev: Provide /dev/xen/xenbus

This is a new rumpkernel component which provides an interface to the
minios xenbus driver.  It presents as /dev/xen/xenbus which speaks the
standard xenstore protocol and can be used in the normal way by all
the tools (including with poll or select).

Internally, it arranges to use the xenbus driver's ability to
multiplex requests, responses and watch events from multiple users.
So it can be used in parallel with all existing rump kernel
functionality.  The device can also perhaps be opened more than once.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
10 years agomini-os/xenbus: Provide xenbus_free
Ian Jackson [Fri, 20 Jun 2014 17:43:55 +0000 (18:43 +0100)]
mini-os/xenbus: Provide xenbus_free

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
10 years agomini-os/xenbus: Provide queue->wakeup hook
Ian Jackson [Tue, 17 Jun 2014 15:00:09 +0000 (16:00 +0100)]
mini-os/xenbus: Provide queue->wakeup hook

This allows xenbus's caller to get called back when an item is put on
the queue, rather than simply having the waitq signaled.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
10 years agomini-os/xenbus: Sort out request and watch locking
Ian Jackson [Mon, 16 Jun 2014 17:01:54 +0000 (18:01 +0100)]
mini-os/xenbus: Sort out request and watch locking

Make the xenbus_req_lock public, and lock it everywhere it is needed.
It needs to protect not just the xenbus request ring itself, but also
a number of internal data structures.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
10 years agomini-os/xenbus: Expose lower-level interface
Ian Jackson [Wed, 11 Jun 2014 15:17:20 +0000 (16:17 +0100)]
mini-os/xenbus: Expose lower-level interface

Provide an interface that allows a xenbus user to explicitly allocate
ids, deal with responses asynchronously, specify the queues to be used
for responses and watches, etc.

More specifically:

* Enhance xenbus_event to be capable of dealing with both watches and
  command replies.  In particular, arrange that it will contain a
  pointer to the watch.  We leave the old fields undisturbed because
  of the way that this struct is already used in various places.

* Provide that a xenbus_event for a command response contains a copy
  of the pointer to the reply message, rather than putting it in the
  req_info (which is visible only internally).

* Rename `struct watch' to `struct xenbus_watch' because it needs
  to be in the public interface.

* allocate_xenbus_id becomes xenbus_id_allocate; same for release.

* Make xb_write into a public function, xenbus_xb_write.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
10 years agomini-os/xenbus: Unify watch and reply queues
Ian Jackson [Mon, 9 Jun 2014 15:02:11 +0000 (16:02 +0100)]
mini-os/xenbus: Unify watch and reply queues

We are going to want to provide an interface to xenbus which does not
reorder messages for a particular user.  In particular, the reply to a
watch or unwatch should not be reordered with respect to watch events.

To this end we arrange that both replies and watches use the same kind
of queue inside the xenbus driver.  Currently this queue type is only
exposed outside the xenbus driver for use with watches, as before.

Important functional changes in this patch include:

* There is a separate scheduler wait queue for each reply queue,
  rather than one for all watches and one for each outstanding reply.
  This wait queue lives in the reply queue struct.

* There are abstracted-away internal functions for removing (and,
  indeed, awaiting) events.  xenbus_wait_for_watch_return becomes a
  trivial wrapper around await_event.

* Handling of the replies to requests is formalised, using the new
  queues.  Now a single reply queue might be used for multiple
  requests (although there are no callers that do this).

Other changes are:

* The latent bug in xenbus_msg_reply, which assumed no spurious
  wakeups, is gone.

* The "in_use" flag in the request array can be done away with, since
  we can use the reply_queue pointer value instead.

* The callers of allocate_xenbus_id (currently, only
  xenbus_msg_reply), have to initialise a xenbus_event_queue and
  provide it to allocate_xenbus_id.

* Abolished the xenbus_watch_queue waitq in favour of the waitq inside
  the xenbus_default_watch_events event queue.

* Abolished a duplicate assignment to in_use in release_xenbus_id.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
10 years agomini-os/xenbus: Rename xenbus_events to xenbus_default_watch_queue
Ian Jackson [Fri, 20 Jun 2014 16:44:18 +0000 (17:44 +0100)]
mini-os/xenbus: Rename xenbus_events to xenbus_default_watch_queue

This is only used for watch events, and only if xenbus's caller
doesn't specify a queue of their own.

Rename the variable because future patches are going to make the
current name confusing, because "event" is going to mean not just
watch events.

perl -i~ -pe 's/\bxenbus_events\b/xenbus_default_watch_queue/' xen/xenbus/xenbus.c include/mini-os/xenbus.h

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
10 years agomini-os/xenbus: Use MINIOS_LIST for the list of watches
Ian Jackson [Wed, 11 Jun 2014 12:28:07 +0000 (13:28 +0100)]
mini-os/xenbus: Use MINIOS_LIST for the list of watches

Remove the open-coded singly-linked list manipulation.

We replace it with a doubly-linked list because in forthcoming patches
we are going to want the ability to remove a watch from the middle of
the list without hunting for it first.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
10 years agomini-os/xenbus: Change type of xenbus_event_queue
Ian Jackson [Fri, 20 Jun 2014 15:47:46 +0000 (16:47 +0100)]
mini-os/xenbus: Change type of xenbus_event_queue

We change xenbus_event_queue from a pointer typedef to a struct, for
two reasons:

1. In a moment we are going to want to extend this struct to include
   a minios scheduler wait queue.

2. We can replace the open-coded list with a MINIOS_STAILQ.

All the xenbus users need to call the new initialisation function
instead of simply initialising the struct to NULL, and have their
parameter type changed.

There is a functional side-effect: now we are using a tail queue,
rather than a tailless queue, we insert events at the end rather than
the beginning.  So watch events now come out in chronological order,
rather than their order possibly being scrambled in the queue.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
10 years agomini-os/xenbus: Add missing locks to xb_write
Ian Jackson [Wed, 11 Jun 2014 12:35:28 +0000 (13:35 +0100)]
mini-os/xenbus: Add missing locks to xb_write

xb_write was missing any locking against concurrent calls.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
10 years agomini-os: Provide <mini-os/queue.h>
Ian Jackson [Wed, 11 Jun 2014 12:18:09 +0000 (13:18 +0100)]
mini-os: Provide <mini-os/queue.h>

Upstream (xen.git) minios has MINIOS_{,S}{LIST,TAILQ}_* (eg,
MINIOS_LIST_INSERT).  rumpuser-xen has {,S}{LIST,TAILQ}_* (eg,
LIST_INSERT) because it can #include <sys/queue.h>.

We want to try to make this code upstreamable (or at least no less
upstreamable than it already is).

So provide <mini-os/queue.h> which provides MINIOS_* in terms of
<sys/queue.h>.  That allows us to use MINIOS_* in the bulk of minios.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
10 years agomini-os: Make some headers more rumpkernel-friendly
Ian Jackson [Wed, 18 Jun 2014 13:27:47 +0000 (14:27 +0100)]
mini-os: Make some headers more rumpkernel-friendly

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
10 years agocallmain: Split up command line into separate arguments for main()
Ian Jackson [Thu, 19 Jun 2014 15:45:48 +0000 (16:45 +0100)]
callmain: Split up command line into separate arguments for main()

We understand '' and "" quoting, with \-escapes for ' and ", like a
shell would.  (Of course we don't interpolate ` or $ in "".)

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
10 years agocallmain: Provide a default app_main which calls main()
Ian Jackson [Wed, 28 May 2014 16:10:12 +0000 (17:10 +0100)]
callmain: Provide a default app_main which calls main()

This allows the linking of programs which expect a conventional main().
For now we pass the command line as a single argument.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
10 years ago.gitignore: Ignore things generated by build
Ian Jackson [Mon, 9 Jun 2014 15:35:51 +0000 (16:35 +0100)]
.gitignore: Ignore things generated by build

Including the subtrees cloned adhoc.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
10 years agoupdate buildrump.sh for new rumpsrc revison
Ian Jackson [Fri, 20 Jun 2014 13:56:46 +0000 (14:56 +0100)]
update buildrump.sh for new rumpsrc revison

10 years agoneed subr.sh before we can source it
Antti Kantee [Sun, 22 Jun 2014 12:45:24 +0000 (12:45 +0000)]
need subr.sh before we can source it

10 years agoupdate nblibs (openssl 1.0.1h)
Antti Kantee [Wed, 18 Jun 2014 13:27:22 +0000 (13:27 +0000)]
update nblibs (openssl 1.0.1h)

10 years agoupdate buildrump.sh (for improved subr.sh::docheckout)
Antti Kantee [Tue, 17 Jun 2014 18:07:17 +0000 (18:07 +0000)]
update buildrump.sh (for improved subr.sh::docheckout)