Commit Graph

3100 Commits

Author SHA1 Message Date
riastradh
ba3149fefc regen 2017-03-18 21:04:24 +00:00
riastradh
2fba6ececb regen 2017-03-18 19:43:46 +00:00
ozaki-r
0eaf4e5356 Use if_acquire and if_release instead of using psref API directly
- Provide if_release for consistency to if_acquire
- Use if_acquire and if_release for ifp iterations
- Make ifnet_psref_class static
2017-03-14 09:03:08 +00:00
hannken
90ead62d2f Change the protocol to update a mounted file system from read-write
to read-only and vice versa:

- Add an internal flag IMNT_WANTRDONLY.
- Set either IMNT_WANTRDWR or IMNT_WANTRDONLY if going from or to read-only.
- After successfull call to VFS_MOUNT() set or clear MNT_RDONLY.

Adapt tmpfs and rumpfs to the new protocol.  Other file systems will be
updated when they get the IMNT_CAN_RWTORO property.

Welcome to 7.99.64
2017-03-01 10:44:47 +00:00
maya
b0f6bc04c6 GC some GCC 4.8 specific sh3 HACKS entries.
These existed to avoid compile errors, and haven't been effect
since gcc.old was removed.
2017-02-22 12:17:16 +00:00
hannken
8a83906a50 Add weak aliases for _fstrans_start() and fstrans_done(). 2017-02-22 11:20:59 +00:00
hannken
8c2ff4e99d Regen. 2017-02-22 09:47:18 +00:00
hannken
326db3aaf6 Add generic genfs_suspendctl() and use it for all file systems.
Layered file systems need work.
2017-02-17 08:31:23 +00:00
knakahara
7881c6ebb7 l2tp(4) support rump. 2017-02-16 08:39:10 +00:00
ozaki-r
589739056f Defer some pr_input to workqueue
pr_input is currently called in softint. Some pr_input such as ICMP, ICMPv6
and CARP can add/delete/update IP addresses and routing table entries. For
example, icmp6_redirect_input updates an a routing table entry and
nd6_ra_input may delete an IP address.

Basically such operations shouldn't be done in softint. That aside, we have
a reason to avoid the situation; psz/psref waits cannot be used in softint,
however they are required to work in such pr_input in the MP-safe world.

The change implements the workqueue pr_input framework called wqinput which
provides a means to defer pr_input of a protocol to workqueue easily.
Currently icmp_input, icmp6_input, carp_proto_input and carp6_proto_input
are deferred to workqueue by the framework.

Proposed and discussed on tech-kern and tech-net
2017-02-02 02:52:10 +00:00
hannken
3262813bfb Run vflush() when going from read/write to read only.
Set link count to zero once a node has been removed.
"Implement" MNT_GETARGS.
2017-01-27 10:48:51 +00:00
ozaki-r
a18d81bb89 Unbreak builds of rump libraries with RUMP_LOCKDEBUG 2017-01-27 09:50:47 +00:00
ozaki-r
ac86ae25b9 Protect if_clone data with if_clone_mtx
To this end, carpattach needs to be delayed from RUMP_COMPONENT_NET to
RUMP_COMPONENT_NET_IF on rump_server. Otherwise mutex_enter via carpattach
for if_clone_mtx is called before mutex_init for it in ifinit1.
2017-01-20 08:35:33 +00:00
ozaki-r
d1f021a6c8 Fix build (undefined reference to `rumpns_pfil_init' on usr.sbin/puffs/rump_nfs) 2017-01-17 08:10:37 +00:00
christos
e925f9654a call pfil_init() here. 2017-01-17 02:03:09 +00:00
christos
978ea67b20 pfile_init earlier (not here) 2017-01-17 02:02:27 +00:00
ryo
28df50d7bb Make pfil(9) MP-safe (applying psref(9)) 2017-01-16 09:28:40 +00:00
pgoyette
163337a16d We no longer need ioconf.c - remove it to avoid "defined but not used"
compiler error.
2017-01-15 01:48:05 +00:00
pgoyette
0792f962a8 Don't call the drvctl module's initialization code during rump component
initialization.  Instead, temporarily attach the drvctl's cdevsw to
determine its device c-major, create the /dev/drvctl node using that
c-major, and then detach.  This leaves things in a state where normal
module initialization can run.

Since we're now creating the /dev/drvctl device node correctly, we don't
need to create it again.  So mark the device as DEVNODE_DONTBOTHER in
the devsw_conv0 conversion table.

This bug was introduced more than a year ago (src/sys/kern/kern_drvctl.c
rev 1.40), but was silently ignored except when running a rump_server
built with LOCKDEBUG.
2017-01-14 21:36:58 +00:00
christos
d8dfcd6c2a regen 2017-01-13 06:18:31 +00:00
joerg
f9c2736326 Disable a couple of warnings until further investigation. 2017-01-11 12:19:43 +00:00
christos
58b79fbd23 need new file 2017-01-03 03:47:51 +00:00
christos
f75d79eb69 Sync NPF with the version on github: backport standalone NPF changes,
which allow us to create and run separate NPF instances. Minor fixes.
(from rmind@)
2016-12-26 23:05:05 +00:00
cherry
3a405f030d physmem should be of type psize_t
Also, use PRIxPSIZE when printf(9)ing physmem.
2016-12-22 16:05:14 +00:00
ozaki-r
95d40beaa9 Fix that rump.ifconfig shmifN destroy hangs up
rump.ifconfig shmifN destroy sometimes hangs up on closing a file
descriptor of kqueue under heavy load. It seems it happens because of
a race condition between closing a fd and kevent to the same fd on
another kthread for packet Rx. Fix it by executing the close operation
after the kthread left.
2016-12-22 12:55:28 +00:00
ozaki-r
bf6d49ecb3 Fix handling return value of rumpcomp_shmif_watchwait 2016-12-22 10:13:09 +00:00
ozaki-r
dd8638eea5 Move bpf_mtap and if_ipackets++ on Rx of each driver to percpuq if_input
The benefits of the change are:
- We can reduce codes
- We can provide the same behavior between drivers
  - Where/When if_ipackets is counted up
  - Note that some drivers still update packet statistics in their own
    way (periodical update)
- Moved bpf_mtap run in softint
  - This makes it easy to MP-ify bpf

Proposed on tech-kern and tech-net
2016-12-15 09:28:02 +00:00
christos
12fdff5295 remove ptree add lpm 2016-12-09 02:50:06 +00:00
njoly
c48e94e5c7 Fix NetBSD keyword expansion. 2016-11-26 11:20:09 +00:00
ozaki-r
6adeabf576 Rumpify vlan(4) 2016-11-26 03:17:58 +00:00
pgoyette
a99ecc4a30 In addition to initializing the bufq subsystem, we also need to init
the individual strategy modules.
2016-11-17 23:15:38 +00:00
pgoyette
5dae26512b Initialize the bufq stuff for rump, too.
This should fix the large number of tests that recently started to fail.
2016-11-16 23:24:47 +00:00
ozaki-r
aeb231cc05 Fix build of usr.sbin/puffs/rump_nfs
XXX a better fix should be to separate nfs codes and let rump_nfs link only
XXX one that doesn't depend on rt_delete_matched_entries (and rtrequest).
2016-11-15 09:04:30 +00:00
pgoyette
d365923e93 Forgot these two generated files... 2016-11-02 00:32:59 +00:00
roy
98b0d70fff Add ifam_pid and ifam_addrflags to ifa_msghdr.
Re-version RTM_NEWADDR, RTM_DELADDR, RTM_CHGADDR and NET_RT_IFLIST.
Add compat code for old version.
2016-09-21 10:50:22 +00:00
ozaki-r
6dc1297521 Support tun devices on rump kernels 2016-09-05 02:25:37 +00:00
christos
b77232e0ab need kern_ssp.c for a full SSP build. 2016-08-20 15:50:50 +00:00
hannken
7139aab724 Remove now obsolete operation vcache_remove().
Welcome to 7.99.36
2016-08-20 12:37:06 +00:00
christos
ccab2709d8 Don't call loopinit() here. Instead panic if -lrumpnet_net has not been
called to initialize lo0ifp.
2016-08-13 11:19:35 +00:00
martin
c4786f8220 Add new file to fix the build. 2016-08-12 20:25:34 +00:00
christos
a626a5b30a more loopinit(); 2016-08-12 11:43:04 +00:00
kre
d6b671c40b On the first day (that being the eighth day of the eighth month,) the
building was completed only to discover that within there lay havoc.

On the second day all just groaned and moaned, and it must be someone
else's problen.

On the third day, St. Martin stepped in and traced the culprit, which
provided inspiration, and a correction was made.

Forevermore all were agog at just how such a trivial thing could do
so much damage...


OK...   to be a little less vague.   The loopback interface is a truly
"special" thing, and rump knew that - and treated it very specially.
Unfortunately, when the loopback interface is changed, and rump does
not keep up, bad things happen.

This (overall) might, or might not, be the correct fix - but for now
it appears to work.   If someone, sometime, finds a better way to
deal with the issues of the loopback interfaces true majesty, feel
free to revert this and do it another way.
2016-08-10 10:09:42 +00:00
pgoyette
94fcffa368 Part 2 of fixing if_tap module. 2016-08-08 09:29:45 +00:00
christos
d3580c2894 finish ifmpls->mpls renaming. 2016-08-07 17:42:18 +00:00
pgoyette
2dc75bdc9e Fix variable names in previous 2016-07-30 23:07:23 +00:00
pgoyette
763a6486bb More adaptation of the rump component init, to avoid EEXIST during
regular module initialization.
2016-07-30 22:36:14 +00:00
pgoyette
7ea3f07f30 When calling devsw_attach() we need to use the expected/official driver
name (as listed in the devsw_conv[] table) to get the expected device
majors.  Once rump initialization is finished (ie, it has created its
required device nodes), we need to detach the [bc]devsw so the module
initialization code doesn't get EEXIST.
2016-07-26 01:49:48 +00:00
pgoyette
9e4ecfb022 When initializing the rump cgd component, use the correct driver name
(as found in the devsw_conv[] table).  This will get us the "official"
major numbers for the cgd device.

After creating the rump file-space nodes for /dev/cgd* we then need to
detach the [bc]devsw's because normal module initialization will do its
own attachment, and we don't want that to fail.

While here, since we're doing the devsw_attach() twice, share the
results from the first call rather than starting from scratch.
2016-07-25 12:45:13 +00:00
christos
986517611c add uvm_km_protect() 2016-07-20 17:03:50 +00:00
pgoyette
7c20c5d3bb Fix regression introduced in tests/net/bpf and tests/net/bpfilter
The rump code needs to call devsw_attach() in order to assign a dev_major
for bpf;  it then uses this to create rumps /dev/bpf node.  Unfortunately,
this leaves the devsw attached, so when the bpf module tries to initialize
itself, it gets an EEXIST error and fails.

So, once rump has figured what the dev_major should be, call devsw_detach()
to remove the devsw.  Then, when the module initialization code calls
devsw_attach() it will succeed.
2016-07-19 02:47:45 +00:00
matt
8a31a6e7a0 Pass down ${CPUFLAGS} 2016-07-09 05:52:22 +00:00
msaitoh
8bc54e5be6 KNF. Remove extra spaces. No functional change. 2016-07-07 06:55:38 +00:00
christos
65120c51fa regen 2016-07-03 14:26:47 +00:00
christos
26488304cc Add new files 2016-06-24 21:31:30 +00:00
ozaki-r
e1135cd9b9 Use curlwp_bind and curlwp_bindx instead of open-coding LP_BOUND 2016-06-16 02:38:40 +00:00
ozaki-r
d938d837b3 Introduce m_set_rcvif and m_reset_rcvif
The API is used to set (or reset) a received interface of a mbuf.
They are counterpart of m_get_rcvif, which will come in another
commit, hide internal of rcvif operation, and reduce the diff of
the upcoming change.

No functional change.
2016-06-10 13:27:10 +00:00
joerg
56a6d73206 Install new header and fix rump to include the corresponding source as
well.
2016-06-03 21:55:50 +00:00
pooka
f3167874d4 Disable PR kern/51135 hack now that the problem is supposedly
fixed (to see if tests pass).
2016-05-30 14:52:06 +00:00
christos
19ea743456 Introduce security.pax.mprotect.ptrace sysctl which can be used to bypass
mprotect settings so that debuggers can write to the text segment of traced
processes so that they can insert breakpoints. Turned off by default.
Ok: chuq (for now)
2016-05-25 17:43:58 +00:00
riastradh
2b38f13330 Actually get as many bytes as requested from rumpuser_random.
rumpuser_random is limited to 32 bytes at a time -- which would be
reasonable, except that there are too many buffers in the way between
entropy sources and users of the entropy pool.

Partial fix for PR kern/51135.
2016-05-21 14:59:45 +00:00
pooka
3bc931a0af Add workaround for PR kern/51135
If the rnd component is present, load extra initial entropy to avoid
/dev/random not being able to request it on demand.  The extra initial
entropy will allow a few instances of /dev/random, but will eventually
go into the failure mode described in the PR.
2016-05-16 16:31:07 +00:00
ozaki-r
040205ae93 Protect ifnet list with psz and psref
The change ensures that ifnet objects in the ifnet list aren't freed during
list iterations by using pserialize(9) and psref(9).

Note that the change adds a pslist(9) for ifnet but doesn't remove the
original ifnet list (ifnet_list) to avoid breaking kvm(3) users. We
shouldn't use the original list in the kernel anymore.
2016-05-12 02:24:16 +00:00
pooka
c8a34480e3 Avoid '.' in variable names which are expected to be passed to
this Makefile via the env.

That character is strictly speaking not allowed by POSIX in an exported
variable name, and at least dash >= 0.58 refuses to export such variables.

Furthermore, since the individual CFLAGS/CPPFLAGS/etc. variables
are not comprehensive enough for all cases (e.g. HURD), just
support the .includable version from now on, i.e.
RUMPCOMP_MAKEFILEINC_rumpdev_pci.

curious failure mode debugged by Martin Lucina
2016-05-10 19:38:29 +00:00
pooka
7ddba29e76 regen syscall files 2016-05-06 10:19:40 +00:00
martin
4b3cc0cbac Add lwp_find() - verbatim copy from the hard kernel. 2016-04-24 07:45:10 +00:00
christos
ef9bd43259 regen 2016-04-23 23:09:27 +00:00
skrll
4e8e66439e Merge nick-nhusb
- API / infrastructure changes to support memory management changes.
- Memory management improvements and bug fixes.
- HCDs should now be MP safe
- conversion to KERNHIST based debug
- FS/LS isoc support on ehci(4).
- conversion to kmem(9)
- Some USB 3 support - mostly from Takahiro HAYASHI (t-hash).
- interrupt transfers now get proper DMA operations
- general bug fixes
    - kern/48308
    - uhub status notification improvements
    - umass(4) probe fix (applied to HEAD already)
    - ohci(4) short transfer fix
2016-04-23 10:15:27 +00:00
ozaki-r
220ff4e7a0 Prevent LWP migrations between CPUs during upper layer processing
This is a contract of psref(9) that is used by upper layer componenets,
e.g., bridge(4).
2016-04-19 05:48:10 +00:00
ozaki-r
4da47673a2 Rump-ify if_pppoe
From s-yamaguchi@IIJ
2016-04-15 01:35:25 +00:00
martin
8dca0c72be Add a dummy splraiseipl() 2016-04-11 10:53:06 +00:00
ozaki-r
322b6a238d Sweep unncessary radix.h inclusions 2016-04-11 08:56:16 +00:00
ozaki-r
6a82a3a147 Add psref to rump kernel 2016-04-11 06:49:11 +00:00
christos
4fbdf206cb Split p_xstat (composite wait(2) status code, or signal number depending
on context) into:
1. p_xexit:		exit code
2. p_xsig:		signal number
3. p_sflag & WCOREFLAG	bit to indicated that the process core-dumped.

Fix the documentation of the flag bits in <sys/proc.h>
2016-04-04 20:47:57 +00:00
christos
cfc738154f regen 2016-04-03 01:22:39 +00:00
christos
2a60134171 regen 2016-04-03 01:01:46 +00:00
christos
3d596ad050 regen 2016-04-02 21:02:39 +00:00
christos
3b88282d06 elide vax compiler bug. 2016-03-23 21:38:51 +00:00
joerg
9adca58c0e Align the message buffer. The kernel routines normally are used only
with page aligned buffers and they assume at least pointer alignment. Be
defensive here and align to 256 Bytes.
2016-03-08 14:30:48 +00:00
christos
3eda01ea39 Avoid void * arithmetic 2016-03-07 00:51:32 +00:00
christos
8e7e68da22 PR/50900: David Binderman: optimize memset 2016-03-06 19:47:41 +00:00
pooka
2657abc4e0 add cpu_lock
from freqlabs on irc
2016-02-19 18:38:37 +00:00
riastradh
d80621961e Need <sys/mutex.h> for mutex(9). 2016-02-17 01:48:36 +00:00
riastradh
9e2ce23efb Caller must have exclusive access to rndsource for rnd_add_data(_sync). 2016-02-17 01:48:04 +00:00
riastradh
e3389acee7 Make hyperentropy rndsource work synchronously, again.
This time for real!  *crosses fingers*
2016-02-17 01:42:25 +00:00
ozaki-r
9c4cd06355 Introduce softint-based if_input
This change intends to run the whole network stack in softint context
(or normal LWP), not hardware interrupt context. Note that the work is
still incomplete by this change; to that end, we also have to softint-ify
if_link_state_change (and bpf) which can still run in hardware interrupt.

This change softint-ifies at ifp->if_input that is called from
each device driver (and ieee80211_input) to ensure Layer 2 runs
in softint (e.g., ether_input and bridge_input). To this end,
we provide a framework (called percpuq) that utlizes softint(9)
and percpu ifqueues. With this patch, rxintr of most drivers just
queues received packets and schedules a softint, and the softint
dequeues packets and does rest packet processing.

To minimize changes to each driver, percpuq is allocated in struct
ifnet for now and that is initialized by default (in if_attach).
We probably have to move percpuq to softc of each driver, but it's
future work. At this point, only wm(4) has percpuq in its softc
as a reference implementation.

Additional information including performance numbers can be found
in the thread at tech-kern@ and tech-net@:
http://mail-index.netbsd.org/tech-kern/2016/01/14/msg019997.html

Acknowledgment: riastradh@ greatly helped this work.
Thank you very much!
2016-02-09 08:32:07 +00:00
pooka
09c0762f99 Allocate struct cpu_info dynamically. Saves quite a lot of BSS in the
common case and reduces rump kernel memory requirements by 10% or more
in really tiny deployments.
2016-02-08 18:18:19 +00:00
mlelstv
bbd8666d0f Split case folding table into separate source file and add full
copyright and permission notice from http://www.unicode.org/copyright.html
2016-02-06 10:40:58 +00:00
pooka
b47801c831 Remove leading spaces.
Bet you didn't see that one coming.
2016-02-02 13:07:30 +00:00
pooka
f30877a77a optimize for size a.k.a. operation nuke trailing spaces 2016-02-02 13:02:34 +00:00
pooka
a8b37cc8bf Add capability to attach external memory to files on rumpfs. This
feature is useful e.g. for tight-memory systems where you don't need
block storage, but still need to provide some data via files.
2016-02-02 12:22:23 +00:00
pooka
4dac192382 regen 2016-02-02 01:15:58 +00:00
pooka
ae1e89ede5 snarf fcntl definitions 2016-02-02 01:15:24 +00:00
pooka
0bb9321be6 periodic regen (because having new rcs ids in comments is most useful) 2016-02-02 01:14:26 +00:00
pooka
524147ffc7 Move "shotgun approach to rump syscalls" from rump.h to a separate header,
sort of as a hint that relying on those macros is not necessarily the
way you want to do things in 2016.  Include things from rump.h for compat
for the time being, though.
2016-01-31 23:14:34 +00:00
christos
84c7254397 PR/50631: Joerg Sonnenberger: Don't rename syscalls before you include
the relevant headers.
2016-01-29 20:35:48 +00:00
pooka
cbf188301a regen syscall files 2016-01-26 23:49:46 +00:00
pooka
1730d8f0cf nuke a few missed -Ifactiondir CPPFLAGSitions. 2016-01-26 23:41:15 +00:00
pooka
93f2ab8ce8 regen vnode interfaces 2016-01-26 23:30:10 +00:00
pooka
00e5ca99e7 regen rump kernel interfaces for header change.
(they were already manually edited for a prior commit, so not much change)
2016-01-26 23:25:40 +00:00
pooka
9187c84558 "rump_private.h" -> <rump-sys/kern.h> 2016-01-26 23:24:55 +00:00
pooka
a3ffdb865d generate privhdrs to new location 2016-01-26 23:22:22 +00:00
pooka
bf54b2f752 include rumpif private headers from <rump-sys> 2016-01-26 23:21:18 +00:00
pooka
6bb5142288 Put the kernelside rump kernel headers into <rump-sys> instead of
sprinkling them around the faction directories.  Avoids having
to add a CPPFLAGS (or several) to pretty much every component
Makefile.

Leave compat headers around in the old locations.

The commit changes some autogenerated files, but I'll fix the
generators shortly and regen.
2016-01-26 23:12:14 +00:00
pooka
18353ae21f prop_dictionary_t hasn't been needed here in, um, 5 years, so remove
the type madness.
2016-01-25 12:25:38 +00:00
pooka
d35b86acad Don't include <rump/rumpvnode_if.h> from rump.h. It's not needed
unless you're doing something special, but requires register_t.
Adjust the few places which actually need rumpvnode_if.h.
2016-01-25 11:45:57 +00:00
pooka
9331c560dd Move librumpuser compile-time options into the librumpuser source
directory.  Those options apply only for the in-tree implementation.
2016-01-25 00:24:23 +00:00
ozaki-r
eef1a9e462 Fix build with RUMP_LOCKDEBUG=yes 2016-01-22 04:26:01 +00:00
pooka
ea1845ad67 put lwp/proc stuff into the same source module (emul.c -> lwproc.c) 2016-01-18 23:27:20 +00:00
pooka
85df50f357 massively reduce header pollution from times prehistoric 2016-01-18 23:21:28 +00:00
pooka
45c68bb8cc Fix dlopen()/dlclose()+RUMP_USE_CTOR to not leave dangling pointers around. 2016-01-18 16:46:08 +00:00
pooka
bd792fddbf boottime is a timespec, not timeval 2016-01-18 15:53:38 +00:00
pooka
a987d455cc Implement the inverse of a nop. 2016-01-18 14:37:53 +00:00
knakahara
a9794d3914 conform rump behavior to NetBSD kernel (in paticular net.inet.ip.gifttl sysctl) 2016-01-08 04:06:48 +00:00
pooka
13f1407fea Initialize non-VFS parts of tty subsystem already at RUMP_COMPONENT_KERN.
That way components under RUMP__FACTION_DEV can call tty routines.
2016-01-07 21:09:01 +00:00
pooka
188e7ef2a6 use WSEMUL_NO_DUMB and WSEMUL_VT100 2016-01-07 21:04:27 +00:00
pooka
c33ddd066d regen 2016-01-07 13:54:08 +00:00
christos
8ec658f57a - Change LDADD/DPADD in library dependencies to LIBDPLIBS
- Fix some LDADD abuse and remove useless dependencies
- include <bsd.init.mk> in the right place where appropriate
From Rin Okuyama
2016-01-05 13:07:46 +00:00
pgoyette
e04dc48269 Now that the table of auto-loadable syscalls is per-emulation, make sure
that the rump-kernel has its own list.  Otherwise, missing syscalls won't
trigger a module auto-load.

This commit finishes the work to get tests/lib/librumphijack/t_tcpip
nfs_autoload test case working again after 16 months of failures!  (see
PR bin/49153).
2015-12-29 10:22:05 +00:00
pgoyette
7594d8cd11 Detach the {b,c}devsw after obtaining the device major numbers. We'll
re-attach during module initialization.

This enables the atf tests to once again succeed.
2015-12-26 10:22:09 +00:00
pgoyette
23c592fb1a Remove local CF_DRIVER_DECL - it is now defined in the raidframe driver's
module initialization code
2015-12-26 01:01:30 +00:00
christos
7cbc092f17 fix struct name 2015-12-08 22:16:01 +00:00
christos
8d10f96266 Replace DIOCGPART -> DIOCGPARTINFO which returns the data needed instead of
pointers.
2015-12-08 20:36:14 +00:00
pgoyette
2bc9136f54 Regen 2015-12-03 02:56:48 +00:00
pgoyette
54a32217dd Regen 2015-12-01 00:27:17 +00:00
pgoyette
135af292eb Finish the regen - some of the files from sys/kern got committed
accidentally with the fix to makesyscalls.sh - sorry about that.
2015-11-30 23:28:31 +00:00
pgoyette
abe91b09e0 Regen for 7.99.23 2015-11-30 22:48:53 +00:00
martin
0286e529f2 Adapt to e_default_mapaddr signature changes 2015-11-26 15:13:43 +00:00
pooka
35ce72762f Fix argument to empty()
Guess none of the fast-running tests exercised the
component being initialized ...
2015-11-17 01:07:34 +00:00
pooka
eda4460d2b Use IOCONF #define to determine component name.
Avoids having to manually retype info already in .ioconf.

Also, COMPONENT_SIMPLE -> RUMP_COMPONENT=simple.  That way, we can add
other attributes where necessary.  As "future directions", the "ioconf"
attribute for RUMP_COMPONENT can just be removed when a driver is
converted to modular and has a proper modcmd.
2015-11-16 23:27:07 +00:00
pooka
d97f016d89 Always descend into component directories for rumpdescribe. 2015-11-15 16:54:16 +00:00
pooka
33a1fe2a2d describe => rumpdescribe 2015-11-15 13:50:10 +00:00
pooka
4ff6638b3d Make it easier to create rump kernel components, part 1.
Reduce copypasteware for the component constructors.  If a constructor
calls only config_init_component(), handle it from a common source file
instead of copying the same(ish) file around to every component.
2015-11-11 21:52:45 +00:00
knakahara
6cf7ad94f7 if_gif supports rump now. 2015-11-04 23:57:05 +00:00
pooka
298b136976 Allow PCI implementers to specify arbitrary makefile constructs.
(interface subject to change)

from Robert Millan
2015-11-01 22:41:24 +00:00
pooka
730146b26a fix typo: fnctl -> fcntl
from Robert Millan <rmh@gnu.org> via rumpkernel-users
2015-11-01 12:34:28 +00:00
pooka
a75cbaa267 add virtio-scsi component 2015-11-01 09:03:28 +00:00
pooka
b2b6f2602e Add a COMMENT describing what each component roughly does.
"make describe" prints the comment.

Requested/inspired by Vincent Schwarzer on rumpkernel-users
2015-10-19 16:16:32 +00:00
christos
7931040a64 CID 1327233: Expicitly ignore return values of syscalls that don't fail. 2015-10-14 01:33:32 +00:00
pgoyette
d4c18fb9c6 Regen 2015-10-10 03:30:17 +00:00
ozaki-r
4f5bd10ca4 Add lockdebug_barrier
ok pooka@
2015-09-30 02:45:33 +00:00
ozaki-r
63e037b63a Remove redundant UNLOCKED and LOCKED
UNLOCKED and LOCKED are done inside mutex_exit and mutex_enter respectively
so we don't need to do them outside mutex_exit and mutex_enter.

Reviewed by pooka@
2015-09-30 01:31:56 +00:00
christos
e0fbcc46ac regen 2015-09-24 14:58:19 +00:00
pooka
d6c14239ed Use the more widely accepted version of alphabetical order. 2015-09-15 15:09:10 +00:00
pooka
f2aae5969b install <rump/rumperrno2host.h> 2015-09-15 14:57:34 +00:00
pooka
3c87ab877c regen 2015-09-15 14:55:55 +00:00
pooka
2972539674 Generate rump_errno2host(): translates rump kernel errnos to host errnos.
Essentially, it's a partial I-know-what-I'm-doing syscall compat.

Functionality requested by Robert Millan.
2015-09-15 14:55:12 +00:00
pooka
e62609a73b Fully build ugenhc only on archs where libusb is built. 2015-09-14 15:09:35 +00:00
pooka
8d6acaa88c Note in comment why this "d"ma implementation is not in libusb. 2015-09-14 15:08:50 +00:00
pooka
47ff0c720a regen 2015-09-10 16:21:48 +00:00
pooka
4e45dc4d2c Fix #define ERRNO EANOTHERRNO.
Was: #define RUMP_ERRNO EANOTHERRNO
Now: #define RUMP_ERRNO RUMP_EANOTHERRNO

pointed out by Sebastian Wicki on irc
2015-09-10 16:21:32 +00:00
pooka
fb48b34be8 regen 2015-09-10 16:16:35 +00:00
pooka
366a14d44d Ignore multiline IOC macros by default. 2015-09-10 16:14:22 +00:00
pooka
72c697bfc0 Remove solved item. 2015-09-08 12:14:20 +00:00
ozaki-r
068f46fe61 Define NETHER in rumpkernel
This fixes failures of ATF tests running on rump_server.
2015-09-01 03:26:09 +00:00
ozaki-r
879526da38 Hook up lltable/llentry with the kernel (and rumpkernel)
It is built and initialized on bootup, but there is no user for now.

Most codes in in.c are imported from FreeBSD as well as lltable/llentry.
2015-08-31 08:02:44 +00:00
ozaki-r
730ee823a5 Allow rumpkernel to use rw_obj_* 2015-08-31 07:38:48 +00:00
christos
d97cdf2252 Add NOLINT 2015-08-30 08:33:29 +00:00
pooka
f922511816 initialize ncpuonline 2015-08-25 14:53:25 +00:00
pooka
ff90585e5f remove mksysctls(), now provided by init_sysctl_base 2015-08-25 14:52:59 +00:00
pooka
f6f0cd6151 add ncpuonline 2015-08-25 14:47:39 +00:00
pooka
8bb469d326 add cpu_getmodel() 2015-08-25 14:47:26 +00:00
pooka
b368b72cdf some final -Ifoo/opt removal 2015-08-25 00:08:56 +00:00
pooka
e65b78bf49 opt files were nop't 2015-08-24 23:21:50 +00:00
pooka
022c2de05c These "wip" components have been in progress for >5 years. There hasn't
been much progress.  Let's just kill them, they're not even build-tested.
2015-08-24 23:21:16 +00:00
pooka
30abe7e479 don't -I imaginary opt directories 2015-08-24 23:19:33 +00:00
pooka
ef50701008 purge rump/net of component-specific opt directories 2015-08-24 23:04:42 +00:00
pooka
db2a65b8d4 continue consolidating non-modular option files 2015-08-24 23:01:58 +00:00
pooka
6eb3ae7daa Remove individual opt_foo.h files, continue consolidating to opt_rumpkernel.h 2015-08-24 22:52:15 +00:00
pooka
143bba9536 remove librump/rumpnet/opt, consolidate in rump/include/opt 2015-08-24 22:31:33 +00:00
pooka
d0b433d7a7 Remove a bunch of opt files.
It's a cute idea to have component-specific opt files, but also a
completely stupid one since there's no way of knowing how options
transcend component boundaries, and therefore if a set of options is
conflicting or not.  So, just continue concentrating all of opt_foo.h in
opt_rumpkernel.h in accordance with the monolithic opt model.
2015-08-24 22:25:50 +00:00
pooka
916d66f2ac Remove unnecessary DPSRCS+=
-imacros automatically results in a dependency.
2015-08-24 18:17:04 +00:00
pooka
b00f3c3b11 regen 2015-08-24 16:07:10 +00:00
pooka
8dc07d6aab Use BUILDRUMP_IMACROS if specified. 2015-08-24 09:45:44 +00:00
pooka
8affc54712 kill now-unnecessary empty opt files (_KERNEL_OPT'ed probably eons ago) 2015-08-21 12:45:10 +00:00
pooka
5837845c12 Move constant cpp macros from Makefile.rump into opt_rumpkernel.h
(makes cc invocation lines a bit shorter)
2015-08-21 12:39:07 +00:00
christos
8ae7da9704 Remove KERN.ioconf, ksyms does not really need it. 2015-08-21 06:56:12 +00:00
christos
88b7aebae8 XXX: there must be a better way to do this. 2015-08-20 14:27:15 +00:00
christos
838b8310be add ioconf files for pseudo device attach prototypes 2015-08-20 12:20:09 +00:00
christos
2244edcb62 generate ioconf.h for pseudo-device attach prototype 2015-08-20 12:04:30 +00:00
christos
1a4eecf195 use ioconf.h for pseudo-device attach prototypes 2015-08-20 11:59:16 +00:00
christos
50213afafb put back bsd.init.mk 2015-08-20 11:58:26 +00:00
christos
f2fa9ab00d use ioconf files for pseudo-device attach prototypes 2015-08-20 11:51:12 +00:00
pooka
015ffe5bef Don't use KASSERT() to test for external return values, use panic()
from Robert Millan <rmh@freebsd.org>
2015-08-16 11:06:54 +00:00
pooka
2cecb63011 Fix handle typos/pastos in bus_space_barrier() calls 2015-08-11 22:28:34 +00:00
pooka
5ede295be8 Since the rump kernel does not know when the container it's running in
actually halts, print "halted" in the hypercall.
2015-07-24 14:11:11 +00:00
hannken
126bb89545 rump_vfs_mount_print: use vfs_vnode_iterator to print attached vnodes. 2015-07-22 08:36:05 +00:00
justin
d17e40e2f5 Add uname to rump sources 2015-07-07 12:40:13 +00:00
justin
034bfbdba3 Move hw.machine and hw.machine_arch sysctls to base so rump can use them
This allows uname(3) and uname(1) to work on rump kernels.
2015-07-07 12:38:02 +00:00
pooka
dda5ec9669 add brconfig to userland utils 2015-06-29 08:40:52 +00:00
hannken
46401132fa VOP_INACTIVE() is a rump operation, not a specfs operation. 2015-06-23 10:41:32 +00:00
pooka
a3cfad0d94 regen 2015-06-18 15:19:50 +00:00
pooka
b64d94ca7f note RUMP_{,LOCK}DEBUG default values 2015-06-17 11:48:06 +00:00
pooka
adb470c84b Remove unreal allocators, unconditionally use subr_{kmem,pool}.
Will, with other work, allow to tighten the memory allocation hypercall
specification to page-granularity allocations in the future.
2015-06-17 11:46:33 +00:00
pooka
36505d0ef2 Add a "userfeature" definition for iospace. I/O space is supported if
that flag is given and calling the init routine succeeds (and we're on
x86, which we probably need to be on anyway for this PCI component to
currently be supported).

Also, some adjustments to make things between flags consistent, namely
deprecate the Makefile variable RUMP_PCI_IOSPACE and don't require
userfeature.h to map 1:1 to the interfaces.

Includes contributions from Robert Millan.
2015-06-15 15:38:52 +00:00
pooka
fb308390f9 add mixerctl to userland utils 2015-06-15 11:20:18 +00:00
pooka
4e8e1eb1eb fix snafu to enable umass component also for amd64 2015-06-13 23:33:20 +00:00
dholland
d94a1d6201 Punctuate properly. 2015-06-12 17:50:01 +00:00
pooka
4e4d7694bd create /dev/{audio,sound,mixer,audioctl} -> foo0 symlinks
from Robert Millan <rmh@freebsd.org> via rumpkernel-users
2015-06-08 12:18:04 +00:00
pooka
844804c7f8 Allow device components to create symlinks in /dev
e.g. /dev/audio -> audio0

from Robert Millan <rmh@freebsd.org> via rumpkernel-users
2015-06-08 12:16:47 +00:00
pooka
65a710860e Add a "default" alias for RUMP_NBCOMPAT, in case "default" and "all"
stop being the same thing in the future.
2015-06-03 14:40:11 +00:00
pooka
9322d6a704 add rump kernel component for the auich driver
contributed by Robert Millan <rmh@freebsd.org> via private email
2015-06-03 14:06:19 +00:00
pooka
439ccf317e implement bus_dmamem_free()
from Robert Millan <rmh@freebsd.org> via rumpkernel-users
2015-06-03 13:55:42 +00:00
pooka
64f1a6830b Demand that rumpcomp_userfeatures_pci.h is available for providing
information about the hypercall interface implementation.
2015-06-03 13:43:23 +00:00
pooka
57bf183be4 Rework how the external hypercalls are specified, more in the direction of
something general.  I'm not sure if it's entirely general yet (since PCI
is the only place to use it), but at least a step in the right direction.
2015-06-03 13:41:56 +00:00
pooka
7a8f766478 Add "all" and "none" as acceptable RUMP_NBCOMPAT value aliases to
undefined and empty, respectively.
2015-06-03 10:49:14 +00:00
pooka
f70d97a184 Annual update of deleting one entry. At this rate the TODO will be
empty in 2038!
2015-06-03 10:23:08 +00:00
pooka
7c06b62e62 In case pagedaemon can't release any more memory, use kpause() instead
of cv_timedwait() on the pagedaemon condvar -- it's no use constantly
waking the pagedaemon up for new memory allocation attempts, as will
happen e.g. if new network connections are constantly pouring in.
2015-06-02 14:07:48 +00:00
hannken
d8868b1ee7 Change lfs from hash table to vcache.
- Change lfs_valloc() to return an inode number and version instead of
  a vnode and move lfs_ialloc() and lfs_vcreate() to new lfs_init_vnode().

- Add lfs_valloc_fixed() to allocate a known inode, used by kernel
  roll forward.

- Remove lfs_*ref(), these functions cannot coexist with vcache and
  their commented behaviour is far away from their implementation.

- Add the cleaner lwp and blockinfo to struct ulfsmount so lfs_loadvnode()
  may use hints from the cleaner.

- Remove vnode locks from ulfs_lookup() like we did with ufs_lookup().
2015-05-31 15:48:02 +00:00
pooka
1c07d29649 Add a rump kernel component for the tap device.
from Wei Liu <wei.liu2@citrix.com> via private email
2015-05-29 12:32:23 +00:00
pooka
8109843429 implement DIOCGMEDIASIZE, from Martin Lucina 2015-05-26 16:48:05 +00:00
pooka
0ba8e59f87 Implement fo_poll so that rump_sys_poll(stdout) works
more or less as expected.

from Martin Lucina <martin@lucina.net> via rumpkernel-users
2015-05-26 15:29:39 +00:00
ozaki-r
b71bd7bda7 Remove leftover IPX-related stuffs
No objection on tech-kern and tech-net.
2015-05-25 08:29:01 +00:00
pooka
521e7b5ba9 Add a rump kernel components for USB PCI host controllers. 2015-05-20 12:21:38 +00:00
pooka
1e2e59a64c Rename usb_at_ugenhc.c to the more generic usb_at_hc.c now that
host controllers beyond ugenhc are attached.
2015-05-20 11:53:08 +00:00
pooka
65e29fe174 also attach usb@{e,o,u}hci 2015-05-20 11:51:32 +00:00
pooka
44fa683b9a build dev_verbose.c 2015-05-20 11:22:54 +00:00
pooka
e63dc818ef call loginit() later, a lot later 2015-05-20 11:02:54 +00:00
pooka
a757287dfa Rewrite rules so that makesyscalls.sh will not be executed multiple
times in a parallel make.

Hopefully fixes sporadic build failures reported by Justin
2015-05-18 17:49:16 +00:00
pooka
412bc0ef8d Add pciide_machdep_compat_intr_establish().
Used by ... would you believe pciide?
2015-05-17 13:51:31 +00:00
pooka
4bf92fe14f Implement bus_space_read/write_multi() and bus_space_subregion().
Used by (at least) wdc.
2015-05-17 13:45:37 +00:00
pooka
c67798ece2 Autogenerate /dev/ldNx nodes based on which units attached instead of
hardcoding some arbitrary value for N.
2015-05-16 15:03:12 +00:00
pooka
61248571de Satisfy yet another non-modular driver still requiring a manual init call. 2015-05-16 13:59:00 +00:00
pgoyette
50b0fae6fd Regenerate 2015-05-13 02:13:08 +00:00
christos
524046d70c PR/975220: Check return of kthread_create 2015-05-10 14:05:22 +00:00
christos
65bd814e25 CID 274829: Check error from fd_getfile to avoid NULL deref immediately
after.
2015-05-10 14:00:42 +00:00
pgoyette
5608b80ca0 Regen for changes related to separation of compat_sysv syscalls into a
separate module.
2015-05-10 08:13:41 +00:00
pooka
48121ce977 remove files which are autogenerated in every build 2015-05-09 12:03:34 +00:00
pooka
8c13dec0ff Make the cool syscall autogeneration feature work with the
newfangled r/o src feature.
2015-05-09 12:03:10 +00:00
pgoyette
e7d73c5ce1 Regen again, this time without the extra word in the "generated from" line. 2015-05-09 06:06:14 +00:00
pgoyette
060ac9689e Regen from syscalls.master 2015-05-09 05:55:43 +00:00
hannken
e10a32f7f7 Remove miscfs/syncfs and
- move the syncer into kern/vfs_subr.c.

- change the syncer to process the mountlist and VFS_SYNC as appropriate.

- use an API for mount points similiar to the API for vnodes:
  - vfs_syncer_add_to_worklist(struct mount *mp) to add
  - vfs_syncer_remove_from_worklist(struct mount *mp) to remove a mount.

No objections on tech-kern@
2015-05-06 15:57:07 +00:00
rtr
fd12cf39ee make connect syscall use sockaddr_big and modify pr_{send,connect}
nam parameter type from buf * to sockaddr *.

final commit for parameter type changes to protocol user requests

* bump kernel version to 7.99.15 for parameter type changes to pr_{send,connect}
2015-05-02 17:18:03 +00:00
prlw1
9521ae7bfd Fix typos 2015-04-28 09:48:30 +00:00
rtr
d2aa9dd71f remove pr_generic from struct pr_usrreqs and all implementations of
pr_generic in protocols.

bump to 7.99.13

approved by rmind@
2015-04-26 21:40:48 +00:00
pooka
a240365213 Add libkvm to list of userspace libraries.
Even though kvm per se isn't support by rump kernels at least for now,
libkvm contains methods such as kvm_getproc2() which can be necessary for
compiling existing applications with kvm awareness as rumprun unikernels.
2015-04-25 08:48:06 +00:00
rtr
eddf3af3c6 make accept, getsockname and getpeername syscalls use sockaddr_big and modify
pr_{accept,sockname,peername} nam parameter type from mbuf * to sockaddr *.

* retained use of mbuftypes[MT_SONAME] for now.
* bump to netbsd version 7.99.12 for parameter type change.

patch posted to tech-net@ 2015/04/19
2015-04-24 22:32:37 +00:00
pooka
ff02be874a There are tests which rely on compat code continuing to be present,
so default RUMP_NBCOMPAT to all releases.

reported by gson
2015-04-24 06:29:56 +00:00
pgoyette
2c08ddf95f Update initialization of sysmon rump library sub-components. These are now handled as part of module initialization, and do not require manual invocation. 2015-04-23 23:23:14 +00:00
pooka
ac0dac8111 Rename RUMP_COMPAT to RUMP_NBCOMBAT to better signify what the
variable does.
2015-04-23 14:49:26 +00:00
pooka
97e480bbad For RUMP_COMPAT, accept "all" as an alias.
Also accept a comma-separated list, since that's easier to pass through
shells than a whitespace-separated list.
2015-04-23 14:39:03 +00:00
pooka
87a65e5d69 Default compat to 60 70, now that it hopefully generates no fallout. 2015-04-23 10:52:18 +00:00
pooka
1e3055e45d regen for COMPAT_50 sprinklage 2015-04-23 10:51:20 +00:00
pooka
f26441069d Mark the vattr50 translation helpers as COMPAT_50 2015-04-23 10:50:29 +00:00
pooka
30f29c7861 support COMPAT_nn flags 2015-04-23 10:50:00 +00:00
pooka
ff30f895ea COMPAT_OIF{DATA,REQ} are defined by compat/sys/sockio.h if need be,
don't define them here unconditionally.
2015-04-23 07:56:03 +00:00
pooka
78d0de80d8 sprinkle COMPAT_50 2015-04-23 07:55:24 +00:00
pooka
ef3e63b15f g/c the never-used and never-useful hyperstubs.c 2015-04-23 06:39:19 +00:00
pooka
79729d845f Apparently new source files need to be added to each Makefile.inc
individually.  Who comes up with this kind of crappy build infra?
2015-04-22 20:10:56 +00:00
pooka
165d419fa9 Put 50 back to compat list for a while (some fallout) 2015-04-22 18:14:55 +00:00
pooka
04469a37d8 Define rump_nativeabi_p() under arch, where one would logically expect
it to be defined.
2015-04-22 18:12:39 +00:00