Commit Graph

189468 Commits

Author SHA1 Message Date
Neel Natu
2cb97c9dd6 Ignore writes to microcode update MSR. This MSR is accessed by RHEL7 guest.
Add KTR tracepoints to annotate wrmsr and rdmsr VM exits.
2014-04-30 02:08:27 +00:00
Adrian Chadd
91e198f6a2 Only track the power state variable if the power state is changed,
not if the self-generated frame state is changed.
2014-04-30 02:03:47 +00:00
Adrian Chadd
ce3f9a8950 * Only update ah_powerMode if we're setting the chip sleep state.
Some code will appear soon that is actually setting the chip powerstate
  separate from the self-generated frames power state.
* Allow the AR5416 family chips to actually have the power state changed
  from the self generated state change.

Tested (STA mode):

* AR5210
* AR5211
* AR5412
* AR5413
* AR5416
* AR9285
2014-04-30 02:03:13 +00:00
Ian Lepore
457e64a02f Make this declaration into a proper function prototype. 2014-04-29 23:29:28 +00:00
Marius Strobl
2daea0bce6 Update comment. 2014-04-29 20:57:25 +00:00
Marius Strobl
0d13d5fce2 Given that as of r258002 the last external user is gone, make sched_lock
static.
2014-04-29 20:51:57 +00:00
Ryan Stone
a998d4b50e Be consistent with the whitespace in the rest of these files.
X-MFC-With: r264007
2014-04-29 20:49:47 +00:00
Alexander V. Chernikov
d9437c0f46 Partially revert r265019 - allocating 512 bytes on stack
can be too much for architectures like ARM. Always use rounded
malloc instead.

Discussed with:	jmallett
MFC after:	4 weeks
2014-04-29 19:48:11 +00:00
Alexander V. Chernikov
0fb9298db9 Move rt_setmetrics() from rtsock.c to route.c.
All rtsock-initiated rte creation/modification are now
performed in route.c holding radix tree write lock.
This reduces the need for per-rte mutex.

Sponsored by:	Yandex LLC
MFC after:	1 month
2014-04-29 19:14:42 +00:00
Konstantin Belousov
d3f44b8d74 Fix two cases of recursive acquisitions of the vm object lock, only
possible in rare failure situations.

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2014-04-29 19:02:34 +00:00
Neel Natu
c6a0cc2e21 Some Linux guests will implement a 'halt' by disabling the APIC and executing
the 'HLT' instruction. This condition was detected by 'vm_handle_hlt()' and
converted into the SPINDOWN_CPU exitcode . The bhyve(8) process would exit
the vcpu thread in response to a SPINDOWN_CPU and when the last vcpu was
spun down it would reset the virtual machine via vm_suspend(VM_SUSPEND_RESET).

This functionality was broken in r263780 in a way that made it impossible
to kill the bhyve(8) process because it would loop forever in
vm_handle_suspend().

Unbreak this by removing the code to spindown vcpus. Thus a 'halt' from
a Linux guest will appear to be hung but this is consistent with the
behavior on bare metal. The guest can be rebooted by using the bhyvectl
options '--force-reset' or '--force-poweroff'.

Reviewed by:	grehan@
2014-04-29 18:42:56 +00:00
Konstantin Belousov
a17937bdd0 For the VM_PHYSSEG_DENSE case, checking the requested range to fall
into the area backed by vm_page_array wrongly compared end with
vm_page_array_size.  It should be adjusted by first_page index to be
correct.

Also, the corner and incorrect case of the requested range extending
after the end of the vm_page_array was incorrectly handled by
allocating the segment.

Fix the comparision for the end of range and return EINVAL if the end
extends beyond vm_page_array.

Discussed with:	royger
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2014-04-29 18:42:37 +00:00
Ian Lepore
06177e52c9 Add SMP support for Zedboard.
Submitted by:	Thomas Skibo <ThomasSkibo@sbcglobal.net>
2014-04-29 17:48:57 +00:00
Peter Grehan
d6cd193e5e Bump WITNESS_PENDLIST by MAXCPU to account for the
pmap pvlist locks which are scaled by MAXCPU.

This allows an amd64 system to boot with MAXCPU set
to 256, which is currently FreeBSD's hard limit without
x2apic support.

Compile-tested for other arch's.

PR:	185831
Discussed with:		jhb
MFC after:	3 weeks
2014-04-29 17:22:29 +00:00
Brooks Davis
4b55d3602f Merge from CheriBSD:
commit 1d1b908107
Author: Brooks Davis <brooks@one-eyed-alien.net>
Date:   Fri Mar 28 16:24:45 2014 +0000

    Add a long needed seatbelt.

    Exit with an error when make is called without a target at the top level
    rather than poluting the source tree and causing use confusion in future
    builds.

commit a9d9aa341b
Author: Brooks Davis <brooks@one-eyed-alien.net>
Date:   Tue Apr 29 16:06:12 2014 +0000

    Simplify seatbelt added in 1d1b908 based in feedback.

    Discussed with:	imp@FreeBSD.org

Reviewed by:	imp
Sponsored by:	DARPA, AFRL
2014-04-29 16:57:25 +00:00
Alexander V. Chernikov
68bbdd0e71 Fix "netstat -gW" behavior broken in r259638.
netstat has two options for printing multicast tables:
sysctl (the default one for live systems) and kvm-based one (for cores).
It looks like kvm-based one hasn't been working since it's been introduced
in r190012 due to absence of mfctablesize kernel symbol.
Check for all ipv4-multicast symbols being correctly resolved was introduced
in r259638 regardless of 'live' value leading to "No IPv4 MROUTING" error
message.

Reported by:	Olivier Cochard-Labbé
MFC after:	1 week
2014-04-29 16:51:28 +00:00
Pedro F. Giffuni
97ecaa8907 citrus: Avoid invalid code points.
From the OpenBSD log:
The UTF-8 decoder should not accept byte sequences which decode to unicode
code positions U+D800 to U+DFFF (UTF-16 surrogates), U+FFFE, and U+FFFF.

http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
http://unicode.org/faq/utf_bom.html#utf8-4

Reported by:	Stefan Sperling
Obtained from:	OpenBSD
MFC after:	5 days
2014-04-29 15:25:57 +00:00
Alan Somers
368f6e2f2f Add regression test for PR kern/189088.
PR:		kern/189088
MFC after:	3 weeks
Sponsored by:	Spectra Logic
2014-04-29 15:12:23 +00:00
Warner Losh
6f9f01a2d8 NLS is used by the build system. 2014-04-29 14:52:39 +00:00
Alan Somers
7278b62aee Fix a panic when removing an IP address from an interface, if the same address
exists on another interface.  The panic was introduced by change 264887, which
changed the fibnum parameter in the call to rtalloc1_fib() in
ifa_switch_loopback_route() from RT_DEFAULT_FIB to RT_ALL_FIBS.  The solution
is to use the interface fib in that call.  For the majority of users, that will
be equivalent to the legacy behavior.

PR:		kern/189089
Reported by:	neel
Reviewed by:	neel
MFC after:	3 weeks
X-MFC with:	264887
Sponsored by:	Spectra Logic
2014-04-29 14:46:45 +00:00
Alexander V. Chernikov
a713ee5cf7 Do not use senderr() in rtrequest1_fib_change().
Suggested by:	glebius
MFC after:	4 weeks
2014-04-29 12:52:36 +00:00
Marius Strobl
b05e961602 Merge r133175 from upstream:
2008-03-13  Dennis Czeremin  <dennis.czeremin@smiths-heimann.com>

	PR libstdc++/35566
	* include/bits/stl_multimap.h (multimap<>::multimap(_InputIterator,
	_InputIterator)): Forward to _M_insert_equal, not _M_insert_unique.

This patch was GPL2 at the time and fixes a regression introduced with
the merge of GCC r129013 in FreeBSD r236829.

MFC after:	3 days
Sponsored by:	Bally Wulff Games & Entertainment GmbH
2014-04-29 11:31:22 +00:00
Bjoern A. Zeeb
27caa49f0b After r264897 restore the ability to add bootoptions from FDT for
platforms which do not use loaders or kernels that want to hardcode
options or for FDT passed in by loader.

Also fix a build issue by putting the kmdp variable accessed back under
the #ifdef FDT;  we may wish to revisit decision in which case more
code needs changing.

Submitted by:	brooks
2014-04-29 07:48:07 +00:00
Christian Brueffer
e418b6fd0b Add standard SYNOPSIS wording, fix typos, contractions and new sentence -> new line. 2014-04-29 07:45:21 +00:00
Scott Long
5ae1451da6 Fix formatting of the -a option in usage() to be consistent.
Obtained from:	Netflix, Inc.
MFC after:	3 days
2014-04-29 07:19:22 +00:00
Scott Long
f6f851a37b Document the -a option that was added in r262424.
Obtained from:	Netflix, Inc.
MFC after:	3 days
2014-04-29 07:17:33 +00:00
Bryan Drewery
74679c6a99 Remove redundant include
MFC after:	3 days
2014-04-29 01:17:43 +00:00
Warner Losh
52cb8b8fe1 Add dependency for libm to libstdc++. This fixes high -j value builds
when not building with clang.

Submitted by: ian@
2014-04-28 23:16:46 +00:00
Neel Natu
f0fdcfe247 Allow a virtual machine to be forcibly reset or powered off. This is done
by adding an argument to the VM_SUSPEND ioctl that specifies how the virtual
machine should be suspended, viz. VM_SUSPEND_RESET or VM_SUSPEND_POWEROFF.

The disposition of VM_SUSPEND is also made available to the exit handler
via the 'u.suspended' member of 'struct vm_exit'.

This capability is exposed via the '--force-reset' and '--force-poweroff'
arguments to /usr/sbin/bhyvectl.

Discussed with:	grehan@
2014-04-28 22:06:40 +00:00
Glen Barber
70b7e330c6 Remove note about hw.bus.devctl_disable removal, restored
in r265060.

Sponsored by:	The FreeBSD Foundation
2014-04-28 20:40:36 +00:00
Brooks Davis
a3fe2bc59e Revert r263754, re-adding support for hw.bus.devctl_disable. Breaking
old devd's and thus hosts that get IP addresses from DHCP was too much
of a POLA violation.

The sysctl may be removed again after r263758 has been merged to at
least stable/9 and stable/10, and releases have been cut from those
branches.

Discussed with:	mjg
Reported by:	theraven, rwatson
2014-04-28 20:38:08 +00:00
Andrew Turner
8258fd68ef Set the new floating point exception mask correctly
Submitted by:	Keith White <kwhite@site.uottawa.ca>
2014-04-28 18:54:12 +00:00
Peter Grehan
67e1705297 Implement legacy interrupts for the AHCI device emulation
according to the method outlined in the AHCI spec.

Tested with FreeBSD 9/10/11 with MSI disabled,
and also NetBSD/amd64 (lightly).

Reviewed by:	neel, tychon
MFC after:	3 weeks
2014-04-28 18:41:25 +00:00
Nathan Whitehorn
4424e30878 Turn off various fancy instruction sets, as well as deduplicate some options.
This makes the EFI loader build work with CPUTYPE=native in make.conf on
my Core i5.
2014-04-28 18:25:21 +00:00
Marcel Moolenaar
0c2b180a35 Add a C libary and a Python module that implements an API similar
to bus_space(9) and that uses the proto(4) driver for talking to
hardware. If the I/O resource is a memory mapped I/O resource,
then mmap(2) will be attempted to avoid read(2)/write(2) overhead.

Sponsored by:	Juniper Networks, Inc.
2014-04-28 18:06:11 +00:00
Marcel Moolenaar
67fb10f30c Add proto(4): A driver for prototyping and diagnostics.
It exposes I/O resources to user space, so that programs can peek
and poke at the hardware. It does not itself have knowledge about
the hardware device it attaches to.

Sponsored by:	Juniper Networks, Inc.
2014-04-28 17:58:40 +00:00
Alexander Motin
dea1e22600 Reduce number of opens by REOM RAID during provider taste.
Instead opening/closing provider by each of metadata classes, do it only
once in core code.  Since for SCSI disks open/close means sending some
SCSI commands to the device, this change reduces taste time.

MFC after:	2 weeks
Sponsored by:	iXsystems, Inc.
2014-04-28 15:03:52 +00:00
Ed Maste
bd92124545 Drop explicit unsigned from FD_SETSIZE constant
FD_SETSIZE is often used as an argument to select or compared with an
integer file descriptor.  Rather than force 3rd party software to add
explicit casts, just make it a plain (int) constant as on other
operating systems.

Previous discussion:
http://lists.freebsd.org/pipermail/freebsd-standards/2012-July/002410.html
2014-04-28 13:42:41 +00:00
Steven Hartland
101dfa0ed4 Fix ZIO reordering done by vdev_queue_io causing panics when zio_vdev_io_start
returns ZIO_PIPELINE_CONTINUE from vdev_op_io_start to zio_execute resulting
in the wrong ZIO continuing its pipeline.

This is a serious issue which could cause data loss / corruption but appears
to be limited to error handling such as when vdev_readable(vd) returns false.

MFC after:	2 days
2014-04-28 09:00:00 +00:00
Eitan Adler
b2ba559513 bsd-family-tree: Fix date 2014-04-28 06:24:37 +00:00
Ganbold Tsagaankhuu
5372fec0bc Move common device tree informations to separate dtsi files for A10 and A20 SoC.
Change cubieboard1 and cubieboard2 dts files accordingly.

Approved by:	stas (mentor)
2014-04-28 05:39:20 +00:00
Ian Lepore
440fe55df6 Don't use multiprocessing-extensions instruction on processors that don't
support SMP.

Submitted by:	loos@
Pointy hat to:	me
2014-04-28 02:35:28 +00:00
Ian Lepore
88b3694bd9 Move duplicated code to print l2 cache config into the common code. 2014-04-27 23:47:38 +00:00
Adrian Chadd
17102f802f Note that the AR9380 and later hardware supports MYBEACON.
(Yes, I said AR5416 in the committed code.  It's still strictly true.)
2014-04-27 23:37:39 +00:00
Adrian Chadd
a4e6347b86 Note that the AR5416 and later hardware supports the MYBEACON RX filter. 2014-04-27 23:37:03 +00:00
Adrian Chadd
dd7b232e39 * Add a new capability which returns whether the hardware supports
the MYBEACON RX filter (only receive beacons which match the BSSID)
  or all beacons on the current channel.

* Add the relevant RX filter entry for MYBEACON.

Tested:

* AR5416, STA
* AR9285, STA

TODO:

* once the code is in -HEAD, just make sure that the code which uses it
  correctly sets BEACON for pre-AR5416 chips.

Obtained from:	QCA, Linux ath9k
2014-04-27 23:36:44 +00:00
Adrian Chadd
ee6325ab56 Program the AR_TSFOOR_THRESHOLD register with a default lifted from
the QCA HAL.

This fires off an interrupt if the TSF from the AP / IBSS peer is
wildly out of range.  I'll add some code to the ath(4) driver soon
which makes use of this.

TODO:

* verify this didn't break TDMA!
2014-04-27 23:35:05 +00:00
Adrian Chadd
3e9b8fe01b Fix the AR_SLEEP1 and AR_SLEEP2 definitions. Oops!
Tested:

* AR9285, STA
* AR5416, STA

Obtained from:	QCA, Linux ath9k
2014-04-27 23:33:37 +00:00
Adrian Chadd
552c550628 Do a read-after-write to ensure the interrupt register update is flushed
to the hardware.

The QCA HAL has a comment noting that if this isn't done, modifications
to AR_IMR_S2 before AR_IMR is flushed may produce spurious interrupts.

Obtained from:	QCA
2014-04-27 23:31:42 +00:00
Devin Teske
9febee763b Disable the beastie menu for EFI console which doesn't support ANSI codes
(so things like `at-xy', `clear', and other commands don't work making it
impossible to generate a living menu).

Reviewed by:	nwhitehorn, emaste
2014-04-27 22:18:33 +00:00