__attribute__((constructor)) to determine which rump kernel components
and kernel modules are linked into the rump kernel. If not defined
(default), use the regular approach with link sets.
This option is aimed to fix problems with toolchains where using link
sets is not possible because the linker does not generate the requisite
__start/__stop symbols for the link set sections (e.g. GNU gold, OS X, ...).
the separate rumpkern_time component. Keeping time-related routines
elsewhere lead to some illogical behavior if you didn't think of linking
in rumpkern_time (hands up everyone who checks the return value of
nanosleep()).
Add warnings if rumpkern_time is linked or used. I'll remove it in a
month or two instead of now since it was part of a buildrump.sh snapshot
and it's nicer if trying to use it gives a warning instead of an error
in the next snapshot.
"everything should be as modular as possible, but no more modular than that"
staggering impact on performance. When running sendto() in a loop,
the improvement is 200k more calls per second with an inlined __thread
curlwp as opposed to the default. In other words, it shaves off hundreds
of CPU cycles per call (~20%). Even just eliminating the x86_curlwp()
call in favor of an inline gives an improvement of 60k calls per second.
rump kernel" clauses from bsd.own.mk to Makefile.rump. Also,
add a rump_nativeabi_p() call to determine if rump kernel is
compiled with native ABI support.
kern.rawpartition sysctl support to rump kernel.
Moved the sysctl support that is shared between rump and normal
kernels to init_sysctl_base.c as rump cannot use init_sysctl.c
in order to avoid code duplication. Agreed with pooka@.
I'm also quite sure nobody ever really wanted to use it.
Change the "raise" sigmodel to include the rump kernel PID in the call
to rumpuser_kill(). The purpose is to provide some hint for non-POSIX
platforms which don't sport signals and multiplex many clients in a
single address space.
While this is technically an ABI change, see above. Also, since
rumpuser_kill() was not documented, I'll just claim I'm fixing a bug in
the implementation (and will be sure to document the interface correctly
very soon).
Add arch/generic and move non-x86 files from rumpkern/ there. Also,
move files from arch/i386 to arch/x86, and make both i386 and x86_64
use those.
This clarifies the situation with what is MD vs. MI code.
renames:
rumpcpu_generic,kobj_stubs,pmap_stubs => arch/generic/rump_generic_$x
arch/i386/* => arch/x86/rump_x86_$x
(for those who forget, x86 requires MD code because rump kernels
use the same ABI as kernel modules)
__HAVE_MINIMAL_EMUL, we simply look up the values from p->p_emul->e_errno.
For ports which cannot afford to keep an extra pointer per emul structure
around, we hope there is __HAVE_SYSCALL_INTERN support and thread the
errno values through p_emuldata. Notably, we cannot alter the syscall
method like most ports do with syscall_intern, since they do it via
p_mdproc, so MI code is not possible there.
them out accidentally in rev 1.30.
... not that they do much in rump kernels which are always
run-to-completion, but maybe there's some driver debugging value.
local syscall entry points. The wrapper is now so big that it doesn't
get inlined (original intent for having it close to the entry points),
and autogenerating a regular function just loses in flexibility.
rndsink(9):
- Simplify API.
- Simplify locking scheme.
- Add a man page.
- Avoid races in destruction.
- Avoid races in requesting entropy now and scheduling entropy later.
Periodic distribution of entropy to sinks reduces the need for the
last one, but this way we don't need to rely on periodic distribution
(e.g., in a future tickless NetBSD).
rndsinks_lock should probably eventually merge with the rndpool lock,
but we'll put that off for now.
cprng(9):
- Make struct cprng_strong opaque.
- Move rndpseudo.c parts that futz with cprng guts to subr_cprng.c.
- Fix kevent locking. (Is kevent locking documented anywhere?)
- Stub out rump cprng further until we can rumpify rndsink instead.
- Strip code to grovel through struct cprng_strong in fstat.
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.
This is a clever trick to enable me to avoid having to document
that interface. I seriously doubt it's relevant beyond a POSIX
env where it's required by the proplib client-side implementation
which expects it can do munmap() on a return value from a proplib
call.
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)
where a spin mutex is used as an argument to cv_wait(). Plus, it
would be good to sprinkle some asserts to make sure that the cpu
context is not released while holding on to a spin mutex. All in
all, should not be difficult, but needs careful testing and bravery
(the scheduler will bite your legs off).
It's then the hypervisor's problem to translate it accordingly.
Now we no longer have to worry about the kernel having to know the
hypervisor's time and vice versa.
a spin mutex (i.e. does not relinquish cpu context while trying to
take the mutex).
Bump the hypercall interface version number. I'll be doing a bunch
of other cleanups to simplify the interface for the benefit of
alternative hypervisor implementations. I'll be riding this bump
and doing a second one only after I'm finished with all of the
changes.
get processed. This applies to ones which were linked statically.
Unfortunately, that's where it got a bit tricky, since the dlsym()
interface searches the handle and all its dependencies. For the main
object the list of dependencies includes all the dynamic rump kernel
components that were included when the binary is linked. So, a long
story short, make only one pass through the objects to harvest all the
component entries, weed out the dupes, and initialize components from
an in-memory dupe-free list when so requested.
Rump kernels with only local clients have it easy, since they have to
support at most two syscall vectors (some calls such as mount/unmount
can be made only through the "native" NetBSD vector). Remote clients
are a whole different tin of green beans. This change addresses local
clients only.
pass memory for vmem structs into the initialization function and
do away with the static pool of vmem structs.
remove special bootstrapping of the quantum cache pools of the kmem_va_arena
as memory for pool_caches is allocated via pool_allocator_meta which is
fully operational at this point.
pass memory for vmem structs into the initialization functions and
do away with the static pools for this.
factor out the vmem internal structures into a private header.
remove special bootstrapping of the kmem_va_arena as all necessary memory
comes from pool_allocator_meta wich is fully operational at this point.