Commit Graph

203 Commits

Author SHA1 Message Date
pooka b3e8687dfb more platform-specific qualifiers 2013-09-10 17:58:39 +00:00
pooka 6cd40f3fba Install rumpuser_port.h 2013-09-10 16:51:24 +00:00
pooka e9fe155c86 Change the default value of rump kernels CPUs to 2. It used to be
the number of host cores, but that value is overkill for most uses,
especially with massively multicore hosts.  Dozens of useless virtual
CPUs are relatively speaking expensive in terms of bootstrap time and
memory footprint.  On the other end of the spectrum, defaulting to 2
might shake out some bugs from the qemu test runs.
2013-08-14 08:29:25 +00:00
pooka f3adf1e54f comment polish: just musl 2013-07-30 18:56:03 +00:00
pooka aaf7a23bf7 Decide ET_DYN behavior based on __GLIBC__ instead of __linux__,
e.g. musl libc doesn't follow glibc behavior.

per discussions with a number of people
2013-07-30 18:48:51 +00:00
njoly f2bb7e6625 Use <major>.<minor> for NetBSD version. 2013-07-22 12:36:56 +00:00
pooka 3fcbbf6450 TIMEVAL_TO_TIMESPEC (for musl)
from Justin Cormack
2013-07-22 08:58:31 +00:00
pooka 40fd6d6fa3 Fixes when compiling against musl libc.
from Justin Cormack via private email
2013-07-20 18:46:15 +00:00
pooka f768d01c4f Fix build where compiler can throw an array-bounds error and
code is built with NDEBUG
	or
	platform's assert is not __dead
2013-07-18 12:28:26 +00:00
pooka 69c4f929cd FreeBSD does the Solaris-like map->l_addr boogie.
from Ben Gras
2013-06-04 15:17:28 +00:00
wiz 890db9708a More markup, less typos. 2013-05-15 22:09:32 +00:00
pooka 03395b4cf5 also, bsd.own.mk to pick up mk.conf 2013-05-15 20:47:20 +00:00
pooka 5666bf4b73 Make it possible for external parties to specify additional dplibs.
This is useful for example on platforms which require -ldl.
2013-05-15 20:27:00 +00:00
pooka 907ce8379e Improve documentation on the locking order of cv_wait mtx/cpu. 2013-05-15 17:53:09 +00:00
pooka 3306a659de Add a generalized rumpuser_syncfd() call which allows the caller
to request a sync or a barrier for fd.
2013-05-15 15:57:01 +00:00
pooka 601de6b09f Pass off_t over the hypercall interface as int64_t to avoid potential
problems in setups where off_t doesn't want to be 64bit.

I'm already excitedly waiting for 128bit off_t and _LARGE_LARGE_FILES
2013-05-15 14:58:24 +00:00
pooka 15dc8bf975 Pass enums over the hypercall interface as ints to avoid some
pathological scenarios from arising in setups where enums might be
of a different size in the rump kernel and hypervisor.
2013-05-15 14:52:49 +00:00
pooka d0d5069c1a Add RUMPUSER_LWP_CLEAR instead of overloading RUMPUSER_LWP_SET.
This simplifies some alternative hypervisor implementations.
2013-05-15 14:07:26 +00:00
pooka af9586a1db need the rw_downgrade/tryupgrade methods too 2013-05-07 16:40:31 +00:00
pooka c0e1ad2997 update to recent interface changes 2013-05-07 15:37:05 +00:00
pooka 059f8df6f9 include stdint.h before rumpuser.h (on some platforms it doesn't get
there automagically)
2013-05-07 15:18:35 +00:00
pooka 302678cea5 Initialize rw->downgrade when allocating a rwlock.
should/might/etc fix recent test hangs reported by martin & pgoyette
2013-05-05 12:27:38 +00:00
wiz 1747869c0f Fix some punctuation nits and bump date for previous. 2013-05-03 20:27:16 +00:00
pooka cfbb87e05b Support proper rw_downgrade() semantics. 2013-05-03 00:23:49 +00:00
pooka 92e27cb3c3 reorder for better locality. no functional change. 2013-05-02 22:07:57 +00:00
pooka f448fededb update for previous change 2013-05-02 21:47:12 +00:00
pooka 5606f9bf46 Ok, maybe using int64 for nanoseconds in the (sec,nsec) tuple was
a bit too future-proof.  I think long is enough there (let's just
hope nobody redefines "nano").  Also, make seconds signed just in
case someone wants their clock to be in 1901.
2013-05-02 21:45:28 +00:00
pooka f950fd3d52 Push rwlock upgrade and downgrade into the hypervisor where there's
at least a chance to implement them with minimal fuss.
2013-05-02 21:35:19 +00:00
pooka 9a6702d07c Retry enabling spin mutexes. We should be able to avoid poking the
scheduler by just making wakeup from cv_wait() honor the same locking
order as when a spin mutex is acquired though mutex_enter().
*fingers crossed*
2013-05-02 20:33:54 +00:00
pooka 939c69c331 Inform the rump kernel hypervisor of valid thread contexts so
that the implementation can allocate and release storage for them
in an optimal fashion, if necessary.
2013-05-02 19:14:59 +00:00
pooka 5fe33bdc4b Clear rwlock's "writer" field when releasing the lock. Otherwise it might
have been possible for "readers" to reach visibility before "writer"
when another CPU took the lock, thus leading the previous owner to
incorrectly think that it still owned the lock in rw_write_held().

Also, remove duplicate clause from assert().
2013-05-02 16:49:08 +00:00
pooka 75af291e99 add HISTORY 2013-05-02 15:32:19 +00:00
pooka 47795d39b6 expand the intended usage of rumpuser_open() 2013-05-02 12:27:08 +00:00
pooka a4068b6249 avoid Wunused on !NetBSD 2013-05-01 17:17:54 +00:00
pooka aed84d6b35 document the hypercall interface 2013-04-30 21:18:40 +00:00
pooka 152588e3a9 Flip parameter order in the clock hypercalls to make them consistent
with everything else wrt in/out parameters.
2013-04-30 16:03:44 +00:00
pooka 6601e4ea9f put optional modules on a separate SRCS line 2013-04-30 15:48:29 +00:00
pooka 2e5a2855bd make this build/work again 2013-04-30 13:37:03 +00:00
pooka c46eb786b4 In kthread_create(), pass the priority and cpu index down to the
rump kernel hypervisor (though the current implementation doesn't take
advantage of them).
2013-04-30 13:29:28 +00:00
pooka be085dcd72 Translate error codes between the hypervisor and rump kernel. 2013-04-30 12:39:20 +00:00
pooka 8f668dabd5 Some systems don't provide preadv/pwritev (hi Solaris!), so implement
that with lseek + readv/writev instead (and avoid rewinding the
pointer with soon-to-be documentation).
2013-04-30 11:26:26 +00:00
pooka 32a34307fa Make hypercall calling conventions consistent: iff a hypercall can fail,
it returns an int containing the error value.
2013-04-30 00:03:52 +00:00
pooka 0dc3609e1c Reduce hypercalls related to reading to essentially an amalgamation
of readv and preadv.  ditto for writing.  Hypercalls are so seldomly
used that it doesn't justify 3x the calls for syntactic sugar.
2013-04-29 20:08:48 +00:00
pooka 86c3d1928f Make rumpuser_dl_bootstrap() optional for platforms which don't
provide dynamic linking.
2013-04-29 18:00:19 +00:00
pooka 810cff61f8 Replace the various "get info from hypervisor" interfaces with one
unified rumpuser_getparam(), and make it return a plist.  The
contents can come e.g. from the env or a config file.  Make
identifiers starting with an underscore denote system identifiers
which must be implemented by hypervisor. (yea, j/k about the plist bit)
2013-04-29 17:31:05 +00:00
pooka 25df76591e The fsync hypercall is now used only with close, so get rid of it.
rumpuser_bio() should do the necessary syncing.
2013-04-29 15:40:38 +00:00
pooka 9dda4d8626 Give private hypercalls the ability to meddle with kthread contexts too. 2013-04-29 15:20:05 +00:00
pooka a15e077982 Create a kernel thread context for the bio upcalls. 2013-04-29 14:54:03 +00:00
pooka 5af3856aee Make the rump kernel upcalls which were previous available only to
the sysproxy module available for the entire hypervisor.
2013-04-29 14:51:39 +00:00
pooka f134f09680 set default bio mode to threaded 2013-04-29 13:57:46 +00:00