Commit Graph

15519 Commits

Author SHA1 Message Date
John Baldwin
38fd38349a Use the kern.bootfile sysctl to set the default kernel path rather than
hardcoding /boot/kernel. This allows pmcstat(8) to work without -k when
using nextboot -k or 'boot foo' at the loader to boot alternate kernels.

Differential Revision:	https://reviews.freebsd.org/D2425
Reviewed by:	adrian, emaste, gnn
MFC after:	2 weeks
Sponsored by:	Norse Corp, Inc.
2015-05-08 16:02:31 +00:00
Neel Natu
1cba333329 Allow byte reads of AHCI registers.
This is needed to support Windows guests that use byte reads to access certain
AHCI registers (e.g. PxTFD.Status and PxTFD.Error).

Reviewed by:	grehan, mav
Reported by:	Leon Dang (ldang@nahannisys.com)
Differential Revision:	https://reviews.freebsd.org/D2469
MFC after:	2 weeks
2015-05-07 18:35:15 +00:00
Alexander Motin
79f1cdb4fb Add memory barrier to r281764.
While race at this point may cause only a single packet delay and so was
not really reproduced, it is better to not have it at all.

MFC after:	1 week
2015-05-06 18:04:31 +00:00
Neel Natu
9c4d547896 Deprecate the 3-way return values from vm_gla2gpa() and vm_copy_setup().
Prior to this change both functions returned 0 for success, -1 for failure
and +1 to indicate that an exception was injected into the guest.

The numerical value of ERESTART also happens to be -1 so when these functions
returned -1 it had to be translated to a positive errno value to prevent the
VM_RUN ioctl from being inadvertently restarted. This made it easy to introduce
bugs when writing emulation code.

Fix this by adding an 'int *guest_fault' parameter and setting it to '1' if
an exception was delivered to the guest. The return value is 0 or EFAULT so
no additional translation is needed.

Reviewed by:	tychon
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D2428
2015-05-06 16:25:20 +00:00
Alexander Motin
5b3ee130e3 Reimplement queue freeze on error, added in r282429:
It is not required to use CLO to recover from task file error, it should
be enough to do only stop/start, that does not clear the PxTFD.STS.ERR.

MFC after:	13 days
2015-05-06 09:59:19 +00:00
Allan Jude
169ff110e8 Add a sanity check to the swap size in zfsboot of bsdinstall
Loop until the user enters a valid size (>100mb or 0)

Differential Revision:	https://reviews.freebsd.org/D2299
Reported By:	Shawn Webb
Reviewed by:	roberto
Approved by:	brd
MFC after:	2 weeks
Sponsored by:	ScaleEngine Inc.
2015-05-05 03:08:49 +00:00
Alexander Motin
b208a147b9 Implement in-order execution of non-NCQ commands.
Using status updates in r282364, block queue on BSY, DRQ or ERR bits set.
This can be a performance penalization for non-NCQ commands, but it is
required for proper error recovery and standard compliance.

MFC after:	2 weeks
2015-05-04 19:55:01 +00:00
Cy Schubert
36428b7e17 Restore CPU dependent compile time conditionals.
MFC after:	1 month (with r281143 and r282408)
2015-05-04 12:42:52 +00:00
Cy Schubert
a25439b686 MFV ntp 4.2.8p2 (r281348)
Reviewed by:    delphij (suggested MFC)
Approved by:	roberto
Security:       CVE-2015-1798, CVE-2015-1799
Security:       VuXML ebd84c96-dd7e-11e4-854e-3c970e169bc2
MFC after:	1 month
2015-05-04 04:45:59 +00:00
Alexander Motin
9dba9460d9 Implement basic PxTFD.STS.BSY reporting.
MFC after:	2 weeks
2015-05-03 07:43:58 +00:00
Gleb Smirnoff
0fa5aacd8b Remove #ifdef IFT_FOO.
Submitted by:	Guy Yur <guyyur gmail.com>
2015-05-02 20:31:27 +00:00
Mariusz Zaborski
bd1da0a002 Approved, oprócz użycie RESTORE_ERRNO() do ustawiania errno.
Change the nvlist_recv() function to take additional argument that
specifies flags expected on the received nvlist. Receiving a nvlist with
different set of flags than the ones we expect might lead to undefined
behaviour, which might be potentially dangerous.

Update consumers of this and related functions and update the tests.

Approved by:	pjd (mentor)

Update man page for nvlist_unpack, nvlist_recv, nvlist_xfer, cap_recv_nvlist
and cap_xfer_nvlist.

Reviewed by:	AllanJude
Approved by:	pjd (mentor)
2015-05-02 17:45:52 +00:00
Alexander Motin
1025d8e679 Initialize PxCMD on reset and make its read-only bits such.
MFC after:	2 weeks
2015-05-02 16:11:29 +00:00
Alexander Motin
52f224dfbf Handle ATA_SEND_FPDMA_QUEUED as NCQ in ahci_port_stop().
MFC after:	1 week
2015-05-02 14:43:37 +00:00
Neel Natu
fd4e0d4c52 Advertise an additional memory BAR in the "dummy" device emulation.
This is useful for testing the MOVS emulation when both the source and
destination addresses are in the MMIO space.

MFC after:	1 week
2015-05-02 03:25:24 +00:00
Ed Maste
66137b66a4 crunchide: Restore local EM_AARCH64 constant for bootstrapping
Most of the EM_* constants are available in all supported host branches,
but EM_AARCH64 was added relatively recently. Add it back to fix
building HEAD on 10.x.

Noticed by:	adrian, jmallett
2015-04-30 23:48:05 +00:00
Edward Tomasz Napierala
ae3e3df45c Remove oldnfs remnants from nfsd(8).
Reviewed by:	rmacklem@
Sponsored by:	The FreeBSD Foundation
2015-04-30 12:55:27 +00:00
Edward Tomasz Napierala
79b8680737 Remove oldnfs leftovers from mountd(8).
Reviewed by:	rmacklem@
Sponsored by:	The FreeBSD Foundation
2015-04-29 12:33:00 +00:00
Steven Hartland
ad34cace15 Standardise chmod, chflags, chown and chgrp recursive symlink processing
chmod, chflags, chgrp, chmod and chown now affect symlinks in -R mode as
defined in symlink(7); previously symlinks were silently ignored.

Differential Revision:	https://reviews.freebsd.org/D2316
Reviewed by:	jilles
MFC after:	1 month
Relnotes:	yes
Sponsored by:	Multiplay
2015-04-29 00:49:00 +00:00
Neel Natu
f39630c2d6 Implement the century byte in the RTC. Some guests require this field to be
properly set.

Reported by:	Leon Dang (ldang@nahannisys.com)
MFC after:	2 weeks
2015-04-28 23:44:47 +00:00
Ed Maste
e52f97153a crunchide: add basic string table sanity checks
Reported by:	Coverity Scan
CID:		978805, 980919
Sponsored by:	The FreeBSD Foundation
2015-04-28 13:04:51 +00:00
Jason Helfman
b09403abf8 - remove -l option from ntpdate manpage, as it is no longer an option
Differential Revision:	https://reviews.freebsd.org/D2358
Submitted by:	gnn@
Approved by:	wblock (mentor)
MFC after:	after 1 week
2015-04-27 15:22:57 +00:00
Edward Tomasz Napierala
aa32b5e076 Make setproctitle(3) work in Capsicum capability mode. This makes
ctld(8) child processes to indicate initiator address and name in
their titles, similar to what iscsid(8) child processes do.

PR:		181352
Differential Revision:	https://reviews.freebsd.org/D2363
Reviewed by:	rwatson@, mjg@
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-04-27 11:18:16 +00:00
Enji Cooper
d7f46fbd10 ath3kfw, bcmfw, bthidcontrol, bthidd all require usb(4); build them
conditionally if MK_USB != no

MFC after: 1 week
2015-04-27 06:34:51 +00:00
Michael Gmelin
202379af84 Expand SMBUS API to add smbus_trans() function.
Differential Revision:	https://reviews.freebsd.org/D1955
Reviewed by:	adrian, jhb, wblock
Approved by:	adrian, jhb
2015-04-25 16:15:01 +00:00
Neel Natu
54335630a7 Don't allow guest to modify readonly bits in the PCI config 'status' register.
Reported by:	Leon Dang (ldang@nahannisys.com)
MFC after:	2 weeks
2015-04-24 19:15:38 +00:00
Joel Dahl
952364486a Fix minor mdoc issues. 2015-04-24 14:36:06 +00:00
John Baldwin
179fa75e6e Reassign copyright statements on several files from Advanced
Computing Technologies LLC to Hudson River Trading LLC.

Approved by:	Hudson River Trading LLC (who owns ACT LLC)
MFC after:	1 week
2015-04-23 14:22:20 +00:00
Edward Tomasz Napierala
6775608bea Add hint about "volmode=dev" to ctl.conf(5).
Differential Revision:	https://reviews.freebsd.org/D2328
Reviewed by:	allanjude@, bcr@
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-04-21 09:11:28 +00:00
Rui Paulo
cd4308d21f Fix wpa/hostapd build without OpenSSL. 2015-04-21 02:00:37 +00:00
Rui Paulo
5b9c547c07 Merge wpa_supplicant/hostapd 2.4.
Major changes are: SAE, Suite B, RFC 7268, EAP-PKE, ACS, and tons of
bug fixes.

Relnotes:	yes
2015-04-21 01:45:11 +00:00
Alexander Motin
fdd86701e5 Don't set bits that should be zero for SATA devices.
Old value made Linux think that it is PATA device with SATA bridge.

MFC after:	2 weeks
2015-04-20 19:11:27 +00:00
Ed Maste
a8da2875c6 crunchide: Remove local EM_* ELF definitions provided by system ELF headers
Suggested by:	imp (in review D2314)
2015-04-20 18:30:06 +00:00
Devin Teske
ea15d5bb0a Update usage statement to align with post-r279624 functionality.
MFC after:	3 days
X-MFC-to:	stable/10 stable/9
2015-04-20 17:46:09 +00:00
Ed Maste
16028f6a5a vidcontrol: skip invalid video modes returned by vt(4)
vt(4) has a stub CONS_MODEINFO ioctl that does not provide any data
but returns success. This needs to be fixed in the kernel, but address
it in vidcontrol(1) as well in case it's run on an older kernel.

Reviewed by:	bde
Sponsored by:	The FreeBSD Foundation
2015-04-20 17:43:55 +00:00
Alexander Motin
910280e539 Report link as up if tap device is not specified (black hole).
MFC after:	2 weeks
2015-04-20 14:55:01 +00:00
Alexander Motin
f2c58daab8 Report link as up only if we managed to open tap device.
It would be cool to report tap device status, but it has no such API.

MFC after:	2 weeks
2015-04-20 14:23:18 +00:00
Alexander Motin
d9a6698393 Disable RX/TX queues notifications when not needed.
This reduces CPU load and doubles iperf throughput, reaching 2-3Gbit/s.

MFC after:	2 weeks
Sponsored by:	iXsystems, Inc.
2015-04-20 10:29:42 +00:00
Eitan Adler
d5792866b0 identd: restore memcpy
I should not be committing at 2:30am....

Reported by:	pluknet
2015-04-19 09:35:46 +00:00
Eitan Adler
7ebd5ed4d4 identd: also zero se_rpc_highvers
Reported by:	pluknet
2015-04-19 09:27:47 +00:00
Eitan Adler
af5f5a398f identd: remove redundant zeroing
se_rpc_lowvers was set to 0 twice, so remove one of them
	I can not find any other variable which they may have been a typo of.

Reported by:	gcc5.1
2015-04-19 09:07:57 +00:00
Eitan Adler
b1abc63706 tzsetup: remove set but unused variable
- leave a comment explaining which variable it used to be

Reported by:	gcc5.1
2015-04-19 08:45:37 +00:00
Eitan Adler
68c45bf852 config: remove set but unchecked variable
reported by: gcc5.1
2015-04-19 08:30:13 +00:00
Alexander Motin
bb1524af0c Workaround bhyve virtual disks operation on top of GEOM providers.
GEOM does not support scatter/gather lists in its I/Os.  Such requests
are cut in pieces by physio(), that may be problematic, if those pieces
are not multiple of provider's sector size.  If such case is detected,
move the data through temporary sequential buffer.

MFC after:	2 weeks
2015-04-18 20:10:19 +00:00
Simon J. Gerraty
2ef26470c5 No need to delete export from filesystems which are not exported. 2015-04-18 19:52:39 +00:00
Takanori Watanabe
4cae2db2a8 To ensure j formatting string valid, cast uint64_t values to uintmax_t. 2015-04-18 17:41:09 +00:00
Edward Tomasz Napierala
4e25c86f4c Remove some oldnfs remnants.
Differential Revision:	https://reviews.freebsd.org/D2287
Reviewed by:	rmacklem@
Sponsored by:	The FreeBSD Foundation
2015-04-18 16:08:06 +00:00
Takanori Watanabe
4315b1cb29 Change printf formatting to unbroke i386 arch.
Submitted by:david@catwhisker.org
2015-04-18 16:04:32 +00:00
Takanori Watanabe
bf9b5107ef Fix Typo. 2015-04-18 09:08:47 +00:00
Marcelo Araujo
af5c4f8b4b Fix misspelling. 2015-04-18 06:53:13 +00:00