opnsense-src/sys/sys
Marko Zec f6dfe47a14 Permit buiding kernels with options VIMAGE, restricted to only a single
active network stack instance.  Turning on options VIMAGE at compile
time yields the following changes relative to default kernel build:

1) V_ accessor macros for virtualized variables resolve to structure
fields via base pointers, instead of being resolved as fields in global
structs or plain global variables.  As an example, V_ifnet becomes:

    options VIMAGE:          ((struct vnet_net *) vnet_net)->_ifnet
    default build:           vnet_net_0._ifnet
    options VIMAGE_GLOBALS:  ifnet

2) INIT_VNET_* macros will declare and set up base pointers to be used
by V_ accessor macros, instead of resolving to whitespace:

    INIT_VNET_NET(ifp->if_vnet); becomes

    struct vnet_net *vnet_net = (ifp->if_vnet)->mod_data[VNET_MOD_NET];

3) Memory for vnet modules registered via vnet_mod_register() is now
allocated at run time in sys/kern/kern_vimage.c, instead of per vnet
module structs being declared as globals.  If required, vnet modules
can now request the framework to provide them with allocated bzeroed
memory by filling in the vmi_size field in their vmi_modinfo structures.

4) structs socket, ifnet, inpcbinfo, tcpcb and syncache_head are
extended to hold a pointer to the parent vnet.  options VIMAGE builds
will fill in those fields as required.

5) curvnet is introduced as a new global variable in options VIMAGE
builds, always pointing to the default and only struct vnet.

6) struct sysctl_oid has been extended with additional two fields to
store major and minor virtualization module identifiers, oid_v_subs and
oid_v_mod.  SYSCTL_V_* family of macros will fill in those fields
accordingly, and store the offset in the appropriate vnet container
struct in oid_arg1.
In sysctl handlers dealing with virtualized sysctls, the
SYSCTL_RESOLVE_V_ARG1() macro will compute the address of the target
variable and make it available in arg1 variable for further processing.

Unused fields in structs vnet_inet, vnet_inet6 and vnet_ipfw have
been deleted.

Reviewed by:	bz, rwatson
Approved by:	julian (mentor)
2009-04-30 13:36:26 +00:00
..
_bus_dma.h
_iovec.h
_lock.h - Embed the recursion counter for any locking primitive directly in the 2008-05-15 20:10:06 +00:00
_lockmgr.h - Embed the recursion counter for any locking primitive directly in the 2008-05-15 20:10:06 +00:00
_mutex.h - Embed the recursion counter for any locking primitive directly in the 2008-05-15 20:10:06 +00:00
_null.h Define NULL to be __null in a case of gnu c++. This makes sentinel attribute 2009-01-29 16:51:09 +00:00
_pthreadtypes.h Fix the visibility of several prototypes. Also move pthread_kill() and 2009-03-14 20:10:14 +00:00
_rmlock.h Initial checkin for rmlock (read mostly lock) a multi reader single writer 2007-11-08 14:47:55 +00:00
_rwlock.h - Embed the recursion counter for any locking primitive directly in the 2008-05-15 20:10:06 +00:00
_semaphore.h
_sigset.h
_stack.h Optimize lockmgr in order to get rid of the pool mutex interlock, of the 2008-04-06 20:08:51 +00:00
_sx.h - Embed the recursion counter for any locking primitive directly in the 2008-05-15 20:10:06 +00:00
_task.h revert changes accidentally included in last commit 2008-07-18 06:22:57 +00:00
_timespec.h
_timeval.h
_types.h Introduce accmode_t. This is required for NFSv4 ACLs - it will be neccessary 2008-10-28 13:44:11 +00:00
aac_ioctl.h Implement FSACTL_LNX_GET_FEATURES and FSACTL_GET_FEATURES ioctls. RAID 2008-03-28 19:07:25 +00:00
acct.h Increase precision of time values in the process accounting 2007-05-22 06:51:38 +00:00
acl.h Use acl_alloc() and acl_free() instead of using uma(9) directly. 2009-04-18 16:47:33 +00:00
agpio.h
aio.h Namespace: aio_waitcomplete() is a BSD extension. 2009-03-14 19:17:00 +00:00
alq.h
apm.h Define APM_ENT_NAMELEN and APM_ENT_TYPELEN for general use. 2008-06-12 04:37:37 +00:00
assym.h
ata.h Add experimental support for SATA Port Multipliers 2008-04-10 13:05:05 +00:00
bio.h
bitstring.h
blist.h add malloc flag to blist so that it can be used in ithread context 2008-05-05 19:48:54 +00:00
buf.h Fix two issues with bufdaemon, often causing the processes to hang in 2009-03-16 15:39:46 +00:00
buf_ring.h merge in 2 buf_ring helper routines for enqueueing and freeing buf_rings 2008-12-17 04:00:43 +00:00
bufobj.h Remove the struct thread unuseful argument from bufobj interface. 2008-10-10 21:23:50 +00:00
bus.h Split out the probing magic of device_probe_and_attach into 2008-06-20 16:58:15 +00:00
bus_dma.h When bouncing pages, allow a new option to preserve the intra-page 2009-02-08 22:54:58 +00:00
callout.h add callout_schedule; besides being useful it also improves 2008-08-02 17:42:38 +00:00
cdefs.h Hide __restrict from lint, just like we do with other keywords. 2009-03-01 17:44:31 +00:00
cdio.h
cdrio.h
cfictl.h Add support for frobbing Intel StrataFlash Protection Registers: 2009-02-05 18:12:07 +00:00
chio.h
clist.h Remove slush space from clists. 2009-02-04 17:10:01 +00:00
clock.h Now that all platforms use genclock, shuffle things around slightly 2008-04-22 19:38:30 +00:00
condvar.h - Pass the priority argument from *sleep() into sleepq and down into 2008-03-12 06:31:06 +00:00
conf.h Make dumper_t definition conform more closely to stlye(9). This also 2009-02-15 17:56:16 +00:00
cons.h Remove unused consdev structure fields. 2008-10-27 11:45:31 +00:00
consio.h
copyright.h Bump the odometer of the years, this time a bit early for 7.1R. 2008-12-30 04:48:59 +00:00
cpu.h Add an interface for drivers to be notified of changes to CPU frequency. 2007-03-26 18:03:29 +00:00
cpuctl.h - Add cpuctl(4) pseudo-device driver to provide access to some low-level 2008-08-08 16:26:53 +00:00
cpuset.h MFp4: 2008-11-29 14:32:14 +00:00
ctype.h
dataacq.h
device_port.h
devicestat.h
digiio.h
dir.h
dirent.h
disk.h Provide compatibility symlink for logical partitions: 2009-02-20 04:48:40 +00:00
disklabel.h Initial storage functionality for U-Boot support library. 2008-11-19 17:34:28 +00:00
diskmbr.h
diskpc98.h Move the PC98_[MS]ID_* defines from g_part_pc98.c to diskpc98.h. 2009-03-11 13:15:42 +00:00
dkstat.h
domain.h Add code to allow the system to handle multiple routing tables. 2008-05-09 23:03:00 +00:00
dtrace_bsd.h Add DTrace probes to the NFS access and attribute caches. Access cache 2009-03-24 17:14:34 +00:00
dvdio.h
elf.h Remove _SOLARIS_C_SOURCE compatibility definitions. Unfortunately the 2007-11-28 21:54:46 +00:00
elf32.h
elf64.h style(9) 2009-01-01 02:08:56 +00:00
elf_common.h Added DT_GNU_HASH entry for GNU-style hash table. 2009-04-10 21:24:18 +00:00
elf_generic.h style(9) 2009-01-01 02:08:56 +00:00
endian.h
errno.h
eui64.h
event.h The kqueue_register() function assumes that it is called from the top of 2008-07-07 09:30:11 +00:00
eventhandler.h Add an event handler to the vlan driver so the NIC driver 2008-07-14 18:38:52 +00:00
eventvar.h
exec.h
extattr.h Introduce accmode_t. This is required for NFSv4 ACLs - it will be neccessary 2008-10-28 13:44:11 +00:00
fbio.h
fcntl.h Add openat to the POSIX.1-2008 namespace. 2009-03-04 03:33:21 +00:00
fdcio.h
file.h style(9) 2009-01-01 02:29:17 +00:00
filedesc.h Revert UF_OPENING workaround for CURRENT. 2007-05-31 11:51:53 +00:00
filio.h Implement SEEK_DATA and SEEK_HOLE extensions to lseek(2) as found in 2007-04-05 21:10:53 +00:00
firmware.h Cleanup and document the implementation of firmware(9) based on 2007-02-15 17:21:31 +00:00
fnv_hash.h
gmon.h
gpt.h Add a couple more Apple GPT entries and NetBSD GPT entries. 2008-09-05 17:45:24 +00:00
hash.h Fix a compiler warning so hash.h can be included in the kernel. This changes 2007-04-09 22:55:14 +00:00
iconv.h
imgact.h Supply AT_EXECPATH auxinfo entry to the interpreter, both for native and 2009-03-17 12:53:28 +00:00
imgact_aout.h
imgact_elf.h Fix KBI breakage by r190520 which affects older linux.ko binaries: 2009-04-05 09:27:19 +00:00
inflate.h
interrupt.h Expose a new public routine intr_event_execute_handlers() which executes 2008-09-15 22:19:44 +00:00
ioccom.h Protect _IOC's 'len' and 'inout' parameters so that _IOC can be used in 2008-08-28 18:29:59 +00:00
ioctl.h Turn sgtty into a binary-only compatibility interface. 2008-06-14 10:42:18 +00:00
ioctl_compat.h Remove OTTYDISC, NETLDISC and NTTYDISC definitions. 2008-07-16 11:20:04 +00:00
ipc.h Make sure we restrict Linux only IPC calls from being executed 2008-02-12 20:55:03 +00:00
ipmi.h
jail.h Introduce the extensible jail framework, using the same "name=value" 2009-04-29 21:14:15 +00:00
joystick.h
kbio.h
kdb.h DTrace can enter the debugger from a probe. Add a WHY definition for this. 2008-05-23 04:00:44 +00:00
kenv.h
kernel.h Introduce vnet module registration / initialization framework with 2009-04-11 05:58:58 +00:00
kerneldump.h PowerPC, meet kernel core dumps. The support is based 2009-04-04 02:12:37 +00:00
kobj.h o Introduce KOBJMETHOD_END for the end of the kobj list. 2009-02-11 04:52:46 +00:00
ksem.h Rework the lifetime management of the kernel implementation of POSIX 2008-06-27 05:39:04 +00:00
kthread.h kthread_exit needs no stinkin argument. 2007-10-26 17:03:22 +00:00
ktr.h Grab KTR_SPARE1 and KTR_SPARE5 for KTR_INET and KTR_INET6 2009-04-29 09:54:33 +00:00
ktrace.h Add a new type of KTRACE record for sysctl(3) invocations. It uses the 2009-03-11 21:48:36 +00:00
libkern.h This commit fixes the issue with alias_sctp.c. No 2009-02-14 11:34:57 +00:00
limits.h
link_aout.h
link_elf.h style(9) 2009-01-01 02:11:01 +00:00
linker.h Add hooks for the Compact C Type Format (CTF) data to be attached to 2008-05-23 00:49:39 +00:00
linker_set.h
lock.h Add functions WITNESS so it can be asserted that the lock is not released for a 2009-01-21 04:19:18 +00:00
lock_profile.h - Implement a new mechanism for resetting lock profiling. We now 2009-03-15 06:41:47 +00:00
lockf.h Re-implement the client side of rpc.lockd in the kernel. This implementation 2008-06-26 10:21:54 +00:00
lockmgr.h Remove the assertive KA_HELD and KA_UNHELD as long as they are dangerous, 2009-02-05 15:09:04 +00:00
mac.h Update comments in mac.h. 2007-02-06 16:24:57 +00:00
malloc.h Garbage collect now-unused struct malloc_type fields, bump __FreeBSD_version 2009-04-19 11:20:57 +00:00
mbpool.h
mbuf.h Whitespace (use tabs like for all other lines). 2009-04-26 19:15:19 +00:00
mchain.h
md4.h
md5.h
mdioctl.h
memrange.h Initial suspend/resume support for amd64. 2009-03-17 00:48:11 +00:00
mman.h Add support to mincore for detecting whether a page is part of a 2008-03-28 04:29:27 +00:00
module.h - Invoke MOD_QUIESCE on all modules in a linker file (kld) before 2008-12-05 13:40:25 +00:00
mount.h Add a new internal mount flag (MNTK_EXTENDED_SHARED) to indicate that a 2009-03-11 14:13:47 +00:00
mouse.h Spell "Kensington Thinking Mouse" correctly. 2006-12-18 18:48:28 +00:00
mpt_ioctl.h Add a new personality to mpt(4) devices to allow userland applications to 2008-05-06 20:49:53 +00:00
mqueue.h
msg.h
msgbuf.h
mtio.h
mutex.h - Embed the recursion counter for any locking primitive directly in the 2008-05-15 20:10:06 +00:00
namei.h Update ZFS from version 6 to 13 and bring some FreeBSD-specific changes. 2008-11-17 20:49:29 +00:00
nlist_aout.h
osd.h Introduce the extensible jail framework, using the same "name=value" 2009-04-29 21:14:15 +00:00
param.h Permit buiding kernels with options VIMAGE, restricted to only a single 2009-04-30 13:36:26 +00:00
pciio.h - Add a new ioctl to /dev/pci to fetch details on an individual BAR of a 2009-02-02 22:04:40 +00:00
pcpu.h - Use __XSTRING where I want the define to be expanded. This resulted in 2009-01-25 07:35:10 +00:00
pioctl.h
pipe.h - Make maxpipekva a signed long rather than an unsigned long as overflow 2009-03-10 21:28:43 +00:00
pmc.h - Add support for nehalem/corei7 cpus. This supports all of the core 2009-01-27 07:29:37 +00:00
pmckern.h Support sparsely numbered CPUs. 2008-09-22 10:37:02 +00:00
pmclog.h - Add support for PMCs in Intel CPUs of Family 6, model 0xE (Core Solo 2008-11-27 09:00:47 +00:00
poll.h
posix4.h
power.h
priority.h Replace (name) with Henric Vestergaard Draboel since it was clear that 2007-01-08 21:21:45 +00:00
priv.h Introduce the extensible jail framework, using the same "name=value" 2009-04-29 21:14:15 +00:00
proc.h Fix two issues with bufdaemon, often causing the processes to hang in 2009-03-16 15:39:46 +00:00
procfs.h Widen psaddr_t from uintptr_t to uint64_t. This results in an 2008-09-14 16:52:42 +00:00
protosw.h Further cleanup protosw.h: 2009-01-06 11:02:17 +00:00
ptio.h
ptrace.h
queue.h Remove the unused insque() and remque() functions. 2009-04-26 21:06:11 +00:00
random.h
reboot.h
refcount.h Remove debugging cruft. 2008-07-23 16:44:20 +00:00
regression.h
resource.h Don't forget to add "npts" to rlimit_ident[] as well. 2008-12-11 18:32:05 +00:00
resourcevar.h Integrate the new MPSAFE TTY layer to the FreeBSD operating system. 2008-08-20 08:31:58 +00:00
rman.h
rmlock.h Add rm_wowned(9) function to test whether the current thread owns an 2007-11-10 15:06:30 +00:00
rtprio.h Replace (name) with Henric Vestergaard Draboel since it was clear that 2007-01-08 21:21:45 +00:00
runq.h - Restore runq to manipulating threads directly by putting runq links and 2008-03-20 05:51:16 +00:00
rwlock.h add RW_SYSINIT_FLAGS macro and rw_sysinit_flags initialization function 2008-12-08 21:46:55 +00:00
sbuf.h Add sbuf_new_auto as a shortcut for the very common case of creating a 2008-08-09 11:14:05 +00:00
sched.h - Implement generic macros for producing KTR records that are compatible 2009-01-17 07:17:57 +00:00
sdt.h Adding missing ";"'s required by some SDT_PROBE_DEFINEx() macros. 2009-03-03 18:23:16 +00:00
select.h
selinfo.h Refactor select to reduce contention and hide internal implementation 2007-12-16 06:21:20 +00:00
sem.h Namespace: semsys() and shmsys() aren't standard. 2009-03-14 19:06:52 +00:00
sema.h
semaphore.h Change SEM_VALUE_MAX (maximum value of a POSIX semaphore) from UINT_MAX 2008-06-26 13:51:25 +00:00
serial.h
sf_buf.h
shm.h Namespace: semsys() and shmsys() aren't standard. 2009-03-14 19:06:52 +00:00
sigio.h
signal.h Correct the visibility macro surrounding SIGSYS. 2008-01-19 21:41:31 +00:00
signalvar.h Fix for the panic("vm_thread_new: kstack allocation failed") and 2007-11-05 11:36:16 +00:00
sleepqueue.h Document the new return values for sleepq_abort(), sleepq_broadcast(), and 2008-08-07 20:47:01 +00:00
smp.h - Remove the bogus idle thread state code. This may have a race in it 2009-04-29 03:15:43 +00:00
snoop.h
sockbuf.h move sockbuf locking macros in to sockbuf.h 2008-07-31 20:27:50 +00:00
socket.h Add prototype defination for setfib(2) to sys/socket.h. 2008-08-08 22:40:04 +00:00
socketvar.h Permit buiding kernels with options VIMAGE, restricted to only a single 2009-04-30 13:36:26 +00:00
sockio.h Trim some noise from some #ifdef's. This had leaked into the compat32 2008-07-30 21:01:51 +00:00
sockopt.h Factor sockbuf, sockopt, and sockstate out of socketvar.h in to separate headers. 2008-07-29 07:45:05 +00:00
sockstate.h Factor sockbuf, sockopt, and sockstate out of socketvar.h in to separate headers. 2008-07-29 07:45:05 +00:00
soundcard.h Import some new constants and structures fields from OSSv4. 2009-01-10 18:19:22 +00:00
stack.h Optimize lockmgr in order to get rid of the pool mutex interlock, of the 2008-04-06 20:08:51 +00:00
stat.h Various namespace cleanups, including exposing fchmod() and fchmodat() 2009-03-14 19:11:08 +00:00
statvfs.h
stddef.h
stdint.h
sun_disklabel.h
sx.h Fix compilation of arm's AVILA. 2008-08-13 09:20:52 +00:00
syscall.h Regen for new jail system calls in r191673. 2009-04-29 21:50:13 +00:00
syscall.mk Regen for new jail system calls in r191673. 2009-04-29 21:50:13 +00:00
syscallsubr.h Introduce the extensible jail framework, using the same "name=value" 2009-04-29 21:14:15 +00:00
sysctl.h Permit buiding kernels with options VIMAGE, restricted to only a single 2009-04-30 13:36:26 +00:00
sysent.h Add sv_flags field to struct sysentvec with intention to provide description 2008-11-22 12:36:15 +00:00
syslimits.h Use the same ARG_MAX for arm than for the other platforms. I don't see any 2007-05-29 15:14:46 +00:00
syslog.h Namespace: vsyslog() is a BSD extension. 2009-03-14 19:07:25 +00:00
sysproto.h Regen for new jail system calls in r191673. 2009-04-29 21:50:13 +00:00
systm.h Revert r190676,190677 2009-04-10 04:08:34 +00:00
taskqueue.h revert changes accidentally included in last commit 2008-07-18 06:22:57 +00:00
termios.h Use namespace visibility macros instead of checking for _POSIX_SOURCE. 2009-03-14 19:06:07 +00:00
thr.h Add thr_kill2 syscall which sends a signal to a thread in another process. 2007-08-16 05:26:42 +00:00
tiio.h
time.h Namespace: adjtime(), futimes(), futimesat(), lutimes(), and settimeofday() 2009-03-14 19:15:13 +00:00
timeb.h
timepps.h
timers.h
times.h
timespec.h
timetc.h
timex.h
tree.h In sys/tree.h: 2009-03-01 04:57:23 +00:00
tty.h Serialize write() calls on TTYs. 2009-02-11 16:28:49 +00:00
ttycom.h Integrate the new MPSAFE TTY layer to the FreeBSD operating system. 2008-08-20 08:31:58 +00:00
ttydefaults.h Reduce the default baud rate of PTY's to 9600. 2008-11-08 20:40:39 +00:00
ttydevsw.h Introduce a hooks layer for the MPSAFE TTY layer. 2008-09-22 19:25:14 +00:00
ttydisc.h Introduce a hooks layer for the MPSAFE TTY layer. 2008-09-22 19:25:14 +00:00
ttyhook.h Change ttyhook_register() second argument from thread to process pointer. 2008-12-13 21:17:46 +00:00
ttyqueue.h Slightly improve the design of the TTY buffer. 2009-02-03 19:58:28 +00:00
turnstile.h Commit 3/14 of sched_lock decomposition. 2007-06-04 23:51:44 +00:00
types.h Last step of splitting up minor and unit numbers: remove minor(). 2009-01-28 17:57:16 +00:00
ucontext.h
ucred.h Add padding for anticipated functionality 2007-12-07 01:46:13 +00:00
uio.h Namespace: preadv() and pwritev() are extensions. 2009-03-14 19:07:58 +00:00
umtx.h Add two commands to _umtx_op system call to allow a simple mutex to be 2008-06-24 07:32:12 +00:00
un.h Now that portalfs doesn't directly invoke uipc_connect2(), make it a 2008-10-06 18:43:11 +00:00
unistd.h Fix a typo in a comment. 2009-01-31 10:04:36 +00:00
unpcb.h Remove explicit locking of struct file. 2007-12-30 01:42:15 +00:00
user.h kf_offset was supposed to be signed. 2008-12-02 10:39:47 +00:00
utsname.h
uuid.h
vimage.h Permit buiding kernels with options VIMAGE, restricted to only a single 2009-04-30 13:36:26 +00:00
vmmeter.h Correct the description of v_cache_count. Eliminate an unused function. 2008-07-19 22:35:13 +00:00
vnode.h Remove VOP_LEASE and supporting functions. This hasn't been used since 2009-04-10 10:52:19 +00:00
vtoc.h Add __packed to the part sub-structure to compensate for 2008-12-14 23:12:36 +00:00
wait.h Implement WNOWAIT flag for wait4(2). It specifies that process whose status 2008-08-26 12:37:16 +00:00
watchdog.h Align the interfaces for the various watchdogs and make the interface 2006-12-15 21:44:49 +00:00