]> xenbits.xensource.com Git - people/liuw/rumprun.git/log
people/liuw/rumprun.git
10 years agoxen: introduce xenevt device wip.xenevt
Wei Liu [Mon, 20 Apr 2015 16:35:54 +0000 (17:35 +0100)]
xen: introduce xenevt device

Expose a userspace event channel device so that applications can use
Xen's event channel machinery.

Signed-off-by: Wei Liu <liuw@liuw.name>
10 years agoxen/events: locking for some operations
Wei Liu [Tue, 21 Apr 2015 14:27:11 +0000 (15:27 +0100)]
xen/events: locking for some operations

Signed-off-by: Wei Liu <liuw@liuw.name>
10 years agoxen/events: add a wrapper for event channel op hypercall
Wei Liu [Wed, 22 Apr 2015 15:51:19 +0000 (16:51 +0100)]
xen/events: add a wrapper for event channel op hypercall

Signed-off-by: Wei Liu <liuw@liuw.name>
10 years agoxen/events: clear handler and data when unbinding all ports
Wei Liu [Tue, 21 Apr 2015 10:32:08 +0000 (11:32 +0100)]
xen/events: clear handler and data when unbinding all ports

Signed-off-by: Wei Liu <liuw@liuw.name>
10 years agoxen/events: fix code formatting
Wei Liu [Mon, 20 Apr 2015 16:36:14 +0000 (17:36 +0100)]
xen/events: fix code formatting

Signed-off-by: Wei Liu <liuw@liuw.name>
10 years agoxen/events: move notify_remote_via_evtchn to minios namespace
Wei Liu [Wed, 22 Apr 2015 16:30:32 +0000 (17:30 +0100)]
xen/events: move notify_remote_via_evtchn to minios namespace

Signed-off-by: Wei Liu <liuw@liuw.name>
10 years agoxen/events: clean up events.h
Wei Liu [Tue, 21 Apr 2015 14:49:24 +0000 (15:49 +0100)]
xen/events: clean up events.h

Avoid having undeclared stuff in header.

Signed-off-by: Wei Liu <liuw@liuw.name>
10 years agoxen: cast to spinlock_t in spin_lock_init
Wei Liu [Tue, 21 Apr 2015 14:47:13 +0000 (15:47 +0100)]
xen: cast to spinlock_t in spin_lock_init

Otherwise gcc won't compile this piece of code.

Signed-off-by: Wei Liu <liuw@liuw.name>
10 years agoxen: add a driver init function
Wei Liu [Thu, 23 Apr 2015 16:40:04 +0000 (17:40 +0100)]
xen: add a driver init function

Signed-off-by: Wei Liu <liuw@liuw.name>
10 years agoxen: slightly change the macro to generate dev info
Wei Liu [Fri, 17 Apr 2015 17:38:20 +0000 (18:38 +0100)]
xen: slightly change the macro to generate dev info

No functional change.

Signed-off-by: Wei Liu <liuw@liuw.name>
10 years agoxen/xenbus: fix two DPRINTFs
Wei Liu [Thu, 23 Apr 2015 16:13:34 +0000 (17:13 +0100)]
xen/xenbus: fix two DPRINTFs

Signed-off-by: Wei Liu <liuw@liuw.name>
10 years agotest that exit() instead of return-from-main works
Antti Kantee [Wed, 6 May 2015 22:20:49 +0000 (22:20 +0000)]
test that exit() instead of return-from-main works

10 years agoFix bug that caused mayhem if a program called exit()
Antti Kantee [Wed, 6 May 2015 21:52:37 +0000 (21:52 +0000)]
Fix bug that caused mayhem if a program called exit()

Essentially, we did not signal the rumprun main thread that a program
has exited.  Fix this by running the signalling code in a pthread
cleanup handler instead of when main() returns (which it obviously
never does in case someone calls {_,}exit())

10 years agodo the build lithmus test the new way
Antti Kantee [Wed, 6 May 2015 10:30:13 +0000 (10:30 +0000)]
do the build lithmus test the new way

10 years agog/c old cruft
Antti Kantee [Wed, 6 May 2015 10:07:09 +0000 (10:07 +0000)]
g/c old cruft

Tester mode is now selected at execute-time via args, so we can g/c the
old RUMPRUN_TEST=no method.

10 years agofor test programs, assume interactive mode unless "__test" is given
Antti Kantee [Wed, 6 May 2015 10:05:21 +0000 (10:05 +0000)]
for test programs, assume interactive mode unless "__test" is given

10 years agopass rumprun command line to qemu stack
Antti Kantee [Wed, 6 May 2015 09:57:56 +0000 (09:57 +0000)]
pass rumprun command line to qemu stack

10 years agoUse RUMP_CURLWP=__thread on baremetal
Antti Kantee [Wed, 6 May 2015 09:49:52 +0000 (09:49 +0000)]
Use RUMP_CURLWP=__thread on baremetal

Hold back on Xen until TLS works in our 32bit guests.

10 years agog/c unused size parameter from adjustgs()
Antti Kantee [Wed, 6 May 2015 09:19:36 +0000 (09:19 +0000)]
g/c unused size parameter from adjustgs()

10 years agoMake full address space accessible via %gs
Antti Kantee [Wed, 6 May 2015 09:16:59 +0000 (09:16 +0000)]
Make full address space accessible via %gs

Since we access gs both forwards and backwards, this seems to be
the only option.  At least it fixes tls with qemu -enable-kvm.

10 years agoMake sure we adjust the gs segment to be large enough.
Antti Kantee [Tue, 5 May 2015 20:55:18 +0000 (20:55 +0000)]
Make sure we adjust the gs segment to be large enough.

After fixing the which essentially ignored the size of the gs segment
entirely, we did not accommodate for things at >=0 offsets from %gs.

10 years agoAllocate extra space in TLS for the stack protector canary.
Antti Kantee [Tue, 5 May 2015 20:53:46 +0000 (20:53 +0000)]
Allocate extra space in TLS for the stack protector canary.

It's difficult to catch all the places where -fno-stack-protector
is required, so at least ensure that the stack protector doesn't
dereference random garbage.

10 years agoRevert "Use __thread for rump kernel curlwp."
Antti Kantee [Tue, 5 May 2015 17:10:36 +0000 (17:10 +0000)]
Revert "Use __thread for rump kernel curlwp."

It does not work with qemu -enable-kvm (for whatever to-be-debugged
reason).

This reverts commit d82d40bece9ff9fe8a47483dd177c351dba86faf.

10 years agotest that the &-operator works with __thread
Antti Kantee [Tue, 5 May 2015 14:07:41 +0000 (14:07 +0000)]
test that the &-operator works with __thread

10 years agoDo not assume that area to adjustgs() is <64k.
Antti Kantee [Tue, 5 May 2015 14:03:23 +0000 (14:03 +0000)]
Do not assume that area to adjustgs() is <64k.

10 years agoReload gs register in baremetal-private adjustgs()
Antti Kantee [Tue, 5 May 2015 14:01:44 +0000 (14:01 +0000)]
Reload gs register in baremetal-private adjustgs()

Xen will require using the update_descriptor() hypercall.

10 years agoStore the TLS block location (variant II)
Antti Kantee [Tue, 5 May 2015 13:59:11 +0000 (13:59 +0000)]
Store the TLS block location (variant II)

Now anything taking the address of a __thread variable also works.

10 years agoadd missing CPPFLAGS to compiler invocation
Antti Kantee [Tue, 5 May 2015 09:29:41 +0000 (09:29 +0000)]
add missing CPPFLAGS to compiler invocation

10 years ago__PAGE_SIZE must be ULL on x32
Antti Kantee [Tue, 5 May 2015 07:10:13 +0000 (07:10 +0000)]
__PAGE_SIZE must be ULL on x32

Otherwise Mini-OS page table calculations overflow and result in garbage.
Debugged by @liuw.

Fixes the problem I introduced in
eadc73fa85f0921dd926e657b12bf730c3a0024b

10 years agoinitialize xen printf at the start of bootstrap
Antti Kantee [Mon, 4 May 2015 17:08:22 +0000 (19:08 +0200)]
initialize xen printf at the start of bootstrap

10 years agouse bmk_vsnprintf instead of libc
Antti Kantee [Mon, 4 May 2015 16:49:39 +0000 (16:49 +0000)]
use bmk_vsnprintf instead of libc

10 years agog/c no-longer-needed prototype
Antti Kantee [Mon, 4 May 2015 13:03:48 +0000 (13:03 +0000)]
g/c no-longer-needed prototype

10 years agoUse __thread for rump kernel curlwp.
Antti Kantee [Mon, 4 May 2015 08:47:31 +0000 (08:47 +0000)]
Use __thread for rump kernel curlwp.

The implication is that TLS must be supported.  It is supported (or at
least should be) on everything else except 32bit Xen due to the lack of
the ability to test the change.

10 years agodisable stack protector until we get it supported
Antti Kantee [Mon, 4 May 2015 07:31:44 +0000 (07:31 +0000)]
disable stack protector until we get it supported

10 years agomake buildtests.sh take the same platform argument as build-rr.sh
Antti Kantee [Sun, 3 May 2015 11:57:19 +0000 (11:57 +0000)]
make buildtests.sh take the same platform argument as build-rr.sh

10 years agoSpecifying -D no longer implies -p
Antti Kantee [Sat, 2 May 2015 13:52:18 +0000 (13:52 +0000)]
Specifying -D no longer implies -p

This is issue #5 comment timeout, so I'll just go ahead and change it.

10 years agofflush(stdout) after main returns
Antti Kantee [Sat, 2 May 2015 11:28:34 +0000 (11:28 +0000)]
fflush(stdout) after main returns

In case something is in the line buffer, it will now be
printed before "main returned ..."

10 years agodescend into crypto
Antti Kantee [Thu, 30 Apr 2015 16:01:27 +0000 (16:01 +0000)]
descend into crypto

10 years agoremove obsolete header
Antti Kantee [Thu, 30 Apr 2015 15:36:04 +0000 (15:36 +0000)]
remove obsolete header

10 years agouse <bmk-rumpuser/rumpuser.h>
Antti Kantee [Thu, 30 Apr 2015 15:35:48 +0000 (15:35 +0000)]
use <bmk-rumpuser/rumpuser.h>

10 years agoremove obsolete app.c
Antti Kantee [Thu, 30 Apr 2015 15:34:27 +0000 (15:34 +0000)]
remove obsolete app.c

10 years agoadd a simple -lcrypto test
Antti Kantee [Thu, 30 Apr 2015 15:34:06 +0000 (15:34 +0000)]
add a simple -lcrypto test

10 years agomake sure rumprun_platform_rumpuser_init() returns success
Antti Kantee [Thu, 30 Apr 2015 12:44:41 +0000 (12:44 +0000)]
make sure rumprun_platform_rumpuser_init() returns success

10 years agoremove now-empty xen/rumphyper_base.c
Antti Kantee [Thu, 30 Apr 2015 12:27:13 +0000 (12:27 +0000)]
remove now-empty xen/rumphyper_base.c

10 years agoremove now-empty baremetal/rumpuser.c
Antti Kantee [Thu, 30 Apr 2015 12:26:44 +0000 (12:26 +0000)]
remove now-empty baremetal/rumpuser.c

10 years agopush rumpuser_getrandom() into libbmk_rumpuser
Antti Kantee [Thu, 30 Apr 2015 12:23:13 +0000 (12:23 +0000)]
push rumpuser_getrandom() into libbmk_rumpuser

10 years agoUse bmk_platform_clock_monotonic() in both rnd implementations.
Antti Kantee [Thu, 30 Apr 2015 12:19:51 +0000 (12:19 +0000)]
Use bmk_platform_clock_monotonic() in both rnd implementations.

And no, this default implementation is still not very random.

10 years agoNo need for weak aliases with app_main().
Antti Kantee [Thu, 30 Apr 2015 10:50:12 +0000 (10:50 +0000)]
No need for weak aliases with app_main().

It's always the routine which calls rumprun_boot() and rumprun().

10 years agoremove <bmk/app.h>, it's unnecessary
Antti Kantee [Thu, 30 Apr 2015 10:46:40 +0000 (10:46 +0000)]
remove <bmk/app.h>, it's unnecessary

10 years agoprovide a typedef for mainlike funcions and also a prototype for main
Antti Kantee [Thu, 30 Apr 2015 10:46:06 +0000 (10:46 +0000)]
provide a typedef for mainlike funcions and also a prototype for main

10 years agoremember to add boot.c
Antti Kantee [Thu, 30 Apr 2015 10:41:21 +0000 (10:41 +0000)]
remember to add boot.c

10 years agoKill <bmk/sched.h>
Antti Kantee [Thu, 30 Apr 2015 10:36:30 +0000 (10:36 +0000)]
Kill <bmk/sched.h>

Since we don't have a platform-specific scheduler anymore, everything
should just use <bmk-core/sched.h>

10 years agobmk_init -> bmk_cons_clear
Antti Kantee [Thu, 30 Apr 2015 10:26:29 +0000 (10:26 +0000)]
bmk_init -> bmk_cons_clear

Also, we don't need to call it in multiboot(), since we already need
to call it in early bootstrap to properly deliver the "no multiboot"
message if necessary.

10 years agoallow alternative console implementations, not just the vga console
Antti Kantee [Thu, 30 Apr 2015 10:20:41 +0000 (10:20 +0000)]
allow alternative console implementations, not just the vga console

10 years agoShuffle bits so that multiboot isn't *the* way to boot.
Antti Kantee [Thu, 30 Apr 2015 10:17:20 +0000 (10:17 +0000)]
Shuffle bits so that multiboot isn't *the* way to boot.

10 years agosprinkle license/copyright
Antti Kantee [Thu, 30 Apr 2015 08:51:49 +0000 (08:51 +0000)]
sprinkle license/copyright

[ci skip]

10 years agoMerge pull request #11 from DerangedMonkeyNinja/posix-memalign-fix
Antti Kantee [Wed, 29 Apr 2015 19:52:19 +0000 (19:52 +0000)]
Merge pull request #11 from DerangedMonkeyNinja/posix-memalign-fix

Update authors file

10 years agoUpdate authors file
Timmons C. Player [Wed, 29 Apr 2015 19:43:36 +0000 (15:43 -0400)]
Update authors file

10 years agoMerge pull request #10 from DerangedMonkeyNinja/posix-memalign-fix
Antti Kantee [Wed, 29 Apr 2015 18:52:04 +0000 (18:52 +0000)]
Merge pull request #10 from DerangedMonkeyNinja/posix-memalign-fix

Fix transposed arguments in posix_memalign

10 years agoFix transposed arguments in posix_memalign
Timmons C. Player [Wed, 29 Apr 2015 15:48:49 +0000 (11:48 -0400)]
Fix transposed arguments in posix_memalign

10 years agoRevert "attempt #1 of migrating to sudo-less travis"
Antti Kantee [Wed, 29 Apr 2015 13:07:41 +0000 (13:07 +0000)]
Revert "attempt #1 of migrating to sudo-less travis"

Nope.  Both xen-dev and qemu-kvm are not allowed packages in the
sudoless env.

This reverts commit e53c81aea787ecadb3cd158038ae1463e0a6f84b.

10 years agoattempt #1 of migrating to sudo-less travis
Antti Kantee [Wed, 29 Apr 2015 13:00:14 +0000 (13:00 +0000)]
attempt #1 of migrating to sudo-less travis

10 years agorun the buildtests.sh script, which also tests ./configure
Antti Kantee [Wed, 29 Apr 2015 12:45:06 +0000 (12:45 +0000)]
run the buildtests.sh script, which also tests ./configure

XXX: we need to get rid of the billion different ways to indicate
platform/baremetal ("baremetal", "bmk", "qemu", ...)

10 years agoDo not build tests by default in platform libs.
Antti Kantee [Wed, 29 Apr 2015 12:43:28 +0000 (12:43 +0000)]
Do not build tests by default in platform libs.

"make tests" can be specified explicitly.  It will build and run
the tests.

10 years agoadd a "buildtests" script, which also runs ./configure
Antti Kantee [Wed, 29 Apr 2015 12:42:37 +0000 (12:42 +0000)]
add a "buildtests" script, which also runs ./configure

10 years agofix pasto
Antti Kantee [Wed, 29 Apr 2015 12:41:05 +0000 (12:41 +0000)]
fix pasto

10 years agoclean also "configure" directory with "make clean"
Antti Kantee [Wed, 29 Apr 2015 12:37:44 +0000 (12:37 +0000)]
clean also "configure" directory with "make clean"

10 years agoCheck that ./configure finds "sigaction"
Antti Kantee [Wed, 29 Apr 2015 12:28:56 +0000 (12:28 +0000)]
Check that ./configure finds "sigaction"

10 years agoAdd an unconditionally run "buildtest"
Antti Kantee [Wed, 29 Apr 2015 12:22:10 +0000 (12:22 +0000)]
Add an unconditionally run "buildtest"

Makes sure that just typing "make" attempts to link at least one
unikernel and expose really obvious problems with changes.

10 years agoSet APP_TOOLS_CC.
Antti Kantee [Wed, 29 Apr 2015 11:50:50 +0000 (11:50 +0000)]
Set APP_TOOLS_CC.

Now consumers of this Makefile can use $APP_TOOLS_CC after
including this Makefile.

10 years agoForce the common libs to always be built.
Antti Kantee [Wed, 29 Apr 2015 10:04:31 +0000 (10:04 +0000)]
Force the common libs to always be built.

And by "always be built" I mean force the top-level build process to
consult the respective Makefiles to determine if the libs should be
rebuilt or not.

10 years agoLimit rump kernel memory allotment to a hard upper limit.
Antti Kantee [Wed, 29 Apr 2015 09:42:58 +0000 (09:42 +0000)]
Limit rump kernel memory allotment to a hard upper limit.

This is a temporary hack to avoid the kernel trying to eat hundreds of
megs for caches.

10 years agoPush rumpuser_getparam() implementation to common libbmk_rumpuser
Antti Kantee [Wed, 29 Apr 2015 09:23:44 +0000 (09:23 +0000)]
Push rumpuser_getparam() implementation to common libbmk_rumpuser

It is mostly for the benefit of the upcoming memory allocation revamp.

10 years agounify rumpuser_getparam() between platforms
Antti Kantee [Wed, 29 Apr 2015 09:21:15 +0000 (09:21 +0000)]
unify rumpuser_getparam() between platforms

10 years agoUse bmk_printf instead of minios_printk.
Antti Kantee [Wed, 29 Apr 2015 09:16:11 +0000 (09:16 +0000)]
Use bmk_printf instead of minios_printk.

Plus minor formatting in the call to printf (so minor it doesn't
deserve a separate commit)

10 years agoAdd bmk_platform_memsize() and replace use of homegrown variants.
Antti Kantee [Wed, 29 Apr 2015 09:14:27 +0000 (09:14 +0000)]
Add bmk_platform_memsize() and replace use of homegrown variants.

10 years agouse errnos
Antti Kantee [Wed, 29 Apr 2015 08:54:57 +0000 (08:54 +0000)]
use errnos

10 years agopanic only when panicking
Antti Kantee [Wed, 29 Apr 2015 08:47:15 +0000 (08:47 +0000)]
panic only when panicking

10 years agoinclude correct header
Antti Kantee [Tue, 28 Apr 2015 22:14:23 +0000 (22:14 +0000)]
include correct header

10 years agodon't return an error for an internal invariant failure
Antti Kantee [Tue, 28 Apr 2015 21:47:31 +0000 (21:47 +0000)]
don't return an error for an internal invariant failure

10 years agoAdd a example .json config file (so that I don't lose it)
Antti Kantee [Tue, 28 Apr 2015 20:40:17 +0000 (20:40 +0000)]
Add a example .json config file (so that I don't lose it)

This will be superceded by autogeneration by the rumprun utility
in the future.

10 years agosupport static ip configuration
Antti Kantee [Tue, 28 Apr 2015 20:37:56 +0000 (20:37 +0000)]
support static ip configuration

10 years agoMount a 1MB tmpfs on /tmp by default.
Antti Kantee [Tue, 28 Apr 2015 14:00:34 +0000 (14:00 +0000)]
Mount a 1MB tmpfs on /tmp by default.

Prevents silly interactions with rumpfs for programs that write to /tmp.

10 years agoinclude tmpfs in the standard mix
Antti Kantee [Tue, 28 Apr 2015 13:59:31 +0000 (13:59 +0000)]
include tmpfs in the standard mix

10 years agoCall main with passed command line instead of hardcoded one.
Antti Kantee [Tue, 28 Apr 2015 08:53:06 +0000 (08:53 +0000)]
Call main with passed command line instead of hardcoded one.

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