]> xenbits.xensource.com Git - people/liuw/rumprun.git/log
people/liuw/rumprun.git
10 years agoparse & store command line as argc+argv
Antti Kantee [Tue, 28 Apr 2015 08:52:29 +0000 (08:52 +0000)]
parse & store command line as argc+argv

10 years agoPush xen/parseargs() to librumprun_base as rumprun_parseargs().
Antti Kantee [Tue, 28 Apr 2015 07:38:08 +0000 (07:38 +0000)]
Push xen/parseargs() to librumprun_base as rumprun_parseargs().

10 years agoNits.
Antti Kantee [Tue, 28 Apr 2015 07:33:09 +0000 (07:33 +0000)]
Nits.

Make parseargs take a char *.
Minor formatting adjustments.

10 years agoFix bug in interrupt establish.
Antti Kantee [Tue, 28 Apr 2015 06:52:56 +0000 (06:52 +0000)]
Fix bug in interrupt establish.

When unmasking an interrupt, don't again mask others.

10 years agoInclude FFS and cd9660 drivers by default.
Antti Kantee [Mon, 27 Apr 2015 10:03:25 +0000 (10:03 +0000)]
Include FFS and cd9660 drivers by default.

10 years agoAlways use bmk_printf() instead of bmk_cons_puts().
Antti Kantee [Mon, 27 Apr 2015 09:54:32 +0000 (09:54 +0000)]
Always use bmk_printf() instead of bmk_cons_puts().

The former has the advantage of also appending to the dmesg buffer.
Retire the latter so that it does not get accidentally used.

10 years agosoftware stack -> unikernel
Antti Kantee [Sun, 26 Apr 2015 16:12:49 +0000 (16:12 +0000)]
software stack -> unikernel

[ci skip]

10 years agoSupport blk device mounts in rumpconfig.
Antti Kantee [Sun, 26 Apr 2015 13:32:58 +0000 (13:32 +0000)]
Support blk device mounts in rumpconfig.

The approach is slightly different than on xen, since here we have real
block device drivers instead of the etfs hack.  Therefore, we don't
specify etfs, instead we specify the real device name.

10 years agoupdate buildrump.sh
Antti Kantee [Sat, 25 Apr 2015 09:00:04 +0000 (09:00 +0000)]
update buildrump.sh

10 years agoupdate src-netbsd
Antti Kantee [Sat, 25 Apr 2015 08:59:51 +0000 (08:59 +0000)]
update src-netbsd

10 years agoSketch out what json-based rumpconfig would look like.
Antti Kantee [Fri, 24 Apr 2015 15:01:38 +0000 (15:01 +0000)]
Sketch out what json-based rumpconfig would look like.

Still missing quite a lot of features, but at least can select an
interface to config with dhcp.

10 years agoPass command line to rumprun_boot() and rumpconfig().
Antti Kantee [Fri, 24 Apr 2015 13:33:04 +0000 (13:33 +0000)]
Pass command line to rumprun_boot() and rumpconfig().

10 years agoAdd jsmn JSON parser to bmk-core.
Antti Kantee [Fri, 24 Apr 2015 13:22:08 +0000 (13:22 +0000)]
Add jsmn JSON parser to bmk-core.

One could debate whether we need it in bmk-core or rumprun-base, but
given that it's extremely small and the only external dependency is to
NULL (apart from size_t which I converted to unsigned long), we might
just as well put it into core and see if in-core uses pop up.

MIT licensed, from http://zserge.com/jsmn.html

10 years agoFix $OPT_SUDO to be '-S' instead of 'sudo'
Antti Kantee [Fri, 24 Apr 2015 06:34:25 +0000 (06:34 +0000)]
Fix $OPT_SUDO to be '-S' instead of 'sudo'

Maybe Xen tests will now finally work on buildbot ...

10 years agosupport \t in console output
Antti Kantee [Thu, 23 Apr 2015 22:20:50 +0000 (22:20 +0000)]
support \t in console output

10 years agoMake getrusage() a non-stub. It's still fictional, though.
Antti Kantee [Thu, 23 Apr 2015 16:14:03 +0000 (16:14 +0000)]
Make getrusage() a non-stub.  It's still fictional, though.

It still returns ENOTSUP, since the NetBSD clock bits that enable times()
to work have not yet been pulled up to src-netbsd.  I'm pushing this
now to allow for easy testing of times() with NetBSD HEAD.

10 years agoAdd -S / sudo also to rumpstop
Antti Kantee [Thu, 23 Apr 2015 14:37:02 +0000 (14:37 +0000)]
Add -S / sudo also to rumpstop

10 years agoAdd compat strong aliases for sigaction/sigprocmask.
Antti Kantee [Thu, 23 Apr 2015 13:14:41 +0000 (13:14 +0000)]
Add compat strong aliases for sigaction/sigprocmask.

These aliases are normally provided by assembly syscall wrappers,
so we do not get them automatically.

Required mostly for configure scripts, as noted by @liuw in
issue #9.

10 years agorequire the user to explicitly give -S for sudo also here
Antti Kantee [Thu, 23 Apr 2015 11:58:22 +0000 (11:58 +0000)]
require the user to explicitly give -S for sudo also here

10 years agoautomatically use sudo for running the tests
Antti Kantee [Thu, 23 Apr 2015 11:53:41 +0000 (11:53 +0000)]
automatically use sudo for running the tests

10 years agorequire -S for automated sudo
Antti Kantee [Thu, 23 Apr 2015 11:53:03 +0000 (11:53 +0000)]
require -S for automated sudo

10 years agouse sudo for xenstore-write
Antti Kantee [Thu, 23 Apr 2015 11:50:34 +0000 (11:50 +0000)]
use sudo for xenstore-write

10 years agodefine container_of iff not already visible via normal headers
Antti Kantee [Thu, 23 Apr 2015 11:37:45 +0000 (11:37 +0000)]
define container_of iff not already visible via normal headers

10 years agoFinalize test log via atexit() handler.
Antti Kantee [Wed, 22 Apr 2015 14:18:16 +0000 (14:18 +0000)]
Finalize test log via atexit() handler.

That way we get it even if the test program exit()'s

10 years agosupport -D/-p on qemu
Antti Kantee [Wed, 22 Apr 2015 14:17:51 +0000 (14:17 +0000)]
support -D/-p on qemu

10 years agoSketch out new interfaces for bootstrap/running programs.
Antti Kantee [Wed, 22 Apr 2015 11:19:09 +0000 (11:19 +0000)]
Sketch out new interfaces for bootstrap/running programs.

The system is "booted" using rumprun_boot().  The opposite of
rumprun_boot() is rumprun_reboot() (logically?)

Between rumprun_boot() and rumprun_reboot() individual applications may
be launched with rumprun() (async) and waited for with rumprun_wait().

Of course, bits for supporting >1 program are still missing, but at
least the sketch is there.

10 years agoUse rumprun_config() instead of a homegrown interface.
Antti Kantee [Wed, 22 Apr 2015 10:51:09 +0000 (10:51 +0000)]
Use rumprun_config() instead of a homegrown interface.

We still do hackish configuration, but at least we do something.

10 years agorumpuser-xen -> rumprun-xen
Antti Kantee [Wed, 22 Apr 2015 08:27:38 +0000 (08:27 +0000)]
rumpuser-xen -> rumprun-xen

10 years agoPrint something like the comment says
Antti Kantee [Wed, 22 Apr 2015 07:42:27 +0000 (07:42 +0000)]
Print something like the comment says

Now that it's possible ...

10 years agoPush userlevel init into the same module.
Antti Kantee [Wed, 22 Apr 2015 07:28:52 +0000 (07:28 +0000)]
Push userlevel init into the same module.

Keeps the namespace in kernel.c clean

10 years agoDon't build kernel-level sources with stack protector.
Antti Kantee [Tue, 21 Apr 2015 15:58:13 +0000 (15:58 +0000)]
Don't build kernel-level sources with stack protector.

Technically we should, but since __stack_chk_fail() currently always
comes from libc, things get a bit weird.

10 years agoBuild libs with minimal acceptable -W flags
Antti Kantee [Tue, 21 Apr 2015 15:36:21 +0000 (15:36 +0000)]
Build libs with minimal acceptable -W flags

(should add more)

10 years agoUse BMK_SCHED_BLOCK_INFTIME where appropriate
Antti Kantee [Tue, 21 Apr 2015 15:34:54 +0000 (15:34 +0000)]
Use BMK_SCHED_BLOCK_INFTIME where appropriate

10 years agoGive "sleep indefinitely" a name: BMK_SCHED_BLOCK_INFTIME.
Antti Kantee [Tue, 21 Apr 2015 15:31:16 +0000 (15:31 +0000)]
Give "sleep indefinitely" a name: BMK_SCHED_BLOCK_INFTIME.

10 years agofix -Wsign-compare
Antti Kantee [Tue, 21 Apr 2015 15:24:08 +0000 (15:24 +0000)]
fix -Wsign-compare

10 years agoremove unused variable
Antti Kantee [Tue, 21 Apr 2015 15:21:22 +0000 (15:21 +0000)]
remove unused variable

10 years agoOpen-code signal stubs a bit.
Antti Kantee [Tue, 21 Apr 2015 15:20:06 +0000 (15:20 +0000)]
Open-code signal stubs a bit.

Can later stuff some better emulation in there, if need be.

10 years agouse <bmk-core/null.h> and bmk_assert()
Antti Kantee [Tue, 21 Apr 2015 14:41:20 +0000 (14:41 +0000)]
use <bmk-core/null.h> and bmk_assert()

10 years agoWrite a for ever loop the normal way instead of with do { } while (1)
Antti Kantee [Tue, 21 Apr 2015 14:37:47 +0000 (14:37 +0000)]
Write a for ever loop the normal way instead of with do { } while (1)

10 years agomight as well say that mlockall() succeeds
Antti Kantee [Tue, 21 Apr 2015 14:34:39 +0000 (14:34 +0000)]
might as well say that mlockall() succeeds

10 years agoAllocate tls before adding thread onto thread list
Antti Kantee [Tue, 21 Apr 2015 13:39:44 +0000 (13:39 +0000)]
Allocate tls before adding thread onto thread list

Doesn't really matter with the current state of things, but it's
nevertheless quite common sense to first init and then publish.

10 years agoRename bmk_clock_*() to bmk_platform_clock_*()
Antti Kantee [Tue, 21 Apr 2015 13:00:18 +0000 (13:00 +0000)]
Rename bmk_clock_*() to bmk_platform_clock_*()

They are expected to be implemented by the underlying platform.

10 years agoremember to convert this curiously built bit too
Antti Kantee [Tue, 21 Apr 2015 12:47:36 +0000 (12:47 +0000)]
remember to convert this curiously built bit too

10 years agoupdate README
Antti Kantee [Tue, 21 Apr 2015 12:36:25 +0000 (12:36 +0000)]
update README

10 years agoRename librumprun_rumpuser to libbmk_rumpuser
Antti Kantee [Tue, 21 Apr 2015 12:34:59 +0000 (12:34 +0000)]
Rename librumprun_rumpuser to libbmk_rumpuser

Layeristically speaking, the common rumpuser bits run on top of bmk,
so the renamed name now also reflects reality (and matches the
header namespace).

10 years agoNo need for a readme saying that we can change the directory name.
Antti Kantee [Tue, 21 Apr 2015 12:31:14 +0000 (12:31 +0000)]
No need for a readme saying that we can change the directory name.

10 years agoRename the <bmk-base> header namespace to <rumprun-base>
Antti Kantee [Tue, 21 Apr 2015 12:30:05 +0000 (12:30 +0000)]
Rename the <bmk-base> header namespace to <rumprun-base>

This change indicates that the headers are for "userspace" level
consumers, and it also makes the header namespace match the name of
the library.

10 years agoRename librumprun_core to libbmk_core.
Antti Kantee [Tue, 21 Apr 2015 12:23:42 +0000 (12:23 +0000)]
Rename librumprun_core to libbmk_core.

It doesn't have anything to do with rumprun, but is at a lower layer of
abstraction, so let's just match the header namespace here.

10 years agoremove now-empty <mini-os/sched.h>
Antti Kantee [Tue, 21 Apr 2015 11:46:52 +0000 (11:46 +0000)]
remove now-empty <mini-os/sched.h>

10 years agoPush the now-equal sched.c's from platforms into rumprun_core.
Antti Kantee [Tue, 21 Apr 2015 11:41:55 +0000 (11:41 +0000)]
Push the now-equal sched.c's from platforms into rumprun_core.

10 years agoMake sched.c for baremetal & xen run purely on top of bmk-core
Antti Kantee [Tue, 21 Apr 2015 11:39:17 +0000 (11:39 +0000)]
Make sched.c for baremetal & xen run purely on top of bmk-core

Incidentally, the sched.c implementations are now 100% the same.

10 years agoCommon name for thread switch routine: bmk_platform_cpu_sched_switch().
Antti Kantee [Tue, 21 Apr 2015 11:35:34 +0000 (11:35 +0000)]
Common name for thread switch routine: bmk_platform_cpu_sched_switch().

Not sure if it can be unified, since it needs to handle the TLS context
switch, which is apparently slightly different in a virtualized env and
on bare metal, so keep the implementations separate for now.

10 years agoBootstrap scheduler the same way between xen and baremetal.
Antti Kantee [Tue, 21 Apr 2015 11:26:56 +0000 (11:26 +0000)]
Bootstrap scheduler the same way between xen and baremetal.

Get rid of the idle thread in Xen, it's no longer used.

10 years agoallow bmk_sched_init() to pass an arg to the main function
Antti Kantee [Tue, 21 Apr 2015 11:18:31 +0000 (11:18 +0000)]
allow bmk_sched_init() to pass an arg to the main function

10 years agoRevert "return correct value from -1/errno stub"
Antti Kantee [Mon, 20 Apr 2015 22:34:43 +0000 (22:34 +0000)]
Revert "return correct value from -1/errno stub"

This reverts commit fac52c22a17e07e5000283f5af81aa6347de31a7.

Ironically fixing the stub breaks too much stuff for now.

10 years agouse bmk_cpu_sched_current() from core
Antti Kantee [Mon, 20 Apr 2015 20:53:57 +0000 (20:53 +0000)]
use bmk_cpu_sched_current() from core

10 years agouse core for cpu-specific bits of thread creation
Antti Kantee [Mon, 20 Apr 2015 20:50:29 +0000 (20:50 +0000)]
use core for cpu-specific bits of thread creation

10 years agomake cpu_sched.c common for both x86 cpus
Antti Kantee [Mon, 20 Apr 2015 20:49:17 +0000 (20:49 +0000)]
make cpu_sched.c common for both x86 cpus

10 years agorename also amd64 cpu_sched.S to avoid .c naming collision
Antti Kantee [Mon, 20 Apr 2015 20:45:25 +0000 (20:45 +0000)]
rename also amd64 cpu_sched.S to avoid .c naming collision

10 years agoPush cpu-specific thread creation into core.
Antti Kantee [Mon, 20 Apr 2015 20:39:01 +0000 (20:39 +0000)]
Push cpu-specific thread creation into core.

Convert -baremetal.

10 years agorename to avoid collision with cpu_sched.c
Antti Kantee [Mon, 20 Apr 2015 20:33:45 +0000 (20:33 +0000)]
rename to avoid collision with cpu_sched.c

10 years agoMatch baremetal "curlwp" with xen
Antti Kantee [Mon, 20 Apr 2015 19:49:26 +0000 (19:49 +0000)]
Match baremetal "curlwp" with xen

i.e. store thread pointer at the end of the stack.  This is done
merely to minimize diffs for now, and will be fixed with tls.

10 years agoMake bmk_sched_init() jump from bootstrap thread to main thread.
Antti Kantee [Mon, 20 Apr 2015 15:21:55 +0000 (15:21 +0000)]
Make bmk_sched_init() jump from bootstrap thread to main thread.

Convert baremetal.

10 years agowrite to the console the standard way
Antti Kantee [Mon, 20 Apr 2015 14:37:08 +0000 (14:37 +0000)]
write to the console the standard way

10 years agomore sched.c diff reduction
Antti Kantee [Mon, 20 Apr 2015 14:15:34 +0000 (14:15 +0000)]
more sched.c diff reduction

10 years agoProvide bmk_sched_threadname() in both schedulers
Antti Kantee [Mon, 20 Apr 2015 14:06:32 +0000 (14:06 +0000)]
Provide bmk_sched_threadname() in both schedulers

10 years agounify timed sleeps in the scheduler
Antti Kantee [Mon, 20 Apr 2015 13:33:48 +0000 (13:33 +0000)]
unify timed sleeps in the scheduler

10 years agoUnify domain blocking part in scheduler implementations
Antti Kantee [Mon, 20 Apr 2015 13:26:52 +0000 (13:26 +0000)]
Unify domain blocking part in scheduler implementations

10 years agoadd a platform interface for putting the entire system to sleep
Antti Kantee [Mon, 20 Apr 2015 13:05:43 +0000 (13:05 +0000)]
add a platform interface for putting the entire system to sleep

10 years agosome trivial diff reduction
Antti Kantee [Mon, 20 Apr 2015 12:33:12 +0000 (12:33 +0000)]
some trivial diff reduction

10 years agoallocate thread stacks the same way on baremetal/xen
Antti Kantee [Mon, 20 Apr 2015 12:30:18 +0000 (12:30 +0000)]
allocate thread stacks the same way on baremetal/xen

10 years agopass stack size to bmk-core as page shift instead of size
Antti Kantee [Mon, 20 Apr 2015 12:28:06 +0000 (12:28 +0000)]
pass stack size to bmk-core as page shift instead of size

10 years agosprinkle with bmk_platform_splfoo() to reduce diffs with /xen
Antti Kantee [Mon, 20 Apr 2015 12:07:40 +0000 (12:07 +0000)]
sprinkle with bmk_platform_splfoo() to reduce diffs with /xen

10 years agouse bmk_platform_splfoo() instead of local ones
Antti Kantee [Mon, 20 Apr 2015 12:02:54 +0000 (12:02 +0000)]
use bmk_platform_splfoo() instead of local ones

10 years agoadd a platform interface for disabling/enabling interrupts
Antti Kantee [Mon, 20 Apr 2015 12:01:41 +0000 (12:01 +0000)]
add a platform interface for disabling/enabling interrupts

10 years agomake sched_switch() static
Antti Kantee [Mon, 20 Apr 2015 11:52:50 +0000 (11:52 +0000)]
make sched_switch() static

10 years agouse bmk_assert() instead of ASSERT()
Antti Kantee [Mon, 20 Apr 2015 11:21:41 +0000 (11:21 +0000)]
use bmk_assert() instead of ASSERT()

10 years agoput new threads at the end of the thread queue
Antti Kantee [Mon, 20 Apr 2015 10:54:50 +0000 (10:54 +0000)]
put new threads at the end of the thread queue

reduces diff with -xen

10 years agoAdd a scheduler debug routine for dumping the thread queue.
Antti Kantee [Mon, 20 Apr 2015 10:47:21 +0000 (10:47 +0000)]
Add a scheduler debug routine for dumping the thread queue.

10 years agoFix sched_yield() to actually yield.
Antti Kantee [Mon, 20 Apr 2015 10:24:25 +0000 (10:24 +0000)]
Fix sched_yield() to actually yield.

10 years agostop the test only if we started it
Antti Kantee [Mon, 20 Apr 2015 08:26:30 +0000 (08:26 +0000)]
stop the test only if we started it

10 years agoflag an internal error if it's not possible to run a test
Antti Kantee [Mon, 20 Apr 2015 08:20:39 +0000 (08:20 +0000)]
flag an internal error if it's not possible to run a test

10 years agoplain /bin/sh is enough
Antti Kantee [Mon, 20 Apr 2015 08:20:12 +0000 (08:20 +0000)]
plain /bin/sh is enough

10 years agoFix bug in condvar sleep.
Antti Kantee [Mon, 20 Apr 2015 07:59:51 +0000 (07:59 +0000)]
Fix bug in condvar sleep.

It caused "sleep indefinitely" to be the same as "wakeup immediately".

10 years agoEnsure that bmk_dmesg stays null-terminated.
Antti Kantee [Sun, 19 Apr 2015 16:51:44 +0000 (16:51 +0000)]
Ensure that bmk_dmesg stays null-terminated.

10 years agoStore printf output a "dmesg buffer"
Antti Kantee [Sun, 19 Apr 2015 16:06:54 +0000 (16:06 +0000)]
Store printf output a "dmesg buffer"

Currently, the easiest way to print the contents is to attach gdb
and from the gdb command prompt run: printf "%x", bmk_dmesg

10 years agoimplement rumpuser_putchar() in common code
Antti Kantee [Sun, 19 Apr 2015 16:05:58 +0000 (16:05 +0000)]
implement rumpuser_putchar() in common code

10 years agoallocate thread stacks with bmk_platform_allocpg2()
Antti Kantee [Sun, 19 Apr 2015 13:49:28 +0000 (13:49 +0000)]
allocate thread stacks with bmk_platform_allocpg2()

10 years agoforce rebuild
Antti Kantee [Sat, 18 Apr 2015 17:34:12 +0000 (17:34 +0000)]
force rebuild

10 years agoCache thread stack sized allocations.
Antti Kantee [Sat, 18 Apr 2015 16:42:16 +0000 (16:42 +0000)]
Cache thread stack sized allocations.

10 years agoDefine stack size in terms of 2^n multiple of page size.
Antti Kantee [Sat, 18 Apr 2015 16:27:36 +0000 (16:27 +0000)]
Define stack size in terms of 2^n multiple of page size.

Not that it makes much difference now, since a page is just a value.
But it gets us closer to what /xen is doing.

10 years agono need to cd to "tests" for runtests.sh anymore
Antti Kantee [Fri, 17 Apr 2015 15:02:24 +0000 (15:02 +0000)]
no need to cd to "tests" for runtests.sh anymore

10 years agosupport running runtests.sh from arbitrary dir
Antti Kantee [Fri, 17 Apr 2015 15:01:47 +0000 (15:01 +0000)]
support running runtests.sh from arbitrary dir

10 years agoreturn correct value from -1/errno stub
Antti Kantee [Thu, 16 Apr 2015 21:45:52 +0000 (21:45 +0000)]
return correct value from -1/errno stub

IIRC, this makes some functions accidentally work "more incorrectly",
but at least it appears to make times() not hang.

10 years agoadjust from wall clock to internal clock before sleeping
Antti Kantee [Thu, 16 Apr 2015 13:36:04 +0000 (13:36 +0000)]
adjust from wall clock to internal clock before sleeping

10 years agoRemove the old dogdb.sh script.
Antti Kantee [Thu, 16 Apr 2015 12:19:07 +0000 (12:19 +0000)]
Remove the old dogdb.sh script.

Use rumprun -D instead.  One way of doing things(tm)

10 years agoflush stdout before we close the backing fd
Antti Kantee [Thu, 16 Apr 2015 11:26:58 +0000 (11:26 +0000)]
flush stdout before we close the backing fd

10 years agobuild test programs with -g
Antti Kantee [Thu, 16 Apr 2015 11:26:21 +0000 (11:26 +0000)]
build test programs with -g

10 years agoseparate stubs which should return error or -1
Antti Kantee [Wed, 15 Apr 2015 10:10:31 +0000 (10:10 +0000)]
separate stubs which should return error or -1

10 years agoprint stub warnings to stderr
Antti Kantee [Wed, 15 Apr 2015 09:27:14 +0000 (09:27 +0000)]
print stub warnings to stderr