Commit Graph

43 Commits

Author SHA1 Message Date
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 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 831d6eeb05 RUMPUSER_OPEN_DIRECT is no longer necessary 2013-04-29 13:21:03 +00:00
pooka 696d8241ab changes to bio hypercalls, part 3/n:
retire the filemmap/memsync hypercalls, they're no longer used
2013-04-29 13:19:11 +00:00
pooka 262a3aaf9f Rework how the bio hypercalls work, part 1/n:
Reduce the set of hypercalls to one: "do block i/o".  This not only
eliminates a lot of pseudo-duplicate code, it also gives the
hypervisor a lot more freedom on how to optimize the i/o.
2013-04-29 12:56:03 +00:00
pooka 5e41922b25 don't need event.h here anymore 2013-04-28 13:39:13 +00:00
pooka a53a2a5357 Improve the time-related hypercalls so that's it's possible to
sleep until an absolute time on the host's monotonic clock (should
something like that be supported).
2013-04-28 13:17:24 +00:00
pooka ad45a6e694 make the file monitoring hypercalls private to shmif 2013-04-28 10:43:45 +00:00
pooka b985b935c6 The ioctl hypercall is used only by the usb host controller driver,
so make it exclusive to that component.  I'm happy to see it gone.
2013-04-28 09:58:11 +00:00
pooka 9dd496792d make the random hypercall more generic 2013-04-27 16:56:29 +00:00
pooka 439ef2016c * treat kern_malloc.c as an unreal allocator (it's so lightweight)
* get rid of the rumpuser_realloc() hypercall
* pass size to rumpuser_free()
2013-04-27 15:34:53 +00:00
pooka c05fab5d36 rumpuser_poll() is used only by sockin, so make the hypercall
private to that component.
2013-04-27 15:01:21 +00:00
pooka 93b95ff6a0 * integrate rumpuser_getversion() with the hypervisor initialization
* rename some identifiers to better match reality
2013-04-27 14:59:08 +00:00
pooka ac8531a7b9 Terminate result of readlink(). Makes writefilewatch_setup() work in
cases when the buffer doesn't accidentally contain suitable zeroes.

Thanks to Juan RP who debugged this with me!
2013-03-18 21:00:52 +00:00
pooka 4adce8f663 Use the /proc way for counting host cores on Cygwin. 2013-01-14 21:04:15 +00:00
pooka 44ba88ce59 .. and make it compile on said platforms. 2013-01-10 19:14:12 +00:00
pooka a8f9daedd7 Provide an implementation of writewatchfile for platforms without kqueue
or inotify (it's a rather simple implementation ;)
2013-01-10 19:13:04 +00:00
pooka 1f06a056c7 FreeBSD and DragonFly also provide hosts cpus via sysctl hw.ncpu. 2012-12-14 10:48:48 +00:00
pooka 9a4570ee22 Apparently MAP_ANON mmap() on Linux requires MAP_PRIVATE to be specified
for the addr parameter to have a sane effect.  Make it so.
2012-12-13 15:35:09 +00:00
pooka 6530621714 Fixes for Solarisa. 2012-11-18 19:29:40 +00:00
pooka 2b783d7193 Check return value of ftruncate(). Some versions of gcc give
warnings if I don't.
2012-11-14 09:22:58 +00:00
pooka edf42f21f8 Implement the writewatchfile routines for a Linux hypervisor. As a
result, the shmif network driver now works when hosted on Linux.
2012-10-10 11:15:57 +00:00
pooka 8b5f6f3669 Do not assume that O_FOO flags have matching values in the rump kernel
and hypervisor.
2012-09-14 16:29:21 +00:00
pooka c62329f7d3 Make librumphijack compile and work on Linux. Do not try to hijack
calls which are not supported on Linux and therefore cannot be
handled by the rump kernel side syscall emulation (not that they'd
be present in the calling binaries anyway).
2012-08-25 18:00:06 +00:00
pooka 3b3ffd7039 Once again, make the rump kernel hypercall layer work on Linux. 2012-07-27 09:09:05 +00:00
abs 9e66e6d75e Update old-style definitions to ANSI, remove a couple of register
definitions along the way. Fixed gcc 4.1 build (thank you vax)
2012-06-25 22:32:43 +00:00
tls f27d6532f5 Remove arc4random() and arc4randbytes() from the kernel API. Replace
arc4random() hacks in rump with stubs that call the host arc4random() to
get numbers that are hopefully actually random (arc4random() keyed with
stack junk is not).  This should fix some of the currently failing anita
tests -- we should no longer generate duplicate "random" MAC addresses in
the test environment.
2011-11-28 08:05:05 +00:00
pooka 15fa3c8c84 Support query of the partition size in case underlying device is
a wedge.  This still lacks the proplibistic query of the sector
size and just assumes 512.  It's good that we make asking a file's
size as simple as requiring one stat(), one open() and three (3)
different ioctls plus some proplist mumbojumbo.  I'm surprised it's
available at all by means other than #wish.

code mostly from Taylor R Campbell, rant from me.
2011-02-06 21:05:53 +00:00
pooka 112941441d happiness is a quiet lint 2011-01-22 14:22:10 +00:00
pooka 3cc5cc6884 include pid of rump server in hostname 2011-01-20 15:00:12 +00:00
pooka de27b28026 Fix fd leak also in non-NetBSD code path. 2011-01-05 09:43:00 +00:00
wiz aff1729a2c Fix fdleak in error case. Found by cppcheck. 2011-01-05 00:09:43 +00:00
pooka e9e1ac535f Make int *error and optional parameter (i.e. it can be NULL).
Sometimes the caller just doesn't care which errno close() might
throw.
2010-11-15 15:23:32 +00:00
pooka a5e213b348 * if kevent() fails with EINTR, try again instead of returning an error
* stuff rumpuser_dprintf to stderr instead of stdout
2010-08-11 10:25:59 +00:00
pooka 451e6b4882 Version rumpuser ABI with a lightweight mechanism. 2010-06-09 14:08:17 +00:00
pooka 3f4944e6bb Add the ability to specify a preferred address the "map anon memory"
hypercall.
2010-06-09 11:35:36 +00:00
pooka ae456b5717 Check return value of posix_memalign ... always helpful to not return
garbage memory in case of failure.
2010-06-02 18:15:35 +00:00
pooka e3c273abc1 Don't pass "canfail" down to rumpuser_malloc -- there's quite little
we can do with that info way down there.  Instead, pass alignment.
Implement rumpuser_malloc() with posix_memalign().
2010-06-01 20:11:33 +00:00
pooka db171f695e Add rumpuser interface to fetch number of host cpus. 2010-04-28 00:33:45 +00:00
pooka a08942d291 Actually, support rumpuser_kill() only on NetBSD, since signal
numbers may not match on non-NetBSD hosts.
2010-04-21 11:16:41 +00:00
pooka 3cc6a65772 Add rumpuser_kill, which sends a signal to a host process. 2010-04-21 11:13:29 +00:00
pooka 6e4a9f9133 librumpuser is not _KERNEL code and does not belong in sys. Move
the source files from src/sys/rump/librump/rumpuser to src/lib/librumpuser
(from where it is already built).  Even so, keep rumpuser.h in
sys/rump/include for kernel source tree self-containment.
2010-02-26 18:54:20 +00:00