]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
10 years agoEliminate the fake contig_dmamap and replace it with a new flag,
Scott Long [Tue, 27 May 2014 21:31:11 +0000 (21:31 +0000)]
Eliminate the fake contig_dmamap and replace it with a new flag,
BUS_DMA_KMEM_ALLOC.  They serve the same purpose, but using the flag
means that the map can be NULL again, which in turn enables significant
optimizations for the common case of no bouncing.

Obtained from: Netflix, Inc.
MFC after: 3 days

10 years agoimprove ifconfig(8) man page by describing special behaviour of -l ether
Allan Jude [Tue, 27 May 2014 20:45:15 +0000 (20:45 +0000)]
improve ifconfig(8) man page by describing special behaviour of -l ether

PR: docs/187644
Submitted by: Andrew Merenbach (original patch)
Approved by: bcr (mentor)

10 years agoFix a couple of size_t != int warnings.
John Baldwin [Tue, 27 May 2014 20:22:36 +0000 (20:22 +0000)]
Fix a couple of size_t != int warnings.

10 years agoVarious cleanups and fixes:
John Baldwin [Tue, 27 May 2014 19:56:02 +0000 (19:56 +0000)]
Various cleanups and fixes:
- Switch from timeout() to callout_*() for per-request timers.
- Use device_find_child() in the identify routine.
- Use device_printf() instead of passing device_get_nameunit() to
  printf().
- Expand the SBP_LOCK coverage simplifying the locking.
- Uninline STAILQ_FOREACH_SAFE().

Tested by: sbruno

10 years agoMFV r266766:
Xin LI [Tue, 27 May 2014 19:46:11 +0000 (19:46 +0000)]
MFV r266766:

Add a new zfs property, "redundant_metadata" which can have values "all" or
"most".  The default will be "all", which is the current behavior.  When set
to all, ZFS stores an extra copy of all metadata.  If a single on-disk block
is corrupt, at worst a single block of user data (which is recordsize bytes
long) can be lost.

Setting to "most" will cause us to only store 1 copy of level-1 indirect
blocks of user data files.  This can improve performance of random writes,
because less metadata has to be written.  In practice,  at worst about
100 blocks (of recordsize bytes each) of user data can be lost if a single
on-disk block is corrupt.

The exact behavior of which metadata blocks are stored redundantly may change
in future releases.

Illumos issue: 3835 zfs need not store 2 copies of all metadata

MFC after: 2 weeks

10 years agoAdd support for the Intel Centrino Wireless-N 105 chipset.
Gavin Atkinson [Tue, 27 May 2014 19:39:57 +0000 (19:39 +0000)]
Add support for the Intel Centrino Wireless-N 105 chipset.

MFC after: 2 weeks
Relnotes: yes

10 years ago3835 zfs need not store 2 copies of all metadata
Xin LI [Tue, 27 May 2014 19:05:26 +0000 (19:05 +0000)]
3835 zfs need not store 2 copies of all metadata

illumos/illumos-gate@edf345e6b8342e8627ec20ce821a977a62cee19d

10 years ago- Rework the XSAVE/XRSTOR emulation to only expose XCR0 features to the
John Baldwin [Tue, 27 May 2014 19:04:38 +0000 (19:04 +0000)]
- Rework the XSAVE/XRSTOR emulation to only expose XCR0 features to the
  guest for which the rules regarding xsetbv emulation are known.  In
  particular future extensions like AVX-512 have interdependencies among
  feature bits that could allow a guest to trigger a GP# in the host with
  the current approach of allowing anything the host supports.
- Add proper checking of Intel MPX and AVX-512 XSAVE features in the
  xsetbv emulation and allow these features to be exposed to the guest if
  they are enabled in the host.
- Expose a subset of known-safe features from leaf 0 of the structured
  extended features to guests if they are supported on the host including
  RDFSBASE/RDGSBASE, BMI1/2, AVX2, AVX-512, HLE, ERMS, and RTM.  Aside
  from AVX-512, these features are all new instructions available for use
  in ring 3 with no additional hypervisor changes needed.

Reviewed by: neel

10 years ago4730 metaslab group taskq should be destroyed in metaslab_group_destroy()
Xin LI [Tue, 27 May 2014 19:02:25 +0000 (19:02 +0000)]
4730 metaslab group taskq should be destroyed in metaslab_group_destroy()

illumos/illumos-gate@be082110c08433beadb738ad3be035a73d995ea8

10 years ago4698 fix builds by gcc44 on sparc
Xin LI [Tue, 27 May 2014 19:01:10 +0000 (19:01 +0000)]
4698 fix builds by gcc44 on sparc

(This change is not applicable to FreeBSD)

illumos/illumos-gate@9c720e3bfb657054035cb780c4d222291b7d4917

10 years agoPortmgr no longer need the UL hack.
Simon J. Gerraty [Tue, 27 May 2014 18:39:13 +0000 (18:39 +0000)]
Portmgr no longer need the UL hack.

Reviewed by: obrien

10 years agocxgbe(4): netmap support for Terminator 5 (T5) based 10G/40G cards.
Navdeep Parhar [Tue, 27 May 2014 18:18:41 +0000 (18:18 +0000)]
cxgbe(4): netmap support for Terminator 5 (T5) based 10G/40G cards.
Netmap gets its own hardware-assisted virtual interface and won't take
over or disrupt the "normal" interface in any way.  You can use both
simultaneously.

For kernels with DEV_NETMAP, cxgbe(4) carves out an ncxl<N> interface
(note the 'n' prefix) in the hardware to accompany each cxl<N>
interface.  These two ifnet's per port share the same wire but really
are separate interfaces in the hardware and software.  Each gets its own
L2 MAC addresses (unicast and multicast), MTU, checksum caps, etc.  You
should run netmap on the 'n' interfaces only, that's what they are for.

With this, pkt-gen is able to transmit > 45Mpps out of a single 40G port
of a T580 card.  2 port tx is at ~56Mpps total (28M + 28M) as of now.
Single port receive is at 33Mpps but this is very much a work in
progress.  I expect it to be closer to 40Mpps once done.  In any case
the current effort can already saturate multiple 10G ports of a T5 card
at the smallest legal packet size.  T4 gear is totally untested.

trantor:~# ./pkt-gen -i ncxl0 -f tx -D 00:07:43:ab:cd:ef
881.952141 main [1621] interface is ncxl0
881.952250 extract_ip_range [275] range is 10.0.0.1:0 to 10.0.0.1:0
881.952253 extract_ip_range [275] range is 10.1.0.1:0 to 10.1.0.1:0
881.962540 main [1804] mapped 334980KB at 0x801dff000
Sending on netmap:ncxl0: 4 queues, 1 threads and 1 cpus.
10.0.0.1 -> 10.1.0.1 (00:00:00:00:00:00 -> 00:07:43:ab:cd:ef)
881.962562 main [1882] Sending 512 packets every  0.000000000 s
881.962563 main [1884] Wait 2 secs for phy reset
884.088516 main [1886] Ready...
884.088535 nm_open [457] overriding ifname ncxl0 ringid 0x0 flags 0x1
884.088607 sender_body [996] start
884.093246 sender_body [1064] drop copy
885.090435 main_thread [1418] 45206353 pps (45289533 pkts in 1001840 usec)
886.091600 main_thread [1418] 45322792 pps (45375593 pkts in 1001165 usec)
887.092435 main_thread [1418] 45313992 pps (45351784 pkts in 1000834 usec)
888.094434 main_thread [1418] 45315765 pps (45406397 pkts in 1002000 usec)
889.095434 main_thread [1418] 45333218 pps (45378551 pkts in 1001000 usec)
890.097434 main_thread [1418] 45315247 pps (45405877 pkts in 1002000 usec)
891.099434 main_thread [1418] 45326515 pps (45417168 pkts in 1002000 usec)
892.101434 main_thread [1418] 45333039 pps (45423705 pkts in 1002000 usec)
893.103434 main_thread [1418] 45324105 pps (45414708 pkts in 1001999 usec)
894.105434 main_thread [1418] 45318042 pps (45408723 pkts in 1002001 usec)
895.106434 main_thread [1418] 45332430 pps (45377762 pkts in 1001000 usec)
896.107434 main_thread [1418] 45338072 pps (45383410 pkts in 1001000 usec)
...

Relnotes: Yes
Sponsored by: Chelsio Communications.

10 years agoBetter documentation for why KERBEROS and OPENSSH are here, and where
Warner Losh [Tue, 27 May 2014 16:30:54 +0000 (16:30 +0000)]
Better documentation for why KERBEROS and OPENSSH are here, and where
to look for all the other options that used to be here (well, in
bsd.own.mk)

Suggested by: des@

10 years agoRegen after r266752.
Glen Barber [Tue, 27 May 2014 15:55:26 +0000 (15:55 +0000)]
Regen after r266752.

Sponsored by: The FreeBSD Foundation

10 years agoRemove empty lines that cause mdoc warnings.
Glen Barber [Tue, 27 May 2014 15:52:27 +0000 (15:52 +0000)]
Remove empty lines that cause mdoc warnings.

Sponsored by: The FreeBSD Foundation

10 years agoNow that there are separate back-end implementations of busdma, the bounce
Scott Long [Tue, 27 May 2014 14:18:57 +0000 (14:18 +0000)]
Now that there are separate back-end implementations of busdma, the bounce
implementation shouldn't steal flags from the common front-end.
Move those flags to the back-end.

Obtained from:  Netflix, Inc.
MFC after:      3 days

10 years agoRevert r266481. It was based on faulty analysis of the problem. A correct
Scott Long [Tue, 27 May 2014 14:06:23 +0000 (14:06 +0000)]
Revert r266481.  It was based on faulty analysis of the problem.  A correct
fix is forthcoming.

Obtained from: Netflix, Inc.

10 years agoAdd PCI ID for AMT based serial interface found on the Lenovo T61.
Sean Bruno [Tue, 27 May 2014 13:35:31 +0000 (13:35 +0000)]
Add PCI ID for AMT based serial interface found on the Lenovo T61.

uart2: <Intel AMT - PM965/GM965 KT Controller> port 0x1830-0x1837
mem 0xfe024000-0xfe024fff irq 17 at device 3.3 on pci0
uart2: console (115200,n,8,1)

Tested as tty and serial console.  Seems "fine"

10 years agoDisconnect the following geom classes from the kernel modules build:
Andrey V. Elsukov [Tue, 27 May 2014 10:21:49 +0000 (10:21 +0000)]
Disconnect the following geom classes from the kernel modules build:
BSD, FOX, MBR, PC98, SUNLABEL and VOL_FFS. They all have a modern
replacement. Also it is still possible build them manually.

Discussed with: geom

10 years ago- Correct bus space resource type for register access.
Hans Petter Selasky [Tue, 27 May 2014 10:12:16 +0000 (10:12 +0000)]
- Correct bus space resource type for register access.
- Add configuration of interrupt type and polarity via FDT.

Sponsored by: DARPA, AFRL

10 years agoMultiple fixes and improvements:
Hans Petter Selasky [Tue, 27 May 2014 10:01:19 +0000 (10:01 +0000)]
Multiple fixes and improvements:
- Put "_LE_" into the register access macros to indicate little endian
byte order is expected by the hardware.
- Avoid using the bounce buffer when not strictly needed. Try to move
data directly using bus-space functions first.
- Ensure we preserve the reserved bits in the power down mode
register. Else the hardware goes into a non-recoverable state.
- Always use 32-bit access when writing or reading registers or FIFOs,
because the hardware is 32-bit oriented and don't really understand 8-
and 16-bit access.
- Correct writes to the memory address register. There is no need to
shift the register offset.
- Correct interval for interrupt endpoints.
- Optimise 90ns internal memory buffer read delay.
- Rename PDT into PTD, which is how the datasheet writes it.
- Add missing programming for activating host controller PTDs.

Sponsored by: DARPA, AFRL

10 years ago- Improve performance by fixing incorrect Rx/Tx handling
Kevin Lo [Tue, 27 May 2014 08:14:54 +0000 (08:14 +0000)]
- Improve performance by fixing incorrect Rx/Tx handling
- Rename definition of AXGE_* to reflect reality
- Add new USB IDs

10 years agoThe users of RSS shouldn't be directly concerned about hash -> CPU ID
Adrian Chadd [Tue, 27 May 2014 08:06:20 +0000 (08:06 +0000)]
The users of RSS shouldn't be directly concerned about hash -> CPU ID
mappings.  Instead, they should be first mapping to an RSS bucket and
then querying the RSS bucket -> CPU ID mapping to figure out the target
CPU.

When (if?) RSS rebalancing is implemented or some other (non round-robin)
distribution of work from buckets to CPU IDs, various bits of code - both
userland and kernel - will need to know how this mapping works.

So, to support this:

* Add a new function rss_m2bucket() - this maps an mbuf to a given bucket.
  Anything which is currently doing hash -> CPU work may instead wish to
  do hash -> bucket, and then query the bucket->cpuid map for which
  CPU it belongs on.  Or, map it to a bucket, then re-pin that bucket ->
  CPU during a rebalance operation.

* For userland applications which wish to exploit affinity to RSS buckets,
  the bucket -> CPU ID mapping is now available via a sysctl.
  net.inet.rss.bucket_mapping lists the bucket to CPU ID mapping via
  a list of bucket:cpu pairs.

10 years agoUpdate backend files and makefiles for apr 1.4.8 -> 1.5.1
Peter Wemm [Tue, 27 May 2014 07:16:43 +0000 (07:16 +0000)]
Update backend files and makefiles for apr 1.4.8 -> 1.5.1

10 years agoMerge apr-1.4.8 -> apr-1.5.1 and update.
Peter Wemm [Tue, 27 May 2014 07:15:14 +0000 (07:15 +0000)]
Merge apr-1.4.8 -> apr-1.5.1 and update.

10 years agoVendor import apr-1.5.1
Peter Wemm [Tue, 27 May 2014 07:00:33 +0000 (07:00 +0000)]
Vendor import apr-1.5.1

10 years agoXr bktr.4
Kevin Lo [Tue, 27 May 2014 06:35:36 +0000 (06:35 +0000)]
Xr bktr.4

10 years agoMerge svn-1.8.8 -> 1.8.9
Peter Wemm [Tue, 27 May 2014 04:59:53 +0000 (04:59 +0000)]
Merge svn-1.8.8 -> 1.8.9

10 years agoVendor import svn-1.8.9
Peter Wemm [Tue, 27 May 2014 04:55:31 +0000 (04:55 +0000)]
Vendor import svn-1.8.9

10 years agoUpdate serf 1.3.4 -> 1.3.5
Peter Wemm [Tue, 27 May 2014 04:52:32 +0000 (04:52 +0000)]
Update serf 1.3.4 -> 1.3.5

10 years agoVendor import serf-1.3.5
Peter Wemm [Tue, 27 May 2014 04:39:03 +0000 (04:39 +0000)]
Vendor import serf-1.3.5

10 years agoEmphasis on 'do not' and 'complement' in the strcspn(3)
Allan Jude [Tue, 27 May 2014 04:30:56 +0000 (04:30 +0000)]
Emphasis on 'do not' and 'complement' in the strcspn(3)
Replace literal parentheses with .Po/.Pc

Approved by: wblock (mentor)

10 years agoAdd segment protection and limits violation checks in vie_calculate_gla()
Neel Natu [Tue, 27 May 2014 04:26:22 +0000 (04:26 +0000)]
Add segment protection and limits violation checks in vie_calculate_gla()
for 32-bit x86 guests.

Tested using ins/outs executed in a FreeBSD/i386 guest.

10 years agoGarbage-collect a couple of unused identifiers.
Mark Johnston [Tue, 27 May 2014 02:00:43 +0000 (02:00 +0000)]
Garbage-collect a couple of unused identifiers.

MFC after: 3 days

10 years agoRemove r264317 by accident.
Kevin Lo [Tue, 27 May 2014 01:47:23 +0000 (01:47 +0000)]
Remove r264317 by accident.

Spotted by: Kuan-Chung Chiu

10 years agoLanguage cleanup.
Christian Brueffer [Mon, 26 May 2014 19:02:34 +0000 (19:02 +0000)]
Language cleanup.

Reviewed by: mav, bcr, wblock
MFC after: 1 week

10 years agoFix issue with restarting an "insb/insw/insl" instruction because of a page
Neel Natu [Mon, 26 May 2014 18:21:08 +0000 (18:21 +0000)]
Fix issue with restarting an "insb/insw/insl" instruction because of a page
fault on the destination buffer.

Prior to this change a page fault would be detected in vm_copyout(). This
was done after the I/O port access was done. If the I/O port access had
side-effects (e.g. reading the uart FIFO) then restarting the instruction
would result in incorrect behavior.

Fix this by validating the guest linear address before doing the I/O port
emulation. If the validation results in a page fault exception being injected
into the guest then the instruction can now be restarted without any
side-effects.

10 years agoRework the Ti GPIO driver to work on multiple SoCs. At the moment it could
Andrew Turner [Mon, 26 May 2014 18:02:36 +0000 (18:02 +0000)]
Rework the Ti GPIO driver to work on multiple SoCs. At the moment it could
work with OMAP4 and AM335x without needing to recompile.

Reviewed by: loos

10 years agoNote proper revision number for sendmail 8.14.9 merge.
Gregory Neil Shapiro [Mon, 26 May 2014 15:54:31 +0000 (15:54 +0000)]
Note proper revision number for sendmail 8.14.9 merge.

10 years agoprintf(1): add tests for warn about incomplete uses n$
Pedro F. Giffuni [Mon, 26 May 2014 15:08:39 +0000 (15:08 +0000)]
printf(1): add tests for  warn about incomplete uses n$

Submitted by: jilles
MFC after: 2 weeks

10 years agoprintf(1): warn about incomplete uses n$
Pedro F. Giffuni [Mon, 26 May 2014 14:57:47 +0000 (14:57 +0000)]
printf(1): warn about incomplete uses n$

Reviewed by: jilles
Obtained from: Illumos
MFC after: 2 weeks

10 years agoe1000: add missing braces
Eitan Adler [Mon, 26 May 2014 02:19:50 +0000 (02:19 +0000)]
e1000: add missing braces

Obtained from: DragonFlyBSD

10 years agoAdd the clang patch for r266674.
Dimitry Andric [Sun, 25 May 2014 19:28:34 +0000 (19:28 +0000)]
Add the clang patch for r266674.

10 years agoPull in r209489 from upstream clang trunk (by Akira Hatanaka):
Dimitry Andric [Sun, 25 May 2014 19:22:28 +0000 (19:22 +0000)]
Pull in r209489 from upstream clang trunk (by Akira Hatanaka):

  Fix a bug in xmmintrin.h.

  The last step of _mm_cvtps_pi16 should use _mm_packs_pi32, which is a function
  that reads two __m64 values and packs four 32-bit values into four 16-bit
  values.

  <rdar://problem/16873717>

MFC after: 3 days

10 years agoDelete obsolete and unused PJ4B CPU functions
Zbigniew Bodek [Sun, 25 May 2014 19:19:41 +0000 (19:19 +0000)]
Delete obsolete and unused PJ4B CPU functions

Since PJ4Bv7 uses armv7_ CPU functions only pj4b_config
function is necessary. Remove obsolete routines.

10 years agoFix context switch on PJ4Bv7 and remove obsolete pj4b_/arm11 functions
Zbigniew Bodek [Sun, 25 May 2014 18:47:24 +0000 (18:47 +0000)]
Fix context switch on PJ4Bv7 and remove obsolete pj4b_/arm11 functions

Use armv7_setttb that sets proper PT attributes.
Get rid of unused CPU functions, put nullop instead.
Exchange obsolete pj4b_/arm11_ functions to the appropriate armv7_ ones.

10 years agoMerge strcspn.3 into strspn.3 and clarify the explaination of what they do
Allan Jude [Sun, 25 May 2014 18:40:32 +0000 (18:40 +0000)]
Merge strcspn.3 into strspn.3 and clarify the explaination of what they do
Detach strcspn.3 from the build
Add strcspn.3 to MLINKS do it will be symlinked to strspn.3

Approved by: eadler (mentor), bcr (mentor)

10 years agoAdd empty LIBUSB_CALL macro, to be compatible to the libusb 1.0-API
Hans Petter Selasky [Sun, 25 May 2014 18:06:32 +0000 (18:06 +0000)]
Add empty LIBUSB_CALL macro, to be compatible to the libusb 1.0-API
from sourceforge.

PR: usb/190204
MFC after: 1 week

10 years agoFix whitespace glitches.
Ian Lepore [Sun, 25 May 2014 14:01:30 +0000 (14:01 +0000)]
Fix whitespace glitches.

Pointed out by: jhb

10 years agoChange libatf-c and libatf-c++ to be private libraries.
Julio Merino [Sun, 25 May 2014 12:01:13 +0000 (12:01 +0000)]
Change libatf-c and libatf-c++ to be private libraries.

We should not be leaking these interfaces to the outside world given
that it's much easier for third-party components to use the devel/atf
package from ports.

As a side-effect, we can also drop the ATF pkgconfig and aclocal files
from the base system.  Nothing in the base system needs these, and it
was quite ugly to have to get them installed only so that a few ports
could build.  The offending ports have been fixed to depend on
devel/atf explicitly.

Reviewed by: bapt

10 years agoMake ti_padconf_devmap static in both places it is defined.
Andrew Turner [Sun, 25 May 2014 10:56:45 +0000 (10:56 +0000)]
Make ti_padconf_devmap static in both places it is defined.

10 years agoAllow the OMAP4 and AM335x prcm drivers to be compiled in the same kernel
Andrew Turner [Sun, 25 May 2014 10:49:07 +0000 (10:49 +0000)]
Allow the OMAP4 and AM335x prcm drivers to be compiled in the same kernel
by renaming the structures used.

10 years agoReduce the diff between the PandaBoard and BeableBone kernel configs to
Andrew Turner [Sun, 25 May 2014 10:17:26 +0000 (10:17 +0000)]
Reduce the diff between the PandaBoard and BeableBone kernel configs to
help with the creation of a more generic Ti kernel config.

10 years agoAdd path markup on sys/mbuf.h to previous netstat(1) man page update
Allan Jude [Sun, 25 May 2014 08:09:55 +0000 (08:09 +0000)]
Add path markup on sys/mbuf.h to previous netstat(1) man page update

Submitted by: brueffer
Reviewed by: eadler (mentor)

10 years agoDocument the new -R flag of netstat(1) introduced in r266448 that tracks the
Allan Jude [Sun, 25 May 2014 07:41:12 +0000 (07:41 +0000)]
Document the new -R flag of netstat(1) introduced in r266448 that tracks the
flowid for each socket.

Reviewed by: adrian
Approved by: eadler (mentor)

10 years agoMake SAF1761 driver endian safe.
Hans Petter Selasky [Sun, 25 May 2014 06:42:43 +0000 (06:42 +0000)]
Make SAF1761 driver endian safe.

Sponsored by: DARPA, AFRL

10 years agoDocument taskqueue_start_threads_pinned
Benjamin Kaduk [Sun, 25 May 2014 02:45:26 +0000 (02:45 +0000)]
Document taskqueue_start_threads_pinned

Requested by: adrian
Reviewed by: adrian
Approved by: hrs (mentor)
X-MFC-with: r266629

10 years agoRemove restriction on insb/insw/insl emulation. These instructions are
Neel Natu [Sun, 25 May 2014 02:05:23 +0000 (02:05 +0000)]
Remove restriction on insb/insw/insl emulation. These instructions are
properly emulated.

10 years agoDo the linear address calculation for the ins/outs emulation using a new
Neel Natu [Sun, 25 May 2014 00:57:24 +0000 (00:57 +0000)]
Do the linear address calculation for the ins/outs emulation using a new
API function 'vie_calculate_gla()'.

While the current implementation is simplistic it forms the basis of doing
segmentation checks if the guest is in 32-bit protected mode.

10 years agoUpdate to 20140422
Baptiste Daroussin [Sun, 25 May 2014 00:13:29 +0000 (00:13 +0000)]
Update to 20140422

10 years agoImport byacc 20140422
Baptiste Daroussin [Sun, 25 May 2014 00:06:54 +0000 (00:06 +0000)]
Import byacc 20140422

10 years agomerge libucl 20140514
Baptiste Daroussin [Sat, 24 May 2014 23:46:41 +0000 (23:46 +0000)]
merge libucl 20140514

this version brings xpath-like interface for ucl objects

10 years agoImport libucl version 2014-05-14 (almost 0.4.1)
Baptiste Daroussin [Sat, 24 May 2014 23:40:39 +0000 (23:40 +0000)]
Import libucl version 2014-05-14 (almost 0.4.1)
This bring ucl_lookup_path (xpath like for ucl objects)

10 years agoAdd libvmmapi functions vm_copyin() and vm_copyout() to copy into and out
Neel Natu [Sat, 24 May 2014 23:12:30 +0000 (23:12 +0000)]
Add libvmmapi functions vm_copyin() and vm_copyout() to copy into and out
of the guest linear address space. These APIs in turn use a new ioctl
'VM_GLA2GPA' to convert the guest linear address to guest physical.

Use the new copyin/copyout APIs when emulating ins/outs instruction in
bhyve(8).

10 years agoEnable automatic superpages promotion by default on ARMv6/v7
Zbigniew Bodek [Sat, 24 May 2014 22:46:00 +0000 (22:46 +0000)]
Enable automatic superpages promotion by default on ARMv6/v7

From now on superpages are enabled by default on ARM.
One can still disable superpages utilization by adding:

vm.pmap.sp_enabled=0

to loader.conf

10 years agoAdd the clang patch for r265477. While here, add a description to the
Dimitry Andric [Sat, 24 May 2014 22:27:31 +0000 (22:27 +0000)]
Add the clang patch for r265477.  While here, add a description to the
patch for r263619, and unify all the URLs to point to svnweb.

10 years agoAdd a new taskqueue setup method that takes a cpuid to pin the
Adrian Chadd [Sat, 24 May 2014 20:37:15 +0000 (20:37 +0000)]
Add a new taskqueue setup method that takes a cpuid to pin the
taskqueue worker thread(s) to.

For now it isn't a taskqueue/taskthread error to fail to pin
to the given cpuid.

Thanks to rpaulo@, kib@ and jhb@ for feedback.

Tested:

* igb(4), with local RSS patches to pin taskqueues.

TODO:

* ask the doc team for help in documenting the new API call.
* add a taskqueue_start_threads_cpuset() method which takes
  a cpuset_t - but this may require a bunch of surgery to
  bring cpuset_t into scope.

10 years agoUntabify.
Hans Petter Selasky [Sat, 24 May 2014 20:31:55 +0000 (20:31 +0000)]
Untabify.

Found by: jmmv @

10 years agoConsolidate all the information needed by the guest page table walker into
Neel Natu [Sat, 24 May 2014 20:26:57 +0000 (20:26 +0000)]
Consolidate all the information needed by the guest page table walker into
'struct vm_guest_paging'.

Check for canonical addressing in vmm_gla2gpa() and inject a protection
fault into the guest if a violation is detected.

If the page table walk is restarted in vmm_gla2gpa() then reset 'ptpphys' to
point to the root of the page tables.

10 years agoWhen injecting a page fault into the guest also update the guest's %cr2 to
Neel Natu [Sat, 24 May 2014 19:13:25 +0000 (19:13 +0000)]
When injecting a page fault into the guest also update the guest's %cr2 to
indicate the faulting linear address.

If the guest PML4 entry has the PG_PS bit set then inject a page fault into
the guest with the PGEX_RSV bit set in the error_code.

Get rid of redundant checks for the PG_RW violations when walking the page
tables.

10 years agoEliminate one of the causes of spurious interrupts on armv6. The arm weak
Ian Lepore [Sat, 24 May 2014 16:21:16 +0000 (16:21 +0000)]
Eliminate one of the causes of spurious interrupts on armv6.  The arm weak
memory ordering model allows writes to different devices to complete out
of order, leading to a situation where the write that clears an interrupt
source at a device can complete after a write that unmasks and EOIs the
interrupt at the interrupt controller, leading to a spurious re-interrupt.

This adds a generic barrier function specific to the needs of interrupt
controllers, and calls that function from the GIC and TI AINTC controllers.
There may still be other soc-specific controllers that need to make the call.

Reviewed by: cognet, Svatopluk Kraus <onwahe@gmail.com>
MFC after: 3 days

10 years agoRemove the prototpye for the static inline function
Bjoern A. Zeeb [Sat, 24 May 2014 15:31:40 +0000 (15:31 +0000)]
Remove the prototpye for the static inline function
tcp_signature_verify_input().
The function is defined before first use already.

MFC after: 2 weeks

10 years agosyncache_lookup() is a file local function. Make it static and
Bjoern A. Zeeb [Sat, 24 May 2014 15:03:36 +0000 (15:03 +0000)]
syncache_lookup() is a file local function.  Make it static and
take it out of the public KPI; seems it was never used elsewhere.

MFC after: 2 weeks

10 years agoMake tcp_twrespond() file local private; this removes it from the
Bjoern A. Zeeb [Sat, 24 May 2014 14:01:18 +0000 (14:01 +0000)]
Make tcp_twrespond() file local private;  this removes it from the
public KPI; it is not used anywhere else and seems it never was.

MFC after: 2 weeks

10 years agoIncrease taskqueue thread priority from idle to PRIBIO.
Alexander Motin [Sat, 24 May 2014 13:00:49 +0000 (13:00 +0000)]
Increase taskqueue thread priority from idle to PRIBIO.

Idle priority is not even time-share, so if system is busy in any way,
those events may never be executed.  Since in some cases system waits
for events processed by that thread, that may cause deadlocks.

10 years agoRight now, the rtld prefork hook locks the rtld bind lock in the read
Konstantin Belousov [Sat, 24 May 2014 10:23:06 +0000 (10:23 +0000)]
Right now, the rtld prefork hook locks the rtld bind lock in the read
mode.  This allows the binder to be functional in the child after the
fork (assuming no lazy loading of a filter is needed), but other rtld
services which require write lock on rtld_bind_lock cause deadlock, if
called by child.

Change the _rtld_atfork() to lock the bind lock in write mode, making
the rtld fully functional after the fork.

Pre-resolve the symbols which are called by the libthr' fork()
interposer, since dynamic resolution causes deadlock due to the
rtld_bind_lock already owned in the write mode.

Reported and tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

10 years agoOnly do a ports check if this is a NAT-T SA. Otherwise other
Bjoern A. Zeeb [Sat, 24 May 2014 09:29:23 +0000 (09:29 +0000)]
Only do a ports check if this is a NAT-T SA.  Otherwise other
lookups providing ports may get unexpected results.

MFC After: 2 weeks

10 years agoMove mutex creation from ipf_log_soft_init() to ipf_log_soft_create()
Cy Schubert [Sat, 24 May 2014 06:05:21 +0000 (06:05 +0000)]
Move mutex creation from ipf_log_soft_init() to ipf_log_soft_create()
to be consistent with mutex destruction in ipf_log_soft_destroy(). As a
result mutex destruction in ipf_log_soft_fini() is redundant.

Approved by: glebius (mentor)
Obtained from: darrenr (author)

10 years agoRemove the prototypes for things that are no longer file local but were
Bjoern A. Zeeb [Fri, 23 May 2014 21:12:33 +0000 (21:12 +0000)]
Remove the prototypes for things that are no longer file local but were
moved to the header file.

Pointy hat to: clang || bz
MFC after: 2 weeks
X-MFC with: r266596
Reported by: gcc build of sparc64

10 years agoMove the tcp_fields_to_host() and tcp_fields_to_net() (inline)
Bjoern A. Zeeb [Fri, 23 May 2014 20:15:01 +0000 (20:15 +0000)]
Move the tcp_fields_to_host() and tcp_fields_to_net() (inline)
functions to the tcp_var.h header file in order to avoid further
duplication with upcoming commits.

Reviewed by: np
MFC after: 2 weeks

10 years agoCheck for alignment check violation when processing in/out string instructions.
Neel Natu [Fri, 23 May 2014 19:59:14 +0000 (19:59 +0000)]
Check for alignment check violation when processing in/out string instructions.

10 years agoThere is no reason to perform the pmap_remove() on the kernel pmap while
Alan Cox [Fri, 23 May 2014 16:22:36 +0000 (16:22 +0000)]
There is no reason to perform the pmap_remove() on the kernel pmap while
the kmem object lock is held.  Do the pmap_remove() before acquiring the
kmem object lock.

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

10 years agoAllow CC to not actually exist. During the ports INDEX run, all the
Warner Losh [Fri, 23 May 2014 14:34:22 +0000 (14:34 +0000)]
Allow CC to not actually exist. During the ports INDEX run, all the
Makefiles are evaluated without building things. In a normal build,
the prerequisites would be built, and CC would be an actual thing. In
an INDEX build, though, they don't exists. Redirect stderr to get rid
of annoying messages, and assume that the compiler version is 0 if the
actual compiler can't tell us. Do this in preference to guessing based
on numbers because gcc410 might be 4.10, or 4.1.0 and without
carefully crafted special knowledge we differentiate between them
easily (also ming-gcc has no clues at all). Elsewhere, don't trust
the compiler version if it is 0.

10 years agoIf called without -T or -t, fsck attempts to detect the
Tom Rhodes [Fri, 23 May 2014 14:32:57 +0000 (14:32 +0000)]
If called without -T or -t, fsck attempts to detect the
file system type.  If this fails, fsck will fail with
"unknown file system type" message.

PR: 188214

10 years agodo not build libraries, they require a lot more stuff
Luigi Rizzo [Fri, 23 May 2014 11:22:44 +0000 (11:22 +0000)]
do not build libraries, they require a lot more stuff

10 years agoInitial import of character device in userspace support for FreeBSD.
Hans Petter Selasky [Fri, 23 May 2014 08:46:28 +0000 (08:46 +0000)]
Initial import of character device in userspace support for FreeBSD.
The CUSE library is a wrapper for the devfs kernel functionality which
is exposed through /dev/cuse . In order to function the CUSE kernel
code must either be enabled in the kernel configuration file or loaded
separately as a module. Currently none of the committed items are
connected to the default builds, except for installing the needed
header files. The CUSE code will be connected to the default world and
kernel builds in a follow-up commit.

The CUSE module was written by Hans Petter Selasky, somewhat inspired
by similar functionality found in FUSE. The CUSE library can be used
for many purposes. Currently CUSE is used when running Linux kernel
drivers in user-space, which need to create a character device node to
communicate with its applications. CUSE has full support for almost
all devfs functionality found in the kernel:
 - kevents
 - read
 - write
 - ioctl
 - poll
 - open
 - close
 - mmap
 - private per file handle data

Requested by several people. Also see "multimedia/cuse4bsd-kmod" in
ports.

10 years agoremove unused code (building older releases should use the
Luigi Rizzo [Fri, 23 May 2014 08:34:30 +0000 (08:34 +0000)]
remove unused code (building older releases should use the
picobsd file in the release itself)

10 years agoadd libraries to the initial build for picobsd.
Luigi Rizzo [Fri, 23 May 2014 08:10:07 +0000 (08:10 +0000)]
add libraries to the initial build for picobsd.

add a -j option so we can tune the amount of parallel make,
the default we used (-j 8) is large and was giving problems
with SUBDIR_PARALLEL due to some missing dependencies.

10 years agoAdd emulation of the "outsb" instruction. NetBSD guests use this to write to
Neel Natu [Fri, 23 May 2014 05:15:17 +0000 (05:15 +0000)]
Add emulation of the "outsb" instruction. NetBSD guests use this to write to
the UART FIFO.

The emulation is constrained in a number of ways: 64-bit only, doesn't check
for all exception conditions, limited to i/o ports emulated in userspace.

Some of these constraints will be relaxed in followup commits.

Requested by: grehan
Reviewed by: tychon (partially and a much earlier version)

10 years agoA Centos 6.4 guest will write 0xff to the 8259 mask register before beginning
Neel Natu [Fri, 23 May 2014 05:04:50 +0000 (05:04 +0000)]
A Centos 6.4 guest will write 0xff to the 8259 mask register before beginning
the proper ICWx initialization sequence. It assumes, probably correctly, that
the boot firmware has done the 8259 initialization.

Since grub-bhyve does not initialize the 8259 this write to the mask register
takes a code path in which 'error' remains uninitialized (ready=0,icw_num=0).

Fix this by initializing 'error' at the start of the function.

10 years agocxgbe(4): Remove stray if_up from the code that creates the tracing ifnet.
Navdeep Parhar [Fri, 23 May 2014 01:45:44 +0000 (01:45 +0000)]
cxgbe(4): Remove stray if_up from the code that creates the tracing ifnet.

10 years agoRemove NetBSD implementation details not relevant to FreeBSD.
Warner Losh [Fri, 23 May 2014 00:21:02 +0000 (00:21 +0000)]
Remove NetBSD implementation details not relevant to FreeBSD.

10 years agoMinor style nits...
Warner Losh [Fri, 23 May 2014 00:20:57 +0000 (00:20 +0000)]
Minor style nits...

10 years agoFix the comment. This really isn't just a 4.x compatibility thing, but
Warner Losh [Fri, 23 May 2014 00:20:53 +0000 (00:20 +0000)]
Fix the comment. This really isn't just a 4.x compatibility thing, but
is used pervasively through our tree, making it really part of the API.

10 years agoWhen libelf and libdwarf were updated, we didn't bump the minimal
Warner Losh [Fri, 23 May 2014 00:20:48 +0000 (00:20 +0000)]
When libelf and libdwarf were updated, we didn't bump the minimal
version needed for CTF tools, so sometimes we'd use the host's CTF
tools that didn't work. Be sure to bootstrap in that case.

10 years agoAdd .../share/mk to the default system make path. This will fix the
Warner Losh [Fri, 23 May 2014 00:20:44 +0000 (00:20 +0000)]
Add .../share/mk to the default system make path. This will fix the
problem with broken in-tree builds (which are used far more
pervasively than I'd known outside the tree). However, weird results
may now happen if at any point in the tree above you there happens to
be a directory that has subdirectory of share/mk, as unpredictable
results will follow. This was considered the lessor of the two evils,
at least for now. In the future this will be removed again when the
underlying issues are resolved.

10 years agoMap device memory using PTE_DEVICE attributes, and also ensure that the
Ian Lepore [Thu, 22 May 2014 23:38:17 +0000 (23:38 +0000)]
Map device memory using PTE_DEVICE attributes, and also ensure that the
shared flag is set on normal-memory mappings made via pmap_kenter() for SMP.

The "shared flag" part of this change isn't obvious from the diff, here's
the deal... by using the array of preformatted page table entry templates
instead of constructing the PTE from scratch, we automatically get the
right attribute bits set for both caching and shared.

MFC after: 1 week

10 years agoCreate our temporary file in $TMPDIR, if the environment variable
Marcel Moolenaar [Thu, 22 May 2014 20:24:30 +0000 (20:24 +0000)]
Create our temporary file in $TMPDIR, if the environment variable
is set. /tmp otherwise.

Submitted by:   Dan McGregor <danismostlikely@gmail.com>

10 years agoFix syntax error thrown at the point of creating the root pool, caused by
Devin Teske [Thu, 22 May 2014 19:36:29 +0000 (19:36 +0000)]
Fix syntax error thrown at the point of creating the root pool, caused by
an embedded newline appearing within the options string surrounded by
double-quotes. Rework the logic that goes into setting dataset options on
the root pool dataset while we're here -- added two new variables (which
can be altered via scripting) ZFSBOOT_POOL_CREATE_OPTIONS and also
ZFSBOOT_BOOT_POOL_CREATE_OPTIONS for setting pool/dataset attributes at
the time of pool creation. The former is for setting options on the root
pool (zroot) and the latter is for setting options on the optional separate
boot pool (bootpool) implicitly enabled when using either GELI or MBR. The
default value for the root pool variable (ZFSBOOT_POOL_CREATE_OPTIONS) is
"-O compress=lz4 -O atime=off" and the default value for separate boot pool
variable (ZFSBOOT_BOOT_POOL_CREATE_OPTIONS) is NULL (no additional options
for the separate boot pool dataset).

Reviewed by: allanjude
MFC after: 7 days
X-MFC-with: r266107-266109

10 years agoDisable the main FreeBSD pkg(7) repositories in the dvd
Glen Barber [Thu, 22 May 2014 19:25:41 +0000 (19:25 +0000)]
Disable the main FreeBSD pkg(7) repositories in the dvd
repository configuration to avoid fetching from upstream
in case there may be conflicts.

MFC After: 3 days
Sponsored by: The FreeBSD Foundation