Commit Graph

13901 Commits

Author SHA1 Message Date
Pedro F. Giffuni
997d42d7a7 crunch: Sync some NetBSD changes
Revert a comment that was not supposed to go away.

Obtained from:	NetBSD
2013-02-02 22:39:21 +00:00
Pedro F. Giffuni
96acb2c4fa crunch: Sync some NetBSD changes.
crunchide:
Apr 11, 2009: fix some -Wsign-compare issues.
Sep 20, 1999: Free the right thing.

crunchgen:
Apr 14, 2009: Fix some WARNS=4 issues (-Wshadow -Wcast-qual)
Oct 30, 2004: Add (unsigned char) cast to ctype functions
Feb 5, 2001: fix nested extern.

examples:
Aug 30, 2007: NetBSD 36867 - trsp references are deprecated

Obtained from:	NetBSD
MFC after:	1 week
2013-02-02 21:51:14 +00:00
Neel Natu
609933c61b Display MSI-X table and PBA offsets when displaying information about MSI-X
capability.

Reviewed by:	jhb, jimharris (initial version)
2013-02-01 19:24:16 +00:00
Neel Natu
445e089e21 Add support for MSI-X interrupts in the virtio block device and make that
the default.

The current behavior of advertising a single MSI vector can be requested by
setting the environment variable "BHYVE_USE_MSI" to "yes". The use of MSI
is not compliant with the virtio specification and will be eventually phased
out.

Submitted by:	Gopakumar T
Obtained from:	NetApp
2013-02-01 16:58:59 +00:00
Philippe Charnier
acd8b77456 Change old-style function definition 2013-02-01 14:26:54 +00:00
Daniel Eischen
605e5bbc41 Prevent a null pointer dereference in pw userdel when deleting
a user whose group != username.
2013-02-01 05:19:49 +00:00
Neel Natu
2b89a04496 Fix a broken assumption in the passthru implementation that the MSI-X table
can only be located at the beginning or the end of the BAR.

If the MSI-table is located in the middle of a BAR then we will split the
BAR into two and create two mappings - one before the table and one after
the table - leaving a hole in place of the table so accesses to it can be
trapped and emulated.

Obtained from:	NetApp
2013-02-01 03:49:09 +00:00
Neel Natu
aa12663f49 Fix a bug in the passthru implementation where it would assume that all
devices are MSI-X capable. This in turn would lead it to treat bar 0 as
the MSI-X table bar even if the underlying device did not support MSI-X.

Fix this by providing an API to query the MSI-X table index of the emulated
device. If the underlying device does not support MSI-X then this API will
return -1.

Obtained from:	NetApp
2013-02-01 02:41:47 +00:00
Gleb Smirnoff
9711a168b9 Retire struct sockaddr_inarp.
Since ARP and routing are separated, "proxy only" entries
don't have any meaning, thus we don't need additional field
in sockaddr to pass SIN_PROXY flag.

New kernel is binary compatible with old tools, since sizes
of sockaddr_inarp and sockaddr_in match, and sa_family are
filled with same value.

The structure declaration is left for compatibility with
third party software, but in tree code no longer use it.

Reviewed by:	ru, andre, net@
2013-01-31 08:55:21 +00:00
John Baldwin
2d5d7a0c83 Allow the address and ports to be separated by a colon or period rather
than a space to permit directly pasting the output of commands such as
netstat and sockstat on the command line.

Reviewed by:	net
MFC after:	1 week
2013-01-30 18:24:29 +00:00
Neel Natu
c9b4e98754 Add support for MSI-X interrupts in the virtio network device and make that
the default.

The current behavior of advertising a single MSI vector can be requested by
setting the environment variable "BHYVE_USE_MSI" to "true". The use of MSI
is not compliant with the virtio specification and will be eventually phased
out.

Submitted by:	Gopakumar T
Obtained from:	NetApp
2013-01-30 04:30:36 +00:00
Nathan Whitehorn
4bdf739335 If no resolv.conf has been made for the new system already and the install
media has one already, copy it in lieu of leaving things blank. This
reduces the foot-shooting potential for PXE installs that immediately
add packages.
2013-01-27 23:12:37 +00:00
Nathan Whitehorn
c3955762b9 Properly quote argument.
MFC after:	3 days
2013-01-27 14:49:54 +00:00
Mark Johnston
6a82e4291b Rename the run_cmd field to sw_runcmd to make it consistent with the
other fields in struct sigwork_entry.

Approved by:	rstone (co-mentor)
MFC after:	1 week
2013-01-27 06:03:57 +00:00
Mark Johnston
6df0ff43f0 Ensure that newsyslog -n prints the correct message for a rotation rule
that uses the 'R' flag.

Reviewed by:	gad
Approved by:	rstone (co-mentor)
MFC after:	1 week
2013-01-27 06:02:38 +00:00
Mark Johnston
3b58eef59e When the 'R' flag is used with a newsyslog.conf entry, some fields of
the corresponding struct sigwork_entry were left uninitialized,
potentially causing an early return from do_sigwork(). Ensure that these
fields are initialized, and handle the 'R' flag properly in
do_sigwork().

PR:		bin/175330
Reviewed by:	gad
Approved by:	rstone (co-mentor)
MFC after:	1 week
2013-01-27 06:01:35 +00:00
Pedro F. Giffuni
646a7fea0c Clean some 'svn:executable' properties in the tree.
Submitted by:	Christoph Mallon
MFC after:	3 days
2013-01-26 22:08:21 +00:00
Ian Lepore
3c5bfb5885 Revert accidental regression to previous misspelling.
Approved by:	cognet (mentor)
2013-01-26 22:02:40 +00:00
Ian Lepore
e6af9f3a37 Reduce watchdogd's memory footprint when running daemonized.
This uses the recently-added jemalloc(3) feature of setting the lg_chunk
tuning option to zero to request that memory be allocated in the smallest
chunks possible.  Without this option, the default is to initally map 8MB,
and then the mlockall() call wires that entire allocation even though the
program only uses a few Kbytes of it at runtime.

PR:		bin/173332
Approved by:	cognet (mentor)
2013-01-26 21:29:45 +00:00
Peter Grehan
2838f343c8 Improve correctness of rtc register implementation.
Submitted by:	tycho nightingale at pluribusnetworks com
2013-01-25 22:43:20 +00:00
Neel Natu
1caafc47a3 Use the correct type (uint64_t) to retrieve sysctl machdep.tsc_freq.
Simplify the function a bit by falling through after initialization and
return via the normal code path.

Reviewed by:	grehan
Obtained from:	NetApp
2013-01-25 06:27:03 +00:00
Brooks Davis
0ebbdcbea4 manctl is conditionally added to SUBDIRS later on. Don't unconditionally
include in the main list.
2013-01-23 23:51:44 +00:00
Jason Evans
44728051fd Fix compilation errors. 2013-01-23 07:22:33 +00:00
Baptiste Daroussin
5771a68296 Use snprintf instead of strc* functions and add bounds checking when creating
pkgngpath

Submitted by:	sbz, gahr
2013-01-22 22:41:12 +00:00
Nathan Whitehorn
f0ddc92d27 Improve error handling and remove an unnecessary check on geom provider
type. GEOM provider names can't duplicate (or shouldn't -- devfs will either
break or only use the first one if they do) so using the first provider
by that name is a sufficient check. This also lets the scripted partitioner
install onto gmirror and geli and such things.
2013-01-22 17:06:28 +00:00
Nathan Whitehorn
aeff2fb371 Improve documentation of BSDINSTALL_DISTSITE and mdoc. 2013-01-22 15:26:19 +00:00
Nathan Whitehorn
3193ad883a Clarify that the setup script is optional. 2013-01-22 02:57:53 +00:00
Nathan Whitehorn
790f1bb70c Update change date. 2013-01-22 02:47:08 +00:00
Nathan Whitehorn
53f01f3a8a Document bsdinstall scripting as it currently operates. It may change in
the future depending on feedback from people using it to do unattended
system setup.
2013-01-22 02:40:06 +00:00
Neel Natu
2e81a7e8ab Allocate the memory for the MSI-X table dynamically instead of allocating 32KB
statically. In most cases the number of table entries will be far less than
the maximum of 2048 allowed by the PCI specification.

Reuse macros from pcireg.h to interpret the MSI-X capability instead of rolling
our own.

Obtained from:	NetApp
2013-01-21 22:07:05 +00:00
Neel Natu
c3cbaac942 Get rid of redundant 'table_size' field in struct pi_msix. If needed it can
always be calculated from the number of entries in the MSI-X table.

Obtained from:	NetApp
2013-01-21 08:12:59 +00:00
Nathan Whitehorn
bd67b82b61 Remove some debugging code that snuck in. 2013-01-21 02:47:14 +00:00
Nathan Whitehorn
2ffbec1872 Add a scripting frontend. Documentation and release(7) support coming later.
Scripts take the form:

------------------------------------
PARTITIONS=ada0
DISTRIBUTIONS="kernel.txz base.txz ports.txz"

#!/bin/sh
echo "sshd_enable=YES" >> /etc/rc.conf
pkg add puppet
echo "System setup complete"
------------------------------------

The second part of the script (beginning with #!) is run in the newly
installed system after the installation onto ada0 (with default partitioning,
see scriptedpart for more complicated scenarios) is complete.
2013-01-21 01:01:32 +00:00
Nathan Whitehorn
a6b612e920 If no partition configuration is specified in {}, use the automatic setup
the interactive installer uses.

Example: bsdinstall scriptedpart ada0
Result: Use entire disk for a FreeBSD system with default partition layout
2013-01-20 23:04:21 +00:00
Nathan Whitehorn
5eca7e06a1 Add a simple scripted partitioner. Documentation and more scripting support
will come soon. This lets the install process have a line like:

bsdinstall scriptedpart 'ada0 GPT {1.5G freebsd-ufs /, 10G freebsd-swap,
    auto freebsd-ufs /usr}'

to set up a system with a 1.5GB /, some swap space, and a /usr using the
rest of ada0.

MFC after:	1 month
2013-01-20 22:25:58 +00:00
Andrey Zonov
ec89b1f97c - Force inetd to have listen queue size to be set to the value of
kern.ipc.somaxconn instead of hardcoded value 64.

Submitted by:	Andrey Ignatov <rdna@rdna.ru>
MFC after:	2 weeks
2013-01-20 19:44:33 +00:00
Devin Teske
8ff9900c28 Backward compatibility fix: treat cmds loaded as a script as nonInteractive 2013-01-20 17:48:56 +00:00
Joel Dahl
9c17a1c7fe Fix minor nit in usage output.
Reviewed by:	neel
2013-01-20 08:18:56 +00:00
Nathan Whitehorn
c4bd43b00b Make "Finish" the default choice in the partition editor. This lets you
successfully complete an installation with all defaults by pressing
Enter repeatedly until your machine reboots.

MFC after:	3 weeks
2013-01-20 03:55:08 +00:00
Neel Natu
24be8623c6 Use <vmname> in a consistent manner in usage messages output by 'bhyve',
'bhyveload' and 'bhyvectl'.

Pointed out by:	joel@
2013-01-20 03:47:13 +00:00
Joel Dahl
bf77e2dbfc Remove EOL whitespace. 2013-01-19 07:07:05 +00:00
Joel Dahl
edccda4d08 Minor mdoc fixes. 2013-01-19 07:04:30 +00:00
Neel Natu
c458fc1ed4 Merge projects/bhyve to head.
'bhyve' was developed by grehan@ and myself at NetApp (thanks!).

Special thanks to Peter Snyder, Joe Caradonna and Michael Dexter for their
support and encouragement.

Obtained from:	NetApp
2013-01-19 04:18:52 +00:00
Eitan Adler
38d90616e6 Add option to make pc-sysinstall optional
Approved by:	cperciva
2013-01-18 15:57:09 +00:00
Alfred Perlstein
b647367061 Spelling: exitting -> exiting
MFC after:	2 weeks
2013-01-18 02:36:06 +00:00
Jung-uk Kim
efcc2a3054 Merge ACPICA 20130117. 2013-01-17 23:56:43 +00:00
Neel Natu
c2217b9848 IFC @ r245509 2013-01-17 07:04:37 +00:00
Eitan Adler
535460c7dc Remove unused variables
Approved by:	cperciva
MFC After:	3 days
2013-01-16 05:03:49 +00:00
Eitan Adler
bab89cefc7 Avoid clobbering errno with a call to fprintf
PR:		bin/173923
Submitted by:	Garrett Cooper <yanegomi@gmail.com>
Approved by:	cperciva
MFC After:	3 days
2013-01-16 05:00:51 +00:00
Devin Teske
db7b0ba78f Don't use f_show_msg() unless printf(1) syntax is required (this reduces the
number of unnecessary forks).
2013-01-14 21:03:34 +00:00