freebsd with flexible iflib nic queues
Go to file
Konstantin Belousov 333d0c6060 Add support for the XSAVEOPT instruction use. Our XSAVE/XRSTOR usage
mostly meets the guidelines set by the Intel SDM:
1. We use XRSTOR and XSAVE from the same CPL using the same linear
   address for the store area
2. Contrary to the recommendations, we cannot zero the FPU save area
   for a new thread, since fork semantic requires the copy of the
   previous state. This advice seemingly contradicts to the advice
   from the item 6.
3. We do use XSAVEOPT in the context switch code only, and the area
   for XSAVEOPT already always contains the data saved by XSAVE.
4. We do not modify the save area between XRSTOR, when the area is
   loaded into FPU context, and XSAVE. We always spit the fpu context
   into save area and start emulation when directly writing into FPU
   context.
5. We do not use segmented addressing to access save area, or rather,
   always address it using %ds basing.
6. XSAVEOPT can be only executed in the area which was previously
   loaded with XRSTOR, since context switch code checks for FPU use by
   outgoing thread before saving, and thread which stopped emulation
   forcibly get context loaded with XRSTOR.
7. The PCB cannot be paged out while FPU emulation is turned off, since
   stack of the executing thread is never swapped out.

The context switch code is patched to issue XSAVEOPT instead of XSAVE
if supported. This approach eliminates one conditional in the context
switch code, which would be needed otherwise.

For user-visible machine context to have proper data, fpugetregs()
checks for unsaved extension blocks and manually copies pristine FPU
state into them, according to the description provided by CPUID leaf
0xd.

MFC after:  1 month
2012-07-14 15:48:30 +00:00
bin Merge libedit adjustment from NetBSD. 2012-07-11 22:17:58 +00:00
cddl Merge illumos commit 13749:df4cd82e2b60 2012-07-13 12:37:34 +00:00
contrib Pull in r159895 from upstream clang trunk: 2012-07-13 21:48:01 +00:00
crypto Merge OpenSSL 1.0.1c. 2012-07-12 19:30:53 +00:00
etc MFP4 214344: 2012-07-13 20:10:59 +00:00
games Partial revert of previous commit as some of the changes were not 2012-05-10 12:46:12 +00:00
gnu After the binutils 2.17.50 import, the assembler supports AS_REL16 2012-07-08 17:02:14 +00:00
include The register_printf_render_std() function expects regular string. 2012-07-04 17:35:07 +00:00
kerberos5 Centralize the specification of the krb5 build tools. 2012-06-01 21:26:28 +00:00
lib Merge OpenSSL 1.0.1c. 2012-07-12 19:30:53 +00:00
libexec Ensure that for the object which is a dependency for some filtee, 2012-06-27 20:24:25 +00:00
release Automatically generate hardware notes for bwn(4). 2012-06-28 10:21:25 +00:00
rescue Disable jail support in ifconfig when either building a rescue 2012-02-14 07:14:42 +00:00
sbin Document the behavior of mount with failok specified. 2012-07-12 15:20:20 +00:00
secure Sort ASM definitions by crypto module for slightly easier maintenance. 2012-07-12 21:31:53 +00:00
share Change language in WITH_BSDCONFIG to match other options, and regen 2012-07-14 10:17:47 +00:00
sys Add support for the XSAVEOPT instruction use. Our XSAVE/XRSTOR usage 2012-07-14 15:48:30 +00:00
tools Change language in WITH_BSDCONFIG to match other options, and regen 2012-07-14 10:17:47 +00:00
usr.bin Fix spelling 2012-07-07 17:05:55 +00:00
usr.sbin Mdoc and whitespace fixes. 2012-07-14 06:17:17 +00:00
COPYRIGHT Happy 2012 to FreeBSD users in Samoa. 2011-12-31 04:38:04 +00:00
LOCKS
MAINTAINERS Add isci(4) driver for amd64 and i386 targets. 2012-01-31 19:38:18 +00:00
Makefile Add "hier" as an alternate spelling of "hierarchy" to match hier(9). 2012-07-03 06:41:00 +00:00
Makefile.inc1 Add "hier" as an alternate spelling of "hierarchy" to match hier(9). 2012-07-03 06:41:00 +00:00
ObsoleteFiles.inc Fix the previous commit. Obsolete libraries must be added to OLD_LIBS. 2012-07-12 23:11:30 +00:00
README Add the cddl/ directory. 2010-11-14 11:32:56 +00:00
UPDATING Merge OpenSSL 1.0.1c. 2012-07-12 19:30:53 +00:00

This is the top level of the FreeBSD source directory.  This file
was last revised on:
$FreeBSD$

For copyright information, please see the file COPYRIGHT in this
directory (additional copyright information also exists for some
sources in this tree - please see the specific source directories for
more information).

The Makefile in this directory supports a number of targets for
building components (or all) of the FreeBSD source tree, the most
commonly used one being ``world'', which rebuilds and installs
everything in the FreeBSD system from the source tree except the
kernel, the kernel-modules and the contents of /etc.  The ``world''
target should only be used in cases where the source tree has not
changed from the currently running version.  See:
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/makeworld.html
for more information, including setting make(1) variables.

The ``buildkernel'' and ``installkernel'' targets build and install
the kernel and the modules (see below).  Please see the top of
the Makefile in this directory for more information on the
standard build targets and compile-time flags.

Building a kernel is a somewhat more involved process, documentation
for which can be found at:
   http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig.html
And in the config(8) man page.
Note: If you want to build and install the kernel with the
``buildkernel'' and ``installkernel'' targets, you might need to build
world before.  More information is available in the handbook.

The sample kernel configuration files reside in the sys/<arch>/conf
sub-directory (assuming that you've installed the kernel sources), the
file named GENERIC being the one used to build your initial installation
kernel.  The file NOTES contains entries and documentation for all possible
devices, not just those commonly used.  It is the successor of the ancient
LINT file, but in contrast to LINT, it is not buildable as a kernel but a
pure reference and documentation file.


Source Roadmap:
---------------
bin		System/user commands.

cddl		Various commands and libraries under the Common Development
		and Distribution License.

contrib		Packages contributed by 3rd parties.

crypto		Cryptography stuff (see crypto/README).

etc		Template files for /etc.

games		Amusements.

gnu		Various commands and libraries under the GNU Public License.
		Please see gnu/COPYING* for more information.

include		System include files.

kerberos5	Kerberos5 (Heimdal) package.

lib		System libraries.

libexec		System daemons.

release		Release building Makefile & associated tools.

rescue		Build system for statically linked /rescue utilities.

sbin		System commands.

secure		Cryptographic libraries and commands.

share		Shared resources.

sys		Kernel sources.

tools		Utilities for regression testing and miscellaneous tasks.

usr.bin		User commands.

usr.sbin	System administration commands.


For information on synchronizing your source tree with one or more of
the FreeBSD Project's development branches, please see:

  http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/synching.html