Commit Graph

32 Commits

Author SHA1 Message Date
pooka
c21ac41b0b Sneeze some locking into connect/disconnect. 2010-11-24 11:40:24 +00:00
pooka
9be034428c Support physio for remote processes.
==> add support for remote vmspace vmapbuf/vunmapbuf
  ==> add proper support for copyin/out_vmspace
    ==> add support for remote vmspace uvm_io
      ==> add support for non-curproc rumpuser_sp_copyin/out
        ==> store remote context in vm_map->pmap instead of
            pthread_specificdata

In short, makes read/write of most (all?) block devices work from
a remote rump client via rump syscalls.
2010-11-22 20:42:19 +00:00
pooka
ad5cf5ab43 squelch the compiler whine 2010-11-19 17:47:44 +00:00
pooka
a2b42bab81 Support multithreaded clients and fix a few bugs. 2010-11-19 17:09:44 +00:00
pooka
b82590c0a3 delint 2010-11-19 15:40:55 +00:00
pooka
52f22b2c6a Start working on making the syscall proxy code threadsafe. The
basics are there, but a few more tweaks are needed.  The reason
I'm committing it now is that the code was mindnumbingly boring to
write (no wonder it took me almost 3 years to get it done), and I
might burn it if it's not in a safe place.
2010-11-19 15:25:49 +00:00
pooka
48257b3e61 free syscall data after use 2010-11-17 17:36:14 +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
ac0efea1ab Don't puff sigpipe if the connection has been severed. May happen
e.g. when a client executes a blocking call such a poll() and
decides to exit before the result is ready.
2010-11-10 16:12:15 +00:00
pooka
01eecd68eb Implement support for unix domain sockets (important especially
for testing since we don't want to depend on global resources such
as tcp ports).
2010-11-05 14:23:45 +00:00
pooka
13e503f148 Refactor the sysproxy code so that rumpuser contains only the server side. 2010-11-04 20:54:07 +00:00
pooka
5629968a95 Missed a few symbols in previous ...
Also, reorganize rumpuser header inclusion to make sure problem is
caught already by the compiler.
2010-11-01 13:55:19 +00:00
pooka
8fc7f9077e Make librumpuser linkage once again free of librump.
problem pointed out by <he>
2010-11-01 13:49:10 +00:00
pooka
f128c061ef Run different clients (different sockets) in different processes
inside the rump kernel.  Now different host processes can no longer
step on each other inside the rump kernel.
2010-10-28 14:37:29 +00:00
pooka
b1842c2201 Start rework of system call proxying over socket ("sysproxy").
This incarnation is written in the user namespace as opposed to
the previous one which was done in kernel namespace.  Also, rump
does all the handshaking now instead of excepting an application
to come up with the user namespace socket.

There's still a lot to do, including making code "a bit" more
robust, actually running different clients in a different process
inside the kernel and splitting the client side library from librump.
I'm committing this now so that I don't lose it, plus it generally
works as long as you don't use it in unexcepted ways: i've tested
ifconfig(8), route(8), envstat(8) and sysctl(8).
2010-10-27 20:44:49 +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
46ea1019d6 Allow loading the symbols from objects which are not directly mapped
into memory, namely the main object (i.e. map->l_addr is NULL).
2010-06-08 15:32:55 +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
9970bb9e64 Support KTHREAD_JOINABLE/kthread_join(). Also fixes earlier bug
where all pthreads were created non-detached.
2010-05-31 23:09:29 +00:00
pooka
b1b7862792 Make it possible to use the scheduler lock as the rumpuser condvar
interlock.  This is applicable in cases where the actual interlock
is the CPU the currently running thread is scheduled on.  Borrowing
the scheduler lock as the mutex mandated by pthread_cond_wait()
does away with need to have an additional mutex.  This both optimizes
runtime execution and simplifies code, as the extra lock typically
lead to quite some trickeries to avoid the dungeon collapsing due
to zaps from the wand of deadlock.
2010-05-18 14:58:41 +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
1019474331 Wrap DOCALL and DOCALL_KLOCK in a new block (for easy adding of
debug prints before them.

XXX: can't use the standard do-while0 because lint doesn't like it.
2010-03-22 09:39:02 +00:00
pooka
c2efc59235 During bootstrap, process all modinfos in a DSO in one go. Get
rid of dependency tricks, since they are no longer necessary.
2010-03-05 18:47:49 +00:00
pooka
15a168ac89 Join today's manpage mania by updating this to reflect the current
situation a "little" better.
2010-03-01 17:20:44 +00:00
pooka
510a73e003 Introduce RUMP_COMPONENT. It behaves mostly like a simplified
module which is linked into the kernel and cannot be unloaded.
The main purpose is to get the proper constructors run and create
any /dev nodes necessary for said component.  Once more of the
kernel (e.g. networking stack and device drivers) are converted to
MODULE and devfs pops up from somewhere, rump components can be
retired.
2010-03-01 13:12:19 +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
pooka
bdf6e0b034 Install rump libraries and utilities to the base system and remove the
private non-installed build infrastructure from sys/rump.

breakdown of commit:
  * install relevant headers into /usr/include/rump
  * build sys/rump/librump/rumpuser and sys/rump/librump/rumpkern
    from src/lib and install as librumpuser and librump, respectively
    + this retains the ability to test a librump build with just the
      kernel sources at hand
  * move sys/rump/fs/lib/libukfs and sys/rump/fs/lib/libp2k to src/lib
    for general consumption, they are not kernel-space dwellers anyway
  * build and install sys/rump/fs/lib/lib$fs as librumpfs_$fs
  * add chapter 3 manual pages for rump, rumpuser, ukfs and p2k
  * build and install userspace kernel file system daemons if MKPUFFS=yes
    is spexified
  * retire fsconsole for now, it will make a comeback with an actually
    implemented version shortly
2008-07-29 13:17:40 +00:00