Commit Graph

14809 Commits

Author SHA1 Message Date
trasz
18bde13fd9 English.
Sponsored by:	The FreeBSD Foundation
2014-04-16 11:07:29 +00:00
trasz
a926ac6eae If we fail to create LUN, try again on next configuration reload.
Sponsored by:	The FreeBSD Foundation
2014-04-16 11:06:45 +00:00
trasz
dcde441db6 Use consistent punctuation.
Sponsored by:	The FreeBSD Foundation
2014-04-16 11:05:57 +00:00
trasz
5094b33e15 Use proper terminology in debug messages.
Sponsored by:	The FreeBSD Foundation
2014-04-16 11:03:21 +00:00
trasz
6a793c73c6 Constify.
Sponsored by:	The FreeBSD Foundation
2014-04-16 11:01:59 +00:00
trasz
6c1910fb63 Properly pass the initiator address when running in proxy mode.
Sponsored by:	The FreeBSD Foundation
2014-04-16 11:00:10 +00:00
trasz
fdee78839e Use socket address from accept(2) instead of retrieving it via
getpeername(2).

Sponsored by:	The FreeBSD Foundation
2014-04-16 10:49:48 +00:00
trasz
b9b743fae9 Rework the way we enable CTL iSCSI port. Previously conf_apply()
needed it to be already enabled, because listening in proxy mode
requires it; however, it's conf_apply() that opens pidfiles,
so it resulted in port being enabled before pidfile was opened.
This was not so bad, but it was also disabled when pidfile couldn't
be opened due to ctld already running; this means that starting
second ctld instance screwed up the first.

Sponsored by:	The FreeBSD Foundation
2014-04-16 10:43:12 +00:00
trasz
9f88148032 Properly identify target portal when running in proxy mode. While here,
remove CTL_ISCSI_CLOSE, it wasn't used or implemented anyway.

Sponsored by:	The FreeBSD Foundation
2014-04-16 10:29:34 +00:00
trasz
6886f6fa4f Make it possible for the iSCSI target side to operate in both normal
and ICL_KERNEL_PROXY mode, and fix some bit rot so the latter actually
works again.

Sponsored by:	The FreeBSD Foundation
2014-04-16 10:06:37 +00:00
trasz
16b4ecc28d Stop treating LUN 0 as mandatory. There is no reason to do that.
Suggested by:	mav@
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2014-04-15 14:55:56 +00:00
dteske
aff0da331c When merging docsinstall and zfsboot updates to stable/9 it was discovered
that the slightly older dialog(1) requires --separate-output when using the
--checklist widget to force response to produce unquoted values (whereas in
stable/10 --checklist widget without --separate-output will only quote the
checklist labels in the response if the label is multi-word (contains any
whitespace).

Since these enhancements (see revisions 263956 and 264437) were developed
originally on 10, the --separate-output option was omitted. When merged to
stable/9, we (Allan Jude) and I found during testing that the "always-
quoting" of the response was causing things like struct interpolation to
fail (`f_struct device_$dev' would produce `f_struct device_\"da0\"' for
example -- literal quotes inherited from dialog(1) --checklist response).

To see the behavior, execute the following on stable/9 versus stable/10:

        dialog --checklist disks: 0 0 0 da0 "" off da1 "" off

Check both items and hit enter. On stable/10, the response is:

        da0 da1

On stable/9 the response is:

        "da0" "da1"

If you use the --separate-output option, the response is the same for both:

        da0
        da1

So applying --separate-output on every platform until either one of two
things occurs 1) dialog(1,3) gets synchronized between stable/9, higher or
2) we drop support for stable/9.

MFC after:      3 days
Reviewed by:    Allan Jude
2014-04-15 06:56:59 +00:00
jilles
7904a8a1e6 mergemaster: Avoid "/var/tmp/temproot disappeared" if there is nothing to
compare.

Because of the change to find in SVN r253886, the entire temproot would be
deleted if it became empty, leading to a confusing message "*** FATAL ERROR:
The temproot directory ${TEMPROOT} has disappeared!"

Note that mergemaster does not do anything useful in this situation anyway
(e.g. put IGNORE_FILES="/etc/group /etc/master.passwd" in
/etc/mergemaster.rc and run mergemaster -p).

As noted in that commit, add -mindepth 1.

PR:		bin/188485
Submitted by:	David Boyd
MFC after:	1 week
2014-04-14 22:01:49 +00:00
tychon
5906c6773b Add support for emulating the slave PIC.
Reviewed by:	grehan, jhb
Approved by:	grehan (co-mentor)
2014-04-14 19:00:20 +00:00
dteske
c717c48c00 Fix typo in debug/log statement.
Submitted by:	Rick Miller <vmiller@hostileadmin.com>
2014-04-14 05:35:01 +00:00
imp
c39e6fc2c9 NO_MAN= has been deprecated in favor of MAN= for some time, go ahead
and finish the job. ncurses is now the only Makefile in the tree that
uses it since it wasn't a simple mechanical change, and will be
addressed in a future commit.
2014-04-13 05:21:56 +00:00
des
288923c300 Remove the names of the build host and user and the build date. This
still leaves the host OS and version, but these are harder to remove.

MFC after:	3 weeks
2014-04-12 18:01:25 +00:00
brueffer
254ceb38fd Fix stray "." left over from previous commit.
MFC after:	1 week
2014-04-10 10:56:11 +00:00
brueffer
f4bf55106a Fix Xref order in SEE ALSO.
MFC after:	1 week
2014-04-10 10:54:06 +00:00
brueffer
94b813eeb9 More mdoc/spelling/grammar cleanup. 2014-04-10 10:18:30 +00:00
tychon
28bb12a94c Constrain the amount of data returned to what is actually available
not the size of the buffer.

Approved by:	grehan (co-mentor)
2014-04-09 14:50:55 +00:00
jhb
808e531530 Handle single-byte reads from the bvmcons port (0x220) by returning
0xff.  Some guests may attempt to read from this port to identify
psuedo-PNP ISA devices.  (The ie(4) driver in FreeBSD/i386 is one
example.)

Reviewed by:	grehan
2014-04-08 21:02:03 +00:00
brueffer
2008848cc0 Quick mdoc/whitespace/spelling pass, this needs some more work. 2014-04-08 20:59:02 +00:00
jhb
50213acb5f Explicitly initialize 'vmname' to NULL.
Reviewed by:	grehan
2014-04-08 20:54:13 +00:00
sbruno
168c6df708 Add Stacey Son's binary activation patches that allow remapping of
execution to a emumation program via parsing of ELF header information.

With this kernel module and userland tool, poudriere is able to build
ports packages via the QEMU userland tools (or another emulator program)
in a different architecture chroot, e.g. TARGET=mips TARGET_ARCH=mips

I'm not connecting this to GENERIC for obvious reasons, but this should
allow the kernel module to be built by default and enable the building
of the userland tool (which automatically loads the kernel module).

Submitted by:	sson@
Reviewed by:	jhb@
2014-04-08 20:10:22 +00:00
jh
d8d70b37e3 Fork a child process and wait until the process terminates when the -P
option is specified. This behavior is documented on the manual page.

PR:		bin/187265
Submitted by:	Kimo R
MFC after:	2 weeks
2014-04-06 16:35:49 +00:00
marcel
c568c36283 Timestamps may not have a decimal point.
While here, consistently use sbuf_new_auto().
2014-04-06 02:57:49 +00:00
gnn
d1d0c78901 Speed up the lookup of interfaces when there are a large number
of them, such in a system with a large number of VLANs.

Submitted by: Nick Rogers
MFC after: 2 weeks
2014-04-05 22:13:32 +00:00
grehan
904ae9c6df Add support for the virtio RNG entropy-source device.
Call through to /dev/random synchronously to fill
virtio buffers with RNG data.

Tested with FreeBSD-CURRENT and Ubuntu guests.

Submitted by:	Leon Dang
Discussed with:	markm
MFC after:	3 weeks
Sponsored by:	Nahanni Systems
2014-04-02 20:18:17 +00:00
rstone
3c8f124628 Print status of ARI capability in pciconf -c
Teach pciconf how to print out the status (enabled/disabled) of the ARI
capability on PCI Root Complexes and Downstream Ports.

MFC after:	2 months
Sponsored by:	Sandvine Inc.
2014-04-01 16:03:52 +00:00
neel
3e49998fdf Add an ioctl to suspend a virtual machine (VM_SUSPEND). The ioctl can be called
from any context i.e., it is not required to be called from a vcpu thread. The
ioctl simply sets a state variable 'vm->suspend' to '1' and returns.

The vcpus inspect 'vm->suspend' in the run loop and if it is set to '1' the
vcpu breaks out of the loop with a reason of 'VM_EXITCODE_SUSPENDED'. The
suspend handler waits until all 'vm->active_cpus' have transitioned to
'vm->suspended_cpus' before returning to userspace.

Discussed with:	grehan
2014-03-26 23:34:27 +00:00
dim
905ed8bc75 Add a SUBDIR_PARALLEL option to bsd.subdir.mk, to allow make to process
all the SUBDIR entries in parallel, instead of serially.  Apply this
option to a selected number of Makefiles, which can greatly speed up the
build on multi-core machines, when using make -j.

This can be extended to more Makefiles later on, whenever they are
verified to work correctly with parallel building.

I tested this on a 24-core machine, with make -j48 buildworld (N = 6):

                before    stddev       after    stddev
                =======   ======       =======  ======
real time        1741.1     16.5         959.8     2.7
user time       12468.7     16.4       14393.0    16.8
sys  time        1825.0     54.8        2110.6    22.8

(user+sys)/real     8.2                   17.1

E.g. the build was approximately 45% faster in real time.  On machines
with less cores, or with lower -j settings, the speedup will not be as
impressive.  But at least you can now almost max out a machine with
buildworld!

Submitted by:	jilles
MFC after:	2 weeks
2014-03-26 22:30:38 +00:00
bdrewery
5552863ce9 Revert r263638 (create /root dataset) for now as it breaks install and needs
more work in cases such as single-user mode.
2014-03-26 13:41:30 +00:00
tychon
58699bc5fc Move the atpit device model from userspace into vmm.ko for better
precision and lower latency.

Approved by:	grehan (co-mentor)
2014-03-25 19:20:34 +00:00
bdrewery
28889e1895 Add missing LIBM to DPADD from r263650
Reported by:	jilles
2014-03-24 13:13:52 +00:00
glebius
e72d36184a Remove unneeded fake _KERNEL definition. 2014-03-23 09:15:14 +00:00
bdrewery
755aabe3d2 Fix build with libucl 20140321 2014-03-22 22:20:43 +00:00
bdrewery
841158cbfb Create a root dataset so that /root is outside of the boot environment.
Discussed with:	dteske on sysinstall@
MFC after:	1 month
2014-03-22 15:59:26 +00:00
neel
a6ec3f983c Use 'cpuset_t' to represent the vcpus active in a virtual machine. 2014-03-20 18:15:37 +00:00
asomers
1b1437fc8f Fix kern/187712: config(8) does not respect KERNCONFDIR.
The impact of this bug is that you cannot build a kernel if both of the
following are true:
1) The kernel config file is in a non-default location
2) The kernel config file uses the "include" statement from config(5).

usr.sbin/config/main.c
usr.sbin/config/config.8
usr.sbin/config/config.h
usr.sbin/config/lang.l
	Added a "-I path" option to config(8).  By analogy to cc(1), it adds
	an extra path in which the "include" statement will search for
	files.

Makefile.inc1
	Pass "-I ${KERNCONFDIR}" to config(8).

PR:		kern/187712
Reviewed by:	will, imp (previous version)
MFC after:	3 weeks
Sponsored by:	Spectra Logic Corporation
2014-03-20 17:30:09 +00:00
trasz
f1f4cd9f22 Make the error message more clear.
Sponsored by:	The FreeBSD Foundation
2014-03-19 13:00:44 +00:00
tychon
bd27130916 Don't reissue in-flight commands.
Approved by:	neel (co-mentor)
2014-03-18 23:25:35 +00:00
rwatson
3395c22f24 Line-wrapping tweak: make the sample jail command line fit in 80 characters.
MFC after:	3 days
2014-03-17 14:19:42 +00:00
tychon
8de9dac190 Though there currently isn't a way to insert new media into an ATAPI
drive, at least pretend to support Asynchronous Notification (AN) to
avoid a guest needlessly polling for it.

Approved by:	grehan (co-mentor)
2014-03-16 12:33:40 +00:00
tychon
e4c43b0780 Support the bootloader's single 16-bit 'outw' access to the Divisor
Latch MSB and LSB registers.

Approved by:	neel (co-mentor)
2014-03-16 12:31:28 +00:00
rwatson
a400e9c007 Update most userspace consumers of capability.h to use capsicum.h instead.
auditdistd is not updated as I will make the change upstream and then do a
vendor import sometime in the next week or two.

MFC after:	3 weeks
2014-03-16 11:04:44 +00:00
jmmv
b2e51e38a8 Migrate tools/regression/{usr.bin/lastcomm,usr.sbin}/ to the new tests layout.
This change was originally going to only migrate the usr.sbin tests but, as
it turns out, the usr.sbin/sa/ tests require files from usr.bin/lastcomm/
so it's better to just also migrate the latter at the same time.  The other
usr.bin tests will be moved separately.

To make these tests work within the test suite, some of them have required
changes to prevent modifying the source directory and instead just rely on
the current directory for file manipulation.
2014-03-16 04:09:22 +00:00
glebius
8293a6c1cc Garbage collect long time obsoleted (or never used) stuff from routing API. 2014-03-15 06:49:32 +00:00
eadler
26805845a9 Be a little more verbose in service's error message
PR:		bin/187118
Submitted by:	culot
2014-03-15 02:26:46 +00:00
bdrewery
bea222febe Fix ASSUME_ALWAYS_YES not being parsed properly from config after UCL conversion.
Sponsored by:	EMC / Isilon Storage Division
MFC after:	1 week
2014-03-14 17:37:38 +00:00
bdrewery
6540958349 Fix ABI from /usr/local/etc/pkg.conf not being respected.
Regression from r259266.

Sponsored by:	EMC / Isilon Storage Division
MFC after:	1 week
2014-03-14 17:20:45 +00:00
dteske
fc1b773c21 Rewrite usermgmt -- hooking it into the scripting system with dispatch
commands addUser, deleteUser, and editUser. Getting rid of the awkward-
to-use `userinput' bolt-on which Ron and I talked about rewriting.
2014-03-14 03:42:05 +00:00
dteske
a198815365 Add protection against input containing single-quotes (e.g., i18n-users). 2014-03-14 03:37:08 +00:00
dteske
c22d6758dd For non-interactive scripts, forgot to check we were given an argument
before proceeding.
2014-03-14 03:34:43 +00:00
dteske
2fd56202ec Fix a bug preventing errors from pw(8) from filtering up to a dialog.
Programs running as rvalue to pipe cannot access current namespace.
2014-03-14 03:33:03 +00:00
dteske
21273c418a Reduce the sleep cycle when using dialog(1) to 1-second. 2014-03-14 03:28:21 +00:00
dteske
665bd359af Fix comments and whitespace. 2014-03-14 03:25:33 +00:00
dteske
f2ae41dff4 Fix a code-typo that prevented auto-sizing of the dialog. 2014-03-14 03:15:02 +00:00
eadler
d1f8217089 Remove directory which should not have been re-added. 2014-03-14 03:12:41 +00:00
eadler
118094e60b multiple: Remove 3rd clause from BSD license where approved by the
regents and renumber.

This patch skips files in contrib/ and crypto/

Acked by:	imp
Discussed with:	emaste
2014-03-14 03:07:51 +00:00
dteske
ca7a5127a4 Point hat! Fix a broken f_isinteger(). 2014-03-14 03:00:02 +00:00
glebius
d494babace Remove IPX support.
IPX was a network transport protocol in Novell's NetWare network operating
system from late 80s and then 90s. The NetWare itself switched to TCP/IP
as default transport in 1998. Later, in this century the Novell Open
Enterprise Server became successor of Novell NetWare. The last release
that claimed to still support IPX was OES 2 in 2007. Routing equipment
vendors (e.g. Cisco) discontinued support for IPX in 2011.

Thus, IPX won't be supported in FreeBSD 11.0-RELEASE.
2014-03-14 02:58:48 +00:00
dteske
a4fb4957a5 Remove useless NULL string '' in compound strings. Look very closely. 2014-03-14 02:56:49 +00:00
dteske
ea3e323b42 Fix future namespace issues for functions taking $var_to_set -- functions
taking a variable to set need to make sure they protect their locals; if
$var_to_set positional argument coincides with a local the expected call
to `setvar' will fail to reach outside of the function's namespace. When
such collisions are experienced (as I did in the rewrite of usermgmt) the
solution is to append a full or abbreviated version of the function name
to the local (ultimately eliminating collisions). This is rarely needed
and only occurs when you have a lot of like-named functions that pass
very similar $var_to_set positional arguments to each other (such as-is
the case with an expansive library such as `dialog.subr').
2014-03-14 02:50:32 +00:00
dteske
0e1eb3b2f3 Update copyright. 2014-03-14 02:40:52 +00:00
dteske
6dc3e47f18 Comments. 2014-03-14 02:39:42 +00:00
dteske
b13d8a2b63 Add debug statement just before attempting to exec a module. 2014-03-14 02:38:56 +00:00
dteske
70c18ea234 Remove indexfile from debug statement as it is already logged by
f_index_menusel_command() used just-prior to this debug statement.
Also, log the arguments being passed to the resword.
2014-03-14 02:37:39 +00:00
dteske
7863d1acd7 Fix pw(8) deletion of group "username" on userdel even if group "username"
is not associated with user "username". E.g., user "foo" has primary group
"wheel" and is unassociated with group "foo", yet userdel would delete the
group "foo" when deleting user "foo" (despite the fact that user "foo" is
not associated with group "foo" in any way).

Patch committed with minor style(9) changes.

PR:		bin/169471
Submitted by:	Alexander Pyhalov <apyhalov@gmail.com>
2014-03-13 18:16:42 +00:00
tychon
25c8b61cfd Replace the userspace atpic stub with a more functional vmm.ko model.
New ioctls VM_ISA_ASSERT_IRQ, VM_ISA_DEASSERT_IRQ and VM_ISA_PULSE_IRQ
can be used to manipulate the pic, and optionally the ioapic, pin state.

Reviewed by:	jhb, neel
Approved by:	neel (co-mentor)
2014-03-11 16:56:00 +00:00
dteske
a612ce2d3b Remove vestigial global, no-longer used since SVN r262904. 2014-03-10 21:37:40 +00:00
dteske
a015f12853 Whitespace. 2014-03-10 21:35:27 +00:00
jhb
5ca7c663ea Pass the size of the top-level table to map when mapping the table instead
of the size of the pointer.

Reported by:	Coverity
Coverity CID:	1147171
2014-03-10 16:07:45 +00:00
dteske
c81a3d85c6 Take a group name on the command-line if available. 2014-03-07 22:29:00 +00:00
dteske
ef12c3b63f Fix copy/paste error in a comment. 2014-03-07 22:24:53 +00:00
dteske
b6442661fd Change dipatch words from group* to *Group to backward compatible with
ye-olden sysinstall(8).
2014-03-07 22:17:35 +00:00
dteske
63c9b15725 Rewrite groupmgmt -- hooking it into the scripting system with dispatch
commands groupAdd, groupDelete, and groupEdit. Getting rid of the awkward-
to-use `groupinput' bolt-on which Ron and I talked about rewriting.
2014-03-07 20:44:19 +00:00
dteske
af733395cb Comment -- to go with NL global introduced (but not mentioned) by r262901 2014-03-07 20:32:26 +00:00
dteske
133f75adb5 s/__number/__num/ for code clarify but more to prevent localization of
__number if passed as the var_to_set argument.
2014-03-07 20:29:19 +00:00
dteske
7649b4db47 Centralize function name. Update a comment while here. 2014-03-07 20:24:59 +00:00
dteske
cf2d797f14 Make f_show_err non-fatal. 2014-03-07 20:20:27 +00:00
dteske
0b0cb45bca Fix incorrect return status if var_to_set and var_to_get are the same. 2014-03-07 20:18:39 +00:00
dteske
d8d6d667f6 Fix a typo in a comment. 2014-03-07 20:15:52 +00:00
dteske
5cb44b665e Add missing local declaration. 2014-03-07 20:15:08 +00:00
dteske
fa3a5f9350 Allow dispatched reswords to carry arguments. Fix a comment while here. 2014-03-07 20:12:59 +00:00
grehan
873043aeab Open the uart emulation's backing tty in non-blocking mode.
This fixes the issue of bhyve appearing to halt when using
nmdm ports for the console, until a connection is made to
the other end.

bhyveload already does this.

Reported by:	Many.
MFC after:	3 weeks.
2014-03-07 06:23:37 +00:00
julian
6272e5df18 Part 2 of bug 187310.. had to commit separately due to local confusion.
Don't let pw crash when give certain input.

PR:		187310
Submitted by:	Kim Shrier
MFC after:	1 week
2014-03-06 19:58:03 +00:00
julian
d8e87db471 Stop pw(8) from segfaulting when given certain input
PR:187310
Submitted by:	Kim Shrier
Obtained from:	bug
MFC after:	1 week
2014-03-06 19:26:08 +00:00
mav
1e800dd8ab Disable libwrap (TCP wrappers) support in rpcbind by default, introducing
new command line options -W, to enable it when needed.

On my tests this change by almost ten times improves rpcbind performance.

No objections:	many, net@
2014-03-06 17:33:27 +00:00
sjg
cfe60e6fd4 Allow comments at end of line.
Reviewed by: marcel
2014-03-04 20:09:23 +00:00
tychon
0e398a79d2 Add SMBIOS support.
A new option, -U, can be used to set the UUID in the System
Information (Type 1) structure.  Manpage fix to follow.

Approved by:	grehan (co-mentor)
2014-03-04 17:12:06 +00:00
dwmalone
b564b9a109 Add missing description of du (daemon.user) printcap capability. 2014-03-04 15:09:57 +00:00
dim
ec11adae82 Merge from head up to r262611. 2014-02-28 17:46:56 +00:00
des
1da073f26b We install the tool, so why not the man page?
MFC after:	3 days
2014-02-27 13:05:56 +00:00
dim
09b56e694e Merge from head up to r262536. 2014-02-26 22:26:40 +00:00
neel
040588f2e5 Document the "-a" and "-x" options to match the changes in r262236.
Reviewed by:	grehan
2014-02-26 19:14:54 +00:00
neel
e01c440dae Queue pending exceptions in the 'struct vcpu' instead of directly updating the
processor-specific VMCS or VMCB. The pending exception will be delivered right
before entering the guest.

The order of event injection into the guest is:
- hardware exception
- NMI
- maskable interrupt

In the Intel VT-x case, a pending NMI or interrupt will enable the interrupt
window-exiting and inject it as soon as possible after the hardware exception
is injected. Also since interrupts are inherently asynchronous, injecting
them after the hardware exception should not affect correctness from the
guest perspective.

Rename the unused ioctl VM_INJECT_EVENT to VM_INJECT_EXCEPTION and restrict
it to only deliver x86 hardware exceptions. This new ioctl is now used to
inject a protection fault when the guest accesses an unimplemented MSR.

Discussed with:	grehan, jhb
Reviewed by:	jhb
2014-02-26 00:52:05 +00:00
brueffer
b8589f43e1 Rough cleanup (new sentence -> new line, grammar, spelling, mdoc).
This could use more work.

PR:		187035 (in part)
Submitted by:	Bjorn Heidotting
MFC after:	1 week
2014-02-25 21:01:55 +00:00
brueffer
a73cae5687 In puthdr(), start the ELF .data section on a new page, as this is
what btxldr expects (.set MEM_DATA,start+0x1000 in btxldr.S).

This makes resulting ELF binaries bootable with grub, gptboot and boot2.

PR:		153801
Submitted by:	Gleb Kurtsou <gleb.kurtsou at gmail.com>
Tested by:	Ruben Kerkhof <ruben at rubenkerkhof.com>
Glanced at by:	jhb, peter
MFC after:	1 month
2014-02-25 17:13:42 +00:00
dim
b6b1de44ba Merge from head up to r262472. 2014-02-25 07:40:37 +00:00
adrian
cb30543842 Add correct attributions.
Sponsored by:	Netflix, Inc.
2014-02-24 02:47:47 +00:00
adrian
c4a6baed5e Add a new option - 'a <file>' - which spits out annotated callgraphs.
'-m <file>' spits out the given stream into <file> (eg, /dev/stdout).
However, it only resolves the first symbol; it doesn't parse the entire
callgraph.  If it fails to lookup then it doesn't print anything.

'-a' instead does a symbol and file:line lookup for each address in each
callgraph and will happily print the address itself with no lookup
information if it couldn't look things up.

This makes it much easier to pull out individual records from a
pmc data file and look at the callgraph information without having to
hand-decode the addresses.

Sponsored by:	Netflix, Inc.
2014-02-24 02:43:58 +00:00
bapt
2440481666 Remove a useless newline, warnx already appends a newline 2014-02-23 23:49:10 +00:00
dim
e42ec49846 Merge from head up to r262415. 2014-02-23 23:33:11 +00:00
bapt
0f16562aeb Update my copyright 2014-02-23 22:04:03 +00:00
bapt
21c1fff027 Switch pkg(7) from libyaml to libucl 2014-02-23 21:55:07 +00:00
grehan
10513a79ad ZFS boot support for bhyveload.
Modelled after the i386 zfsloader. However, with no
2nd stage zfsboot to search for a bootable dataset,
attempt a ZFS boot if there is more than one ZFS
dataset found during the disk probe.

sys/boot/userboot/zfs
 - build the ZFS boot library

sys/boot/userboot/userboot/
 conf.c
  - Add the ZFS pool and filesystem tables
 devicename.c
  - correctly format ZFS devices
 main.c
  - increase the size of the libstand malloc pool
  to account for the increased usage from ZFS buffers
  - probe for a ZFS dataset, and if one is
  found, attempt to boot from it.

usr.sbin/bhyveload/bhyveload.c
 - allow multiple invocations of the '-d' option
 to specify multiple disks e.g. a raidz set.
 Up to 32 disks are supported.

Tested with various combinations of GPT, MBR, single
and multiple disks, RAID-Z, mirrors.

Reviewed by:	neel
Discussed with:	avg
Tested by:	Michael Dexter and others
MFC after:	3 weeks
2014-02-22 07:18:06 +00:00
dim
c6424a2503 In usr.sbin/eeprom/ofw_options.c, remove a superfluous const specifier. 2014-02-22 00:16:27 +00:00
grehan
ac414654b3 Fix virtio spec URL.
Submitted by:	lwhsu
MFC after:	1 week
2014-02-21 22:45:35 +00:00
tychon
19c633f86f Avoid clobbering the counter mode when issuing a latch command.
Approved by:	grehan (co-mentor)
2014-02-21 01:15:26 +00:00
neel
4626d164b8 Simplify APIC mode switching from MMIO to x2APIC. In part this is done to
simplify the implementation of the x2APIC virtualization assist in VT-x.

Prior to this change the vlapic allowed the guest to change its mode from
xAPIC to x2APIC. We don't allow that any more and the vlapic mode is locked
when the virtual machine is created. This is not very constraining because
operating systems already have to deal with BIOS setting up the APIC in
x2APIC mode at boot.

Fix a bug in the CPUID emulation where the x2APIC capability was leaking
from the host to the guest.

Ignore MMIO reads and writes to the vlapic in x2APIC mode. Similarly, ignore
MSR accesses to the vlapic when it is in xAPIC mode.

The default configuration of the vlapic is xAPIC. The "-x" option to bhyve(8)
can be used to change the mode to x2APIC instead.

Discussed with:	grehan@
2014-02-20 01:48:25 +00:00
neel
dc56a06bc6 Add a check to validate that memory BARs of passthru devices are 4KB aligned.
Also, the MSI-x table offset is not required to be 4KB aligned so take this
into account when computing the pages occupied by the MSI-x tables.
2014-02-18 19:00:15 +00:00
jhb
ea7ce4c7d3 Tweak the handling of PCI capabilities in emulated devices to remove
the non-standard zero capability list terminator.   Instead, track
the start and end of the most recently added capability and use that
to adjust the previous capability's next pointer when a capability is
added and to determine the range of config registers belonging to
PCI capability registers.

Reviewed by:	neel
2014-02-18 03:00:20 +00:00
dteske
8d6b83dafa Add zfsboot to the scripted interface of bsdinstall(8); oops!
NB: If the zfsboot variables ($ZFSBOOT_*) are set, a script is
assumed to want zfsboot module instead of scriptedpart module.

Submitted by:	Loïc Brarda <loic.brarda@cern.ch>
Reviewed by:	nwhitehorn@
MFC after:	3 days
2014-02-16 06:56:44 +00:00
neel
f7d12415a5 Update bhyve(8) man page to describe the usage of the "-s" option to assign
bus numbers to emulated devices. Also add the restriction that the LPC bridge
emulation can only be configured on bus 0.

Reviewed by:	grehan@
2014-02-14 21:46:04 +00:00
neel
8a0a5bcf44 Allow PCI devices to be configured on all valid bus numbers from 0 to 255.
This is done by representing each bus as root PCI device in ACPI. The device
implements the _BBN method to return the PCI bus number to the guest OS.

Each PCI bus keeps track of the resources that is decodes for devices
configured on the bus: i/o, mmio (32-bit) and mmio (64-bit). These windows
are advertised to the guest via the _CRS object of the root device.

Bus 0 is treated specially since it consumes the I/O ports to access the
PCI config space [0xcf8-0xcff]. It also decodes the legacy I/O ports that
are consumed by devices on the LPC bus. For this reason the LPC bridge can
be configured only on bus 0.

The bus number can be specified using the following command line option
to bhyve(8): "-s <bus>:<slot>:<func>,<emul>[,<config>]"

Discussed with:	grehan@
Reviewed by:	jhb@
2014-02-14 21:34:08 +00:00
brueffer
a860c39644 In chat_UpdateSet(), initialize the input buffer to prevent stale data
from previous timed out commands.

PR:		186530
Submitted by:	Alexander Zagrebin <alexz at visp.ru>
Reviewed by:	brian
MFC after:	1 week
2014-02-14 20:34:24 +00:00
zeising
2a976cbc56 Bump .Dd forgotten in r261832.
MFC after:	2 weeks
2014-02-13 13:11:34 +00:00
zeising
216e398578 Add commas (,) to the list in the SEE ALSO section, to match most other
manuals.

MFC after:	2 weeks
2014-02-13 12:53:57 +00:00
zeising
3db0335cec Add cross references between rc.conf(5) and jail.conf(5).
MFC after:	2 weeks
2014-02-13 12:52:26 +00:00
glebius
02cb746956 Fix world build WITHOUT_PF.
Sponsored by:	Nginx, Inc.
2014-02-12 09:59:48 +00:00
tychon
92116454f4 Provide an indication a "PIO Setup Device to Host FIS" occurred while executing
the IDENTIFY DEVICE and IDENTIFY PACKET DEVICE commands.

Also, provide an indication a "D2H Register FIS" occurred during a SET FEATURES
command.

Approved by:	grehan (co-mentor)
2014-02-12 00:32:14 +00:00
brueffer
b14752021b In acline_init(), initialize ac_line to SRC_UNKNOWN. Previously
this could lead to the -n option effectively being ignored (in case
ac_line happened to be 0 aka SRC_AC), or other undefined behaviour.

PR:		169779
Submitted by:	Alex Gonzalez <loox at e-shell.net>
Reviewed by:	jhb
MFC after:	2 weeks
2014-02-11 15:16:49 +00:00
trasz
22da121a75 Make the debug messages during ctld(8) shutdown less confusing.
Sponsored by:	The FreeBSD Foundation
2014-02-11 11:38:44 +00:00
trasz
e1b3e5b339 Show proper configuration file line numbers in error messages.
Sponsored by:	The FreeBSD Foundation
2014-02-11 11:37:49 +00:00
trasz
a0a9d5e257 Make ctld error out on invalid characters in ctl.conf.
Sponsored by:	The FreeBSD Foundation
2014-02-11 11:36:15 +00:00
trasz
7ca282e9cb Improve error reporting.
Sponsored by:	The FreeBSD Foundation
2014-02-11 11:35:26 +00:00
trasz
35478760f6 So, it turns out SIGCHLD is discarded by default, so we have to set up
a dummy handler to make it interrupt an ioctl(2) or select(2).

This makes those short-lived ctld(8) zombies disappear.

Sponsored by:	The FreeBSD Foundation
2014-02-11 11:33:44 +00:00
trasz
d223366773 Use new auth-type "deny" instead of using "chap" with no chap entries;
it's cleaner this way, and gives better feedback to the user.

Sponsored by:	The FreeBSD Foundation
2014-02-11 11:32:36 +00:00
trasz
7f7fd0dbc0 Use "default" as default discovery-auth-group, instead of "no-access".
It doesn't change visible behaviour, as previously auth-group "default"
wasn't redefinable, so by default access was always denied.

Sponsored by:	The FreeBSD Foundation
2014-02-11 11:31:08 +00:00
trasz
87a841d29a Update manual page to match recent auth-group "default" changes.
Sponsored by:	The FreeBSD Foundation
2014-02-11 11:29:58 +00:00
trasz
e4d2947104 Add a new auth-group "default", defaulting to deny, and make it possible
to redefine it.  From now on, assigning auth-group to a target is no longer
mandatory.

Sponsored by:	The FreeBSD Foundation
2014-02-11 11:29:05 +00:00
trasz
7dbe2512bb Make it possible to redefine portal-group "default".
Sponsored by:	The FreeBSD Foundation
2014-02-11 11:27:25 +00:00
trasz
f5f5c39110 Add auth-type.
Sponsored by:	The FreeBSD Foundation
2014-02-11 11:26:05 +00:00
trasz
e8652707f0 Rename a variable, no functional changes.
Sponsored by:	The FreeBSD Foundation
2014-02-11 11:14:50 +00:00
trasz
5f228e3b08 Yacc cleanup; no functional changes.
Sponsored by:	The FreeBSD Foundation
2014-02-11 11:11:37 +00:00
trasz
760495fbd7 Make function ordering slightly more logical; no functional changes.
Sponsored by:	The FreeBSD Foundation
2014-02-11 11:10:01 +00:00
trasz
fec3636fbd Implement initiator-name and initiator-portal restrictions.
Sponsored by:	The FreeBSD Foundation
2014-02-11 11:08:04 +00:00
trasz
b84432b20c Daemonize after applying configuration, not before, so that
any problems - including "daemon already running" - are visible
on the terminal and not just in logs.

Sponsored by:	The FreeBSD Foundation
2014-02-11 10:59:57 +00:00
trasz
e4b6e911a2 Empty data segment during Login Phase is rather unlikely, but it's
not, by itself, a protocol error.  This fixes interoperability with
OpenBSD initiator.

Sponsored by:	The FreeBSD Foundation
2014-02-11 10:58:32 +00:00
trasz
1d16ec7cee The log_whatever() routines don't accept NULL for format strings,
so mark them as __printflike instead of__printf0like.

Sponsored by:	The FreeBSD Foundation
2014-02-11 10:56:43 +00:00
trasz
f0306f793f Improve check for duplicated paths. It shows the warning twice for
every path (once for each duplicate found), but it should do for now.

Sponsored by:	The FreeBSD Foundation
2014-02-11 10:55:32 +00:00
trasz
942aab7c51 Refactor.
Sponsored by:	The FreeBSD Foundation
2014-02-11 10:53:08 +00:00
trasz
14f5d801bf So, it turns out SIGCHLD is discarded by default, so we have to set up
a dummy handler to make it interrupt an ioctl(2) or select(2).

This makes those short-lived iscsid(8) zombies disappear.

Sponsored by:	The FreeBSD Foundation
2014-02-11 10:47:28 +00:00
trasz
39c661e770 Empty data segment during Login Phase is rather unlikely, but it's not
a protocol error.

Sponsored by:	The FreeBSD Foundation
2014-02-11 10:45:20 +00:00
trasz
a2246187e5 The log_whatever() routines don't accept NULL for format strings,
so mark them as __printflike instead of __printf0like.

Sponsored by:	The FreeBSD Foundation
2014-02-10 15:12:59 +00:00
joel
8abe91ebd2 mdoc: minor paragraph fixes. 2014-02-08 13:37:02 +00:00
jhb
cd00db34cc Mark the I/O ports used by the bhyve console and debug devices as system
resources.

MFC after:	1 week
2014-02-07 20:53:41 +00:00
des
1253516150 Add -p to the example (why isn't this the default?)
MFC after:	1 week
2014-02-06 09:57:27 +00:00
des
13e7f78c73 Add an example of the most common use case.
MFC after:	1 week
2014-02-05 09:28:02 +00:00