Commit Graph

2691 Commits

Author SHA1 Message Date
rtr
d575eb5454 * split PRU_PEERADDR and PRU_SOCKADDR function out of pr_generic()
usrreq switches and put into separate functions
  xxx_{peer,sock}addr(struct socket *, struct mbuf *).

    - KASSERT(solocked(so)) always in new functions even if request
      is not implemented

    - KASSERT(pcb != NULL) and KASSERT(nam) if the request is
      implemented and not for tcp.

* for tcp roll #ifdef KPROF and #ifdef DEBUG code from tcp_usrreq() into
  easier to cut & paste functions tcp_debug_capture() and
tcp_debug_trace()

    - functions provided by rmind
    - remaining use of PRU_{PEER,SOCK}ADDR #define to be removed in a
      future commit.

* rename netbt functions to permit consistency of pru function names
  (as has been done with other requests already split out).

    - l2cap_{peer,sock}addr()  -> l2cap_{peer,sock}_addr_pcb()
    - rfcomm_{peer,sock}addr() -> rfcomm_{peer,sock}_addr_pcb()
    - sco_{peer,sock}addr()    -> sco_{peer,sock}_addr_pcb()

* split/refactor do_sys_getsockname(lwp, fd, which, nam) into
  two functions do_sys_get{peer,sock}name(fd, nam).

    - move PRU_PEERADDR handling into do_sys_getpeername() from
      do_sys_getsockname()
    - have svr4_stream directly call do_sys_get{sock,peer}name()
      respectively instead of providing `which' & fix a DPRINTF string
      that incorrectly wrote "getpeername" when it meant "getsockname"
    - fix sys_getpeername() and sys_getsockname() to call
      do_sys_get{sock,peer}name() without `which' and `lwp' & adjust
      comments
    - bump kernel version for removal of lwp & which parameters from
      do_sys_getsockname()

note: future cleanup to remove struct mbuf * abuse in
xxx_{peer,sock}name()
still to come, not done in this commit since it is easier to do post
split.

patch reviewed by rmind

welcome to 6.99.47
2014-07-09 04:54:03 +00:00
pooka
b82b9c8f7f In addition to kernel/tools sources, include another selection of sources
useful for running application stacks on rump kernels.
2014-07-08 14:30:21 +00:00
rtr
ff90c29d04 * sprinkle KASSERT(solocked(so)); in all pr_stat() functions.
* fix remaining inconsistent struct socket parameter names.
2014-07-07 17:13:56 +00:00
rtr
909a1fc699 backout change that made pr_stat return EOPNOTSUPP for protocols that
were not filling in struct stat.

decision made after further discussion with rmind and investigation of
how other operating systems behave.  soo_stat() is doing just enough to
be able to call what gets returned valid and thus justifys a return of
success.

additional review will be done to determine of the pr_stat functions
that were already returning EOPNOTSUPP can be considered successful with
what soo_stat() is doing.
2014-07-07 15:13:21 +00:00
rtr
183fc9ab77 * have pr_stat return EOPNOTSUPP consistently for all protocols that do
not fill in struct stat instead of returning success.

* in pr_stat remove all checks for non-NULL so->so_pcb except where the
  pcb is actually used (i.e. cases where we don't return EOPNOTSUPP).

proposed on tech-net@
2014-07-07 07:09:58 +00:00
rtr
0f19919253 * split PRU_SENSE functionality out of sockin_usrreq() and place into
separate sockin_stat(struct socket *, struct stat *) function.
* change behavior of function to just return success (like pretty much
  every other implementation) instead of panic()ing due to lack of
  implementation.
2014-07-06 16:18:46 +00:00
rtr
0dedd9772f fix parameter types in pr_ioctl, called xx_control() functions and remove
abuse of pointer to struct mbuf type.

param2 changed to u_long type and uses parameter name 'cmd' (ioctl command)
param3 changed to void * type and uses parameter name 'data'
param4 changed to struct ifnet * and uses parameter name 'ifp'
param5 has been removed (formerly struct lwp *) and uses of 'l' have been
       replaced with curlwp from curproc(9).

callers have had (now unnecessary) casts to struct mbuf * removed, called
code has had (now unnecessary) casts to u_long, void * and struct ifnet *
respectively removed.

reviewed by rmind@
2014-07-01 05:49:18 +00:00
justin
dcada659bb Change assertion as rump_component_load may be called before curlwp available 2014-06-29 11:36:52 +00:00
pooka
8a90d6851a Initialize cpu_softcpu before creating softint threads. Fixes things
with rump kernel hypervisors which wrap the thread creation hypercall.

pointed out by Justin Cormack
2014-06-22 20:09:19 +00:00
rtr
d54d7ab24a * split PRU_CONTROL functionality out of xxx_userreq() switches and place
into separate xxx_ioctl() functions.
* place KASSERT(req != PRU_CONTROL) inside xxx_userreq() as it is now
  inappropriate for req = PRU_CONTROL in xxx_userreq().
* replace calls to pr_generic() with req = PRU_CONTROL with pr_ioctl().
* remove & fixup references to PRU_CONTROL xxx_userreq() function comments.
* fix various comments references for xxx_userreq() that mentioned
  PRU_CONTROL as xxx_userreq() no longer handles the request.

a further change will follow to fix parameter and naming inconsistencies
retained from original code.

Reviewed by rmind@
2014-06-22 08:10:18 +00:00
pooka
d6f42aa6f0 document RUMP_SYM_NORENAME 2014-06-20 12:36:31 +00:00
pooka
795967533e Some rump kernel components for interfacing with the environment need
to access both NetBSD kernel facilities and facilities provided by the
environment.

Where the environment's headers can be #included without namespace
conflict (which can be done - with care - for some Xen mini-os
headers), it is convenient to simply allow the rump kernel code to
call directly into the environment.

This also requires not mangling the symbol names.

So provide a variable RUMP_SYM_NORENAME which can be set by a component
namefile to a series of symbols or symbol prefixes (in makefile-quoted
awk regexp syntax).  For example, in the rumpuser-xen xenbus driver:
 RUMP_SYM_NORENAME=xenbus_|HYPERVISOR_|wake$$|block$$|schedule$$|force_evtchn

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
(proposed on rumpkernel-users; very minor modification by myself)
2014-06-20 11:57:56 +00:00
pooka
4799824b3f Fix error return for rump_vfs_makeonedevnode()
from Ian Jackson <Ian.Jackson@eu.citrix.com>
2014-06-20 11:27:25 +00:00
alnsn
9fc0501842 Revert last change. This is not the right place for rumpuser_sync_icache(). 2014-06-18 19:50:32 +00:00
alnsn
f6181a22c5 Antti objected to including rumpuser_sync_icache. Exclude it from the build. 2014-06-17 08:42:35 +00:00
alnsn
bb8c3186cb Implement rumpuser_sync_icache hypercall. 2014-06-17 06:31:47 +00:00
pooka
bb567b2891 Add cat, rpcgen and stat to TOOLS_BUILDRUMP. They're useful for
installing headers for the app stack cases that need it done, and small
enough to not matter for the kernel-only cases that don't.
2014-06-15 14:36:57 +00:00
pooka
db668d0723 update comment 2014-06-15 12:58:01 +00:00
pooka
e7f2e099a2 call config_create_mountrootthreads(), if applicable 2014-06-13 15:51:13 +00:00
pooka
a25813f127 Add rump_boot_etfs_register(), which can be used to specify etfs
nodes that will be available immediately when mountroot is done
and file systems are available.

The intended use is for example for firmware images to be available when
config_mountroot() hooks run.
2014-06-13 15:45:01 +00:00
pooka
a554de2109 make sure we don't underflow the memlimit 2014-06-13 11:53:48 +00:00
pooka
fed90df329 fill in a few more uvmexp entries 2014-06-13 11:48:56 +00:00
joerg
16691bd24e Regenerate 2014-06-12 21:42:26 +00:00
rmind
264c0a1580 Restore the assert in RUMP's softint_schedule_cpu() and just ensure
curcpu() in the caller.
2014-06-09 13:03:16 +00:00
rmind
63efbb4369 RUMP's softint_schedule_cpu: comment out an assert for now. 2014-06-08 15:24:34 +00:00
rmind
ebd0b29ba9 Make kpreempt_disabled() always return true in RUMP kernels for now.
May revisit once RUMP provides better splfoo/splx() handling.
2014-06-07 11:08:09 +00:00
rmind
60d350cf6d - Implement pktqueue interface for lockless IP input queue.
- Replace ipintrq and ip6intrq with the pktqueue mechanism.
- Eliminate kernel-lock from ipintr() and ip6intr().
- Some preparation work to push softnet_lock out of ipintr().

Discussed on tech-net.
2014-06-05 23:48:16 +00:00
rmind
06dd4db047 librump: add kpreempt_disabled(9) and softint_schedule_cpu(9). 2014-06-05 23:43:04 +00:00
rmind
9c5de97f11 librump: include pcq(9) interface. 2014-06-05 23:42:25 +00:00
joerg
b8fbec4871 Regen. 2014-06-03 21:16:37 +00:00
joerg
57f7a68562 Regen. 2014-06-03 19:30:48 +00:00
njoly
c2f72e5f92 Regen for utimes(2). 2014-05-29 10:42:23 +00:00
njoly
6ef574d8cc Ajust for compat linux utimes(2) change. 2014-05-29 10:41:48 +00:00
justin
129ca10eeb Add missing __diagused in rump code 2014-05-28 20:57:22 +00:00
pooka
77684a56d8 mvphy is not configured, so don't try to build it 2014-05-26 19:55:53 +00:00
pooka
bc09db942d Call biodone() in the bdev_strategy() error via a pointer. Decouples
subr_devsw from VFS -- not that I/O buffers are _VFS_ entities -- and
eliminates the last weak alias from librump, which means things now
fully work on glibc (w/o LD_DYNAMIC_WEAK) and musl.

The whole code path is suspect anyway, since nothing prevents the device
from escaping after the lookup, suggesting that the whole error path
should be handled by the caller, but oh well.
2014-05-25 16:31:51 +00:00
pooka
984f14ab1c Permissions work better if you specify them in octal ...
Also, do an explicit chmod of /tmp to account for cmask getting in the way.
2014-05-23 10:56:36 +00:00
pooka
7b9bf19905 create /tmp at bootstrap, default TMPDIR used by some programs (e.g. ed) 2014-05-22 12:31:28 +00:00
rmind
4ae03c1815 - Split off PRU_ATTACH and PRU_DETACH logic into separate functions.
- Replace malloc with kmem and eliminate M_PCB while here.
- Sprinkle more asserts.
2014-05-19 02:51:24 +00:00
rmind
37af0cc75d Fix RUMP build. 2014-05-18 17:57:44 +00:00
rmind
9cf83d0317 Fix RUMP build. 2014-05-18 14:03:26 +00:00
dholland
7de8c6f8a6 Move lfs_getpages and lfs_putpages to their own file. 2014-05-16 09:34:03 +00:00
pooka
75b2fca271 comment meets reality 2014-05-09 06:12:48 +00:00
hannken
42c8d67c49 Add a global vnode cache:
- vcache_get() retrieves a referenced and initialised vnode / fs node pair.
- vcache_remove() removes a vnode / fs node pair from the cache.

On cache miss vcache_get() calls new vfs operation vfs_loadvnode() to
initialise a vnode / fs node pair.  This call is guaranteed exclusive,
no other thread will try to load this vnode / fs node pair.

Convert ufs/ext2fs, ufs/ffs and ufs/mfs to use this interface.

Remove now unused ufs/ufs_ihash

Discussed on tech-kern.

Welcome to 6.99.41
2014-05-08 08:21:53 +00:00
njoly
fa686015bc Regen for pread/pwrite signature. 2014-05-04 10:31:10 +00:00
njoly
470da95e01 Adjust pread/pwrite signature to match reality. 2014-05-04 10:30:39 +00:00
pooka
30ef45d967 regen 2014-04-27 16:30:09 +00:00
pooka
ab08c00801 unsprinkle const to fix clang build. mmm, travis ci 2014-04-27 16:28:21 +00:00
pooka
0cafe662ce weak alias removal implication: rumpuser_dl_globalsym() can now sleep
with the fishes.
2014-04-27 15:18:59 +00:00
pooka
9251b8c304 Eliminate weak symbols from rump kernel syscall handlers, part 7:
Build component constructors which establish syscalls at boottime.
2014-04-27 15:15:13 +00:00
pooka
97a5db624d Eliminate weak symbols from rump kernel syscall handlers, part 6:
Generate component constructors which establish non-modular syscalls.
2014-04-27 15:13:57 +00:00
pooka
4d8864ed4f Eliminate weak symbols from rump kernel syscall handlers, part 5:
regen syscalls to eliminate weak aliases and link-time initialization
2014-04-27 15:11:22 +00:00
pooka
f7f79bc05e Eliminate weak symbols from rump kernel syscall handlers, part 4:
Do not query system call handlers by using the rumpuser_dl_globalsym()
hypercall -- it will not work in environments which are not in control
of their own symbols (e.g. rumpuser-xen).  Instead, provide
rump_syscall_boot_establish(), which component constructors can use
to establish their non-modular syscalls.
2014-04-27 15:08:52 +00:00
pooka
28fecddfbc Eliminate weak symbols from rump kernel syscall handlers, part 3:
Add a tool to autogenerate callbacks from components to establish system
call handlers for non-modular syscalls.
2014-04-27 15:05:30 +00:00
pooka
c09af715b5 don't invade the __toolchain namespace 2014-04-26 11:23:56 +00:00
pooka
cd5f3c7d0b Move a few stubs to where they really belong; allows us to create
them as strong instead of weak symbols.
2014-04-26 11:23:03 +00:00
pooka
99ad67a71c kill weak aliases which are no longer necessary 2014-04-26 11:17:55 +00:00
pooka
2cd42818a5 cpu_reboot() is more of an emul.c thing than a rump.c thing 2014-04-25 19:56:01 +00:00
pooka
21061bdf88 gardenize: function calls over #ifdefs 2014-04-25 18:31:35 +00:00
pooka
d6ce63669d gardenize rump.c: move data structure helper routines to accessors.c 2014-04-25 18:25:38 +00:00
pooka
10b8dd3fa2 gardenizing rump.c: move rump_lockdebug to locks.c 2014-04-25 18:13:59 +00:00
pooka
65637d8587 regen 2014-04-25 17:50:28 +00:00
pooka
645fbfa079 create multi-inclusion protectors; some compilers don't like duplicate typedefs 2014-04-25 17:50:01 +00:00
pooka
7028473ae3 Init function pointers to nullop() so that callers don't need a dance 2014-04-25 13:20:45 +00:00
pooka
4391c9d4fc g/c no longer necessary weak alias 2014-04-25 13:13:26 +00:00
pooka
a49c814657 regen for etfs move from rumpvfs to rumpkern 2014-04-25 13:11:47 +00:00
pooka
796b9a7a4e Move the etfs linkage from rumpvfs to rumpkern, and replace the
weak alias show with an honest pointer indirection.

No client-visible change. (apart from this version working e.g.
on musl w/ dlopen)
2014-04-25 13:10:42 +00:00
pooka
ddc2c52a0c Automatogically create a function pointer type for each interface. 2014-04-25 13:07:31 +00:00
pooka
d0e2f6013a Remove old HAVE_SUN_LD compat handling, it was there long enough. 2014-04-25 11:49:16 +00:00
pooka
0159a35e80 obsolete the installed <rump/scsitest.h> header and make it private
to tests/dev/scsipi
2014-04-25 00:24:39 +00:00
pooka
8fa17e4756 scsitest is a SCSI target emulator used by one test, and has little
reason to get installed.  Make the component private to the test using
it and obsolete the installed one.

IOW, rename sys/rump/dev/lib/libscsitest -> tests/dev/scsipi/libscsitest
2014-04-24 21:46:44 +00:00
pooka
e1b9adcc58 Make sleepq_wake() type void. The return value hasn't been used in
almost 6 years.  Even if it were, returning an arbitrary lwp is a bit
of a wonky interface and can really work only when expected == 1.
2014-04-24 12:04:28 +00:00
pooka
80733d752e in sleepq_wake(), honor the "expected" parameter 2014-04-24 11:56:11 +00:00
pooka
d6454414fd Add a RUMP_USE_CTOR compile-time switch. If defined, use
__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, ...).
2014-04-23 23:25:45 +00:00
pooka
afbb108620 domains are attached by module(-like) constructors, so no need to
play link_set games with them.
2014-04-23 17:05:18 +00:00
pooka
ee62fa6483 Include LIST_ENTRY() in "struct rump_component".
Main benefit: rump_component_load() can now be called from an
early-running constructor since the routine doesn't need to allocate
memory.
2014-04-23 16:17:55 +00:00
pooka
ad5b64f98f Reparent children of a dying lwproc. Fixes wpa_supplicant -B (and
most likely a bunch of other things).
2014-04-16 22:34:02 +00:00
pooka
db08ffef5a update to new pci_intr_string() 2014-04-15 13:47:06 +00:00
pooka
e9c74271a7 add multi-inclusion protection 2014-04-15 13:41:46 +00:00
pooka
9426d42dd4 build hypercalls if RUMP_PCI_USER is defined 2014-04-14 23:53:42 +00:00
pooka
d1e65a1e3d fix typo 2014-04-14 22:56:53 +00:00
pooka
5145f215c7 * make it possible for rumpcomp_pci_intr_establish() to know which
device it's establishing the interrupt for
* make it possible to implement bus_dmamem_map() properly
2014-04-14 21:43:00 +00:00
pooka
540fe34fd1 add necessary -I for /dev/pci* creation 2014-04-14 21:36:22 +00:00
pooka
fcfbee3413 be even more explicit about handling only bus 0 2014-04-14 21:34:08 +00:00
pooka
5ce7a9bfb7 Add a vacookie to busdma_segment, for potential help with bus_dmamem_map() 2014-04-14 21:31:00 +00:00
pooka
360bbc64e4 add some sort of bus_space_barrier() 2014-04-13 15:43:26 +00:00
pooka
78921906eb create /dev/pci device nodes 2014-04-13 12:40:00 +00:00
pooka
4699345b2b apparently DFLSSIZ isn't defined on powerpc, so pull a value out of el stetson 2014-04-12 20:24:46 +00:00
pooka
26a5a77234 remove obfuscation macros 2014-04-11 01:03:08 +00:00
pooka
d672154267 Pretend that we have slightly more reasonable stack size limits.
(we don't have stacks, that's why we pretend)
2014-04-10 22:14:03 +00:00
pooka
ef453332be add aio driver as rump kernel component 2014-04-10 00:09:08 +00:00
pooka
885b424da9 regen 2014-04-09 23:57:26 +00:00
pooka
9c11b5da42 implement lwp_create() and a few related interfaces.
main raison d'impalerment: the aio driver
2014-04-09 23:53:36 +00:00
pooka
8866e45838 initialize exec_lock 2014-04-09 23:49:27 +00:00
pooka
697e0f1b0e Add a rump kernel component for the iwn wireless driver, tested with
the one in my laptop:
iwn0 at pci0 dev 19 function 0: vendor 0x8086 product 0x4237 (rev. 0x00)
2014-04-07 01:45:36 +00:00
njoly
b831ef2db2 Regen. 2014-04-04 18:25:41 +00:00
njoly
faf91a83de Add support for timing syscalls. 2014-04-04 18:24:12 +00:00
njoly
28bcf177dd Add compat 50 time syscalls, needed by rump sys_linux. 2014-04-04 18:20:28 +00:00
pooka
ca29f7cc9e Add PCI components, commented out from the default build for now. 2014-04-04 14:49:40 +00:00
pooka
0d262cbdb0 Add a rump kernel component that can attach if_wm @ pci 2014-04-04 14:49:09 +00:00
pooka
59246fadca Add a rump kernel component for mii support and phy drivers. 2014-04-04 14:18:19 +00:00
njoly
744fc7ad3b No lint for rumpnet npf library. 2014-04-04 13:57:33 +00:00
pooka
69955dae56 Add a rump kernel component for the PCI bus. It works both in Xen DomU
(via Xen's PCI passthrough) and Linux userspace (via uio_pci_generic).
2014-04-04 12:53:59 +00:00
pooka
bfb81d5f44 make tags and handles long 2014-04-04 12:25:45 +00:00
christos
478a0b6f59 provide cpu_bootconf() 2014-04-04 01:35:11 +00:00
pooka
271d5dd119 use if_initname() instead of homegrown sprintf 2014-04-02 19:44:15 +00:00
pooka
dc8f80f5c3 Put nanosleep() and folks in librump instead of maintaining them in
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"
2014-04-02 19:37:17 +00:00
justin
95e41b89b5 Add Android support for rump kernel.
Reviewed by pooka@
2014-04-02 17:09:23 +00:00
christos
c1ae06abab kill sprintf 2014-03-20 20:42:08 +00:00
riastradh
6cb10275d0 Merge riastradh-drm2 to HEAD. 2014-03-18 18:20:35 +00:00
pooka
c310bd104c Trim alignment out of packet length before passing it up. 2014-03-18 18:10:08 +00:00
pooka
5102012c0e rename component.c -> md_component.c 2014-03-17 11:30:40 +00:00
pooka
85a5ecc11a Introduce RUMP_CURLWP compile option to select curlwp scheme.
Default is still "hypercall".
2014-03-16 15:31:03 +00:00
pooka
b6db800227 remove unnecesary verbosity: s/RUMP_CURLWP_MODEL/RUMP_CURLWP/ 2014-03-16 15:30:05 +00:00
pooka
6eb4d621cb note that it's a good idea to do a clean build if an option is changed 2014-03-16 14:47:47 +00:00
pooka
1e52cb3b60 document compile-time options for rump kernels 2014-03-16 14:33:22 +00:00
pooka
3ca2bbc18a fix tyop 2014-03-16 14:14:40 +00:00
pooka
8a0d17b921 Allow RUMP_LDSCRIPT itself to be used to specify which ldscript to use.
HAVE_SUN_LD will be deprecated in the future.
2014-03-16 14:02:06 +00:00
njoly
15c344842f When trying to extend a file, don't wait until the underlying memory
allocation succeed. Return ENOSPC upon failure.
2014-03-16 10:16:15 +00:00
dholland
a68f9396b6 Change (mostly mechanically) every cdevsw/bdevsw I can find to use
designated initializers.

I have not built every extant kernel so I have probably broken at
least one build; however I've also found and fixed some wrong
cdevsw/bdevsw entries so even if so I think we come out ahead.
2014-03-16 05:20:22 +00:00
pooka
b31d33154d Use uniprocessor-optimized locking in RUMP_LOCKS_UP=yes (default: no) 2014-03-15 15:22:42 +00:00
pooka
35bcd6f8af Allow compile-time optimizations to curlwp. This can have a pretty
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.
2014-03-15 15:15:26 +00:00
pooka
b649a59f0c Remember to bump revision for the "int my time VIF_DYING" change yesterday. 2014-03-14 10:06:22 +00:00
pooka
41e29f6bc7 Add rumpkern_time for nanosleep, clock_gettime, setitimer, etc. 2014-03-14 01:02:34 +00:00
pooka
c9bffc6f73 regen: time/timer related syscalls for rump kernels 2014-03-14 00:56:37 +00:00
pooka
bfdd7f7dd6 No reason to attach if_virt as a RUMP_COMPONENT(), simply use MODULE(). 2014-03-13 21:11:12 +00:00
pooka
253367bf89 remove unnecessary header inclusions 2014-03-13 20:59:12 +00:00
pooka
c284920659 allow VIF_DYING() implementation to protest 2014-03-13 20:55:26 +00:00
pooka
be1e2f2afe Rename rumpcomp_user.c -> virtif_user.c
Convert to new-style RUMPCOMP_USER_SRCS in Makefile.
2014-03-13 18:14:13 +00:00
pooka
3d3f829e6e rename component.c -> netinet6_component.c 2014-03-13 02:08:44 +00:00
pooka
c26312e1c9 rename component.c -> bridge_component.c 2014-03-13 02:08:24 +00:00
pooka
8e9b788b4d rename component.c -> shmif_component.c 2014-03-13 02:08:04 +00:00
pooka
5c81644c6d rename component.c -> netinet_component.c 2014-03-13 02:07:42 +00:00
pooka
6f134b415a rename component.c -> npf_component.c 2014-03-13 02:07:24 +00:00
pooka
d9186bd3ba rename component.c -> agr_component.c 2014-03-13 02:07:03 +00:00
pooka
9fa21880a4 rename component.c -> net_component.c 2014-03-13 02:06:32 +00:00
pooka
2531d6c274 rename component.c -> netbt_component.c 2014-03-13 02:06:16 +00:00
pooka
ab22d87541 rename component.c -> sockin_component.c 2014-03-13 02:05:49 +00:00
pooka
a2cb21d6b1 rename component.c -> netmpls_component.c 2014-03-13 02:05:29 +00:00
pooka
6427e8d3c9 rename component.c -> local_component.c 2014-03-13 02:04:59 +00:00
pooka
e73b6747ac rename component.c -> sys_sunos_component.c 2014-03-13 02:04:14 +00:00
pooka
d9edc94bdf rename component.c -> sys_linux_component.c 2014-03-13 02:03:47 +00:00
pooka
4ef595eb8a rename component.c -> sys_cygwin_component.c 2014-03-13 02:03:16 +00:00
pooka
e9fb1375a8 rename component.c -> tty_component.c 2014-03-13 02:02:30 +00:00
pooka
fba5e42d84 rename component.c -> bpf_component.c 2014-03-13 02:01:04 +00:00
pooka
04df77c163 rename component.c -> fss_component.c 2014-03-13 01:59:05 +00:00
pooka
0a5f0aa049 rename component.c -> scsitest_component.c 2014-03-13 01:58:46 +00:00
pooka
7e72c4558e rename component.c -> scsipi_component.c 2014-03-13 01:58:20 +00:00
pooka
3bae975740 rename component.c -> audio_component.c 2014-03-13 01:57:52 +00:00
pooka
bc6163d6d2 rename component.c -> netsmb_component.c 2014-03-13 01:57:29 +00:00
pooka
13ad9d6c84 rename component.c -> drvctl_component.c 2014-03-13 01:56:55 +00:00
pooka
3c1768175c rename component.c -> umass_component.c 2014-03-13 01:54:59 +00:00
pooka
82319721de rename component.c -> dm_component.c 2014-03-13 01:54:22 +00:00
pooka
518e3e163c rename component.c -> putter_component.c 2014-03-13 01:53:48 +00:00
pooka
19164addcf rename component.c -> pud_component.c 2014-03-13 01:53:04 +00:00
pooka
0e3e572aea rename component.c -> rnd_component.c 2014-03-13 01:52:37 +00:00
pooka
ea2e453cb6 rename component.c -> pad_component.c 2014-03-13 01:52:04 +00:00
pooka
7a69fdf49d rename component.c -> opencrypto_component.c 2014-03-13 01:51:30 +00:00
pooka
7e38394a91 rename component.c -> cgd_component.c 2014-03-13 01:50:51 +00:00
pooka
bd7cc621b8 rename component.c -> raidframe_component.c 2014-03-13 01:49:59 +00:00
pooka
da5f0878ad rename component.c -> wscons_component.c 2014-03-13 01:48:08 +00:00
pooka
408eb8f3d8 rename component.c -> sysmon_component.c 2014-03-13 01:47:07 +00:00
pooka
26ec820c34 rename component.c -> zfs_component.c 2014-03-13 01:46:10 +00:00
pooka
c195be46f9 rename component.c -> syspuffs_component.c 2014-03-13 01:45:33 +00:00
pooka
d1665e5a2e rename rumpcomp_user.* -> shmif_user.* 2014-03-13 01:42:59 +00:00
pooka
00328592e2 rename rumpcomp_user.* -> sockin_user.* 2014-03-13 01:40:30 +00:00
pooka
121efaacc1 rename rumpcomp_user.* -> ugenhc_user.* 2014-03-13 01:38:11 +00:00
pooka
9cb7eaee42 Allow multiple "rumpcomp_user" source modules to be specified by
introducing RUMPCOMP_USER_SRCS.  Make RUMPCOMP_USER issue a deprecation
warning, but for compat make it set RUMPCOMP_USER_SRCS=rumpcomp_user.c
for now.
2014-03-13 01:34:06 +00:00
pooka
b05100a488 component.c -> virtif_component.c, just to decrease risk of conflicts.
No runtime change.
2014-03-12 23:42:33 +00:00
pooka
01c3a6e39b Separate common bits for all interfaces implementing virtif hypercalls
from Makefile to Makefile.virtif.  The latter is meant to be .included.
2014-03-12 23:40:58 +00:00
pooka
30baf09a3c When sending, only load mbufs which have a length. This is especially
useful for fragmented datagrams where the tail of the first packet is
full of nothing.
2014-03-12 17:49:13 +00:00
pooka
1ac307e403 kill undesirable #ifndef _RUMPKERNEL 2014-03-11 20:32:05 +00:00
pooka
98631d955a Reinstance cpu_counter.h so that we don't have to work around the
MD implications everywhere else.
2014-03-11 20:25:05 +00:00
pooka
75234fdf68 deduplicate uvm_object_printit() implementation 2014-03-11 20:22:47 +00:00
pooka
0d17764267 Put the syncobjs in emul.c instead of locks.c so that they are
present for both locks.c and locks_up.c alike.
2014-03-11 00:59:38 +00:00
pooka
2d6a1e9048 update comments 2014-03-10 23:02:07 +00:00
pooka
3cbed593c7 add a compat prototype for rump_getversion() 2014-03-10 22:48:29 +00:00
pooka
e163d16682 rump_getversion() does not require a thread context, so make it a straight
call instead of being wrapped around rump_pub_getversion().
2014-03-10 22:44:10 +00:00
pooka
495782ee0e Move the "is arch capable of loading native kernel modules into
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.
2014-03-10 22:38:53 +00:00
matt
c3a9c63860 Be a little more careful checking MLIBDIR 2014-03-07 05:49:05 +00:00
matt
f2ada4d7f5 Use ARCH_ELFSIZE=32 is MLIBDIR == "powerpc" 2014-03-07 04:10:43 +00:00
pooka
da53b95428 also include bsd.own.mk, so value for RUMP_NPF_TESTING can come from mk.conf 2014-03-03 19:09:52 +00:00
pooka
9d7981d3bd Fix the memory limiter to work for non-pagedaemon threads again
reported by njoly
2014-03-03 16:50:28 +00:00
pooka
ddbee4681a For now, make it possible to not specify -D_NPF_TESTING by compiling
with RUMP_NPF_TESTING_=no.  This in turn makes it possible to use npf
in a rump kernel for real packet filtering instead of just testing.

no change to default
2014-03-03 14:01:30 +00:00
pooka
c40bbed43a Pull in the changes from the dpdk, netmap and snabb switch repos.
There are two major changes:

1) All thread context policy is pushed down to the hypercalls.
   This is meant to help performance-mongering implementations be
   able to control packet scheduling better (e.g. pin down packet
   reception to certain physical cores).
2) Generalize linkstr, meaning that the interface can now take an
   arbitrary string which is passed to the create() hypercall.  This can
   be used to map backend device characteristics to the rump kernel
   interface instance.
2014-03-03 13:56:40 +00:00
matt
2260871018 Use the new FEAT_LDREX to replace ARMV6/ARMV7 2014-02-28 14:19:25 +00:00
skrll
dd7bb1e0a8 G/C sys/simplelock.h includes 2014-02-28 10:16:51 +00:00
hannken
d940ddcc62 Currently dead vnodes still reside on the vnodelist of the file system
they have been removed from.

Create a "dead mount" that takes dead vnodes until they get freed.

Discussed on tech-kern.
2014-02-27 13:00:06 +00:00
pooka
711a488a45 Run constructor as part of network faction bootstrap, not device
(rumpdev no longer necessary)
2014-02-26 02:39:29 +00:00
pooka
24b70d334d Schedule only those netisr's that have registered handlers. 2014-02-25 22:40:53 +00:00
pooka
4f6fb3bf35 Ensure that the top level sysctl nodes (kern, vfs, net, ...) exist before
the sysctl link sets are processed, and remove redundancy.

Shaves >13kB off of an amd64 GENERIC, not to mention >1k duplicate
lines of code.
2014-02-25 18:30:08 +00:00
justin
69dd91d347 Add kern.{ostype,osrelease,osrevision,version} kern.domainname,
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@.
2014-02-25 01:02:42 +00:00
pooka
0c98ef9a00 +rump_wmd 2014-02-24 19:22:14 +00:00
pooka
9f29e8de3d truncate is not a defined operation for host files 2014-02-24 11:43:33 +00:00
skrll
d44a8024fa Fix typo in fix for PR/48606 2014-02-21 08:33:51 +00:00
christos
7d843710ef PR/48606: Lloyd Parkes: Drivers not using ifp->if_input but using ether_input
directly.
2014-02-21 02:10:40 +00:00
pooka
b7c666f338 + resettodr 2014-02-20 01:01:10 +00:00
pooka
47693a4792 Remove the "host" signal model. I'm not sure it ever made any sense.
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).
2014-02-20 00:41:05 +00:00
pooka
8966dd15d3 remove stub now provided by rump kernel base 2014-02-18 06:20:46 +00:00
pooka
a2e24f6a7e Use same uvm_swap_shutdown() stub for !vmswap kernels and rump kernels. 2014-02-18 06:18:13 +00:00
pooka
37fe00547f simply issue a warning if <1MB RAM configured. it might work, but
not going to start enumerating when and where it might.
2014-02-17 19:43:52 +00:00
pooka
67ab7d006c reserve a small amount of memory for the pagedaemon 2014-02-17 19:33:05 +00:00
pooka
459f46c52b Register netisr's from component constructors instead of via a hardcoded
global list.
2014-02-14 01:43:13 +00:00
pooka
c1c33d6851 g/c prototype of imaginary routine 2014-02-14 01:27:48 +00:00
pooka
f16e4e4778 Minor comment massage, zero functionality massage. 2014-02-12 22:30:45 +00:00
pooka
9563724619 Rototill a bit, and attempt to disguise it as non-gratuitous.
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)
2014-02-12 22:28:43 +00:00
hannken
97834f7ba0 Change vnode operation lookup to return the resulting vnode *vpp unlocked.
Change cache_lookup() to return an unlocked vnode.

Discussed on tech-kern@

Welcome to 6.99.31
2014-02-07 15:29:20 +00:00
pgoyette
f496b70ec7 Undo previous - it still needs a lot more work.
For now, we'll use the hand-crafted cf* structures and directly
call all the config routines.
2014-02-03 23:11:40 +00:00
pgoyette
a9062aa8b9 Use ioconf file to generate config data structures 2014-01-31 18:13:01 +00:00
pooka
934cd9a889 lwp0 needs l_proc set for panic->cpu_reboot to dump core the right way 2014-01-29 18:42:14 +00:00
njoly
b7dce7e999 Build with IPv6 support. 2014-01-28 10:54:45 +00:00
njoly
5df178fa15 Add now needed linux_pipe.c sources. 2014-01-25 10:40:40 +00:00
njoly
3e71eccadc Regen for pipe2 and lchown. 2014-01-25 10:31:01 +00:00
njoly
485190e7b7 Add pipe2 and lchown syscalls. 2014-01-25 10:30:22 +00:00
hannken
04c776e5c8 Change vnode operations create, mknod, mkdir and symlink to return
the resulting vnode *vpp unlocked.

Discussed on tech-kern@

Welcome to 6.99.30
2014-01-23 10:13:55 +00:00
christos
2e665b4bd4 Kludges like to procreate. Add alpha cpu_frequency() kludge. 2014-01-22 23:38:21 +00:00
martin
4fee85be61 Make IPL_ values different.
This makes ni real difference for rump, but avoods
KASSERTs in common code when we try to assert
"ipl not higher as...".
Suggested by riastradh, OK: pooka.
2014-01-19 07:01:55 +00:00
pooka
84093338b2 don't use temp buffer from the stack, fix the constants 2014-01-17 14:57:04 +00:00
hannken
1139274440 Change vnode operations create, mknod, mkdir and symlink to keep the
directory node dvp locked on return.

Discussed on tech-kern@

Welcome to 6.99.29
2014-01-17 10:55:01 +00:00
pooka
964b56f42b sysctl_init needs to be pretty much at the top of main() 2014-01-17 02:05:54 +00:00
pooka
2d79771930 Use subr_cprng.c instead of stub implementation. Rijndael migrates from
rumpkern_crypto to rumpkern due to it being mandatory for cprng.
2014-01-17 01:32:53 +00:00
pgoyette
aff4b3ca56 Don't bring in the zlib stuff at build time. This will get resolved
when the user starts the rump_server process.

OK pooka@
2014-01-16 14:12:09 +00:00
pgoyette
8409919195 Use existing rumpkern_z library rather than including another copy of
zlib.c
2014-01-16 02:38:20 +00:00
pgoyette
f8dd541c8b Remove explicit definition of COMPAT_50. As pointed out by pooka@,
this is already defined in Makefile.rump
2014-01-16 02:21:24 +00:00
pooka
eed75ee5c9 yearly update
Miraculously, the list got smaller(!)
2014-01-15 15:10:31 +00:00
pgoyette
ae263bb3de Link new opencrypto library into the build. 2014-01-14 17:17:52 +00:00
pgoyette
5e3ad7ff0e Add new rump library for opencrypto framework 2014-01-14 17:15:09 +00:00
pgoyette
2e6d77ce29 Add the MODULE parts for blowfish and des.
Add camellia algorithm.  (pooka@ says no lib version change required)
2014-01-14 17:05:50 +00:00
njoly
5298a5a891 Regen. 2014-01-10 20:10:43 +00:00
njoly
cc84e6774d Add NetBSD futimes/lutimes syscalls which does not exists on Linux. 2014-01-10 20:10:23 +00:00
njoly
c21d61a30f Regen. 2014-01-10 19:45:43 +00:00
njoly
a022633d69 Do not redefine linux syscalls arguments, just use compat ones
instead.
Include linux_socketcall.h to bring missing socket syscall
arguments/prototypes on arches that have socketcall(2).
Finally, cleanup rump linux syscall wrapper, to remove linux syscall
argument/prototype local copy.
2014-01-10 19:44:47 +00:00
pooka
b50bd486cc OpenBSD has kqueue 2014-01-08 11:06:33 +00:00
pooka
acb676442c Allow kernels compiled with INET+INET6 to be booted as IPv4-only or IPv6-only. 2014-01-02 18:29:01 +00:00
pooka
6971bddad3 include shmif_dumpbus 2013-12-20 10:13:24 +00:00
pooka
1150b99ea3 use _KERNEL_RCSID only in _KERNEL, _RCSID elsewhere 2013-12-20 10:00:59 +00:00
pooka
1a7f9ac66c header massage, mostly improves portability 2013-12-20 09:06:35 +00:00
pooka
c0dbaf1358 install rumperr.h 2013-12-18 20:14:02 +00:00
pooka
796ef7fdf2 regen 2013-12-18 20:12:08 +00:00
pooka
31ca0a94e8 generate errno -> str routine (for portable programs) 2013-12-18 20:10:58 +00:00
pooka
7d5558e88d fix tyop 2013-12-17 14:30:18 +00:00
pooka
f5bd9f4075 Translate return values for emulations, e.g. Linux. For ports without
__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.
2013-12-16 15:36:29 +00:00
njoly
6d25749476 Regen. 2013-12-14 17:35:11 +00:00
njoly
d491161468 Use native/rump syscalls for pread/pwrite instead of linux ones
which only exist to deal with PAD argument.
2013-12-14 17:34:47 +00:00
njoly
f820357119 Regen. 2013-12-14 10:30:50 +00:00
njoly
3fa945c034 Add syscall wrapper for mknodat(2) to deal with PAD argument difference
between rump and linux versions.
2013-12-14 10:29:45 +00:00
pooka
f11ea73cc4 regen 2013-12-11 23:14:03 +00:00
pooka
87860d8cc5 need to grab KTRFACv[n] too 2013-12-11 23:13:48 +00:00
pooka
ef738750b7 reregengen 2013-12-11 09:45:01 +00:00
pooka
4bb2a888c3 regen 2013-12-09 21:13:21 +00:00