Commit graph

14080 commits

Author SHA1 Message Date
Neel Natu 028d9311cd Improve PCI BAR emulation:
- Respect the MEMEN and PORTEN bits in the command register
- Allow the guest to reprogram the address decoded by the BAR

Submitted by:	Gopakumar T
Obtained from:	NetApp
2013-04-10 02:12:39 +00:00
Ed Schouten edd6bc7670 Import a new version of NetBSD's mtree.
This version of mtree implements a new flag (-O) that can be used to
restrict the tool to certain pathnames. Also, it fixes a compiler
warning generated by -Wmissing-variable-declarations.

Acked by:	brooks
2013-04-09 06:50:11 +00:00
Mark Johnston 8f66059200 Switch to a 2-clause license.
Approved by:	emaste (co-mentor)
X-MFC with:	r249257
2013-04-08 18:25:07 +00:00
Mark Johnston dee3e845aa Add support for getting and setting BBU properties related to battery
relearning. Specifically, add subcommands to mfiutil(8) which allow the
user to set the BBU and autolearn modes when the firmware supports it,
and add a subcommand which kicks off a battery relearn.

Reviewed by:	sbruno, rstone
Tested by:	sbruno
Approved by:	rstone (co-mentor)
MFC after:	2 weeks
Sponsored by:	Sandvine Incorporated
2013-04-08 17:46:45 +00:00
Ed Schouten 5e49d30e89 Mark the act_tbl static/const.
This table is only used within this source file and is only accessed
read-only.

MFC after:	1 week
2013-04-08 08:05:15 +00:00
Marius Strobl 220fa950ce Add some missing newlines and static declarations.
MFC after:	3 days
2013-04-07 15:33:06 +00:00
Adrian Chadd fb522624d3 Extend ath3kfw to include overridable device / vendor IDs.
This is required for ar3k series bluetooth devices who need firmware
but have a different vendor ID than normal.

Reviewed by:	maksim
2013-04-05 23:42:22 +00:00
Peter Grehan 6c2cb80e64 Remove dangling ISA uart stubs.
Obtained from:	NetApp
2013-04-05 22:19:02 +00:00
Peter Grehan f82d0672c7 config checksum is over the entire fixed portion, not just the
config header. FreeBSD doesn't check this but other o/s's do.

Obtained from:	NetApp
2013-04-05 22:14:07 +00:00
Jung-uk Kim 9c7c683c56 Merge ACPICA 20130328. 2013-04-04 22:11:30 +00:00
Alexander Motin b296309582 Remove some more references to legacy ATA.
Submitted by:	Dmitry Luhtionov <dmitryluhtionov@gmail.com>
2013-04-04 12:03:30 +00:00
Alexander Motin 256cb4aa44 Remove usr.sbin/burncd, useless after legacy ATA stack removal. 2013-04-04 09:21:24 +00:00
Edward Tomasz Napierala a1593396d3 Fix dates in manual pages modified in 249009. 2013-04-02 09:44:59 +00:00
Edward Tomasz Napierala 325621458d Make it possible to build CTL as a module.
Reviewed by:	ken
Sponsored by:	FreeBSD Foundation
2013-04-02 09:42:42 +00:00
Matthew D Fleming e324bf91e8 Fix return type of extattr_set_* and fix rmextattr(8) utility.
extattr_set_{fd,file,link} is logically a write(2)-like operation and
should return ssize_t, just like extattr_get_*.  Also, the user-space
utility was using an int for the return value of extattr_get_* and
extattr_list_*, both of which return an ssize_t.

MFC after:	1 week
2013-04-02 05:30:41 +00:00
Neel Natu b5aaf7b22b Add some more stats to keep track of all the reasons that a vcpu is exiting. 2013-03-30 17:46:03 +00:00
Jamie Gritton bea2eefca4 Reverse the order of some implicit commands (FS mounts and ifconfigs)
when stopping jails.  This matters particularly for nested filesystem
mounts.

PR:		kern/177325
Submitted by:	Harald Schmalzbauer
MFC after:	3 days
2013-03-28 21:02:49 +00:00
Jung-uk Kim 52569792bd Loosen restrictions for quoted strings. Now we can use more complex strings
and "escaped" quote characters.

MFC after:	1 month
2013-03-26 23:58:13 +00:00
Mark Johnston 91ba008fc5 Fix interval-based rotations when the -t flag is used. In this case, find
the most-recently archived logfile and use its mtime to determine whether
or not to rotate, as in the non-timestamped case.

Previously we would just try to use the mtime of <logfile>.0, which always
results in a rotation since it generally doesn't exist in the -t case.

PR:		bin/166448
Approved by:	emaste (co-mentor)
Tested by:	Marco Steinbach <coco executive-computing.de>
MFC after:	2 weeks
2013-03-26 23:11:30 +00:00
Mark Johnston 8d7ad01f94 Invert the meaning of -S (added in r247405) and document its meaning. Also,
don't carp about the watchdog command taking too long until after the
watchdog has been patted, and don't carp via warnx(3) unless -S is set
since syslog(3) already logs to standard error otherwise.

Discussed with:	alfred
Reviewed by:	alfred
Approved by:	emaste (co-mentor)
2013-03-26 19:43:18 +00:00
Mikolaj Golub aebd8de674 hrStorageSize and hrStorageUsed are 32 bit integers, reporting a fs
size and usage in hrStorageAllocationUnits. If the file system has
more than 2^31 allocations it can not be shown correctly and the
meters are useless.

In such cases follow net-snmp behaviour and increase
hrStorageAllocationUnits so the values fit under INT_MAX.

PR:		bin/177183
Submitted by:	Eugene Grosbein egrosbein rdtc.ru
MFC after:	2 weeks
2013-03-25 19:12:36 +00:00
Martin Matuska ebb8fc42be Replace deprecated (or remove obsolete) libarchive 2.8 functions
with libarchive 3.0 counterparts
2013-03-22 10:17:42 +00:00
Joel Dahl f11731eba1 mdoc: remove superfluous paragraph macro. 2013-03-19 07:25:58 +00:00
Jung-uk Kim 569d8f7e27 Add preliminary support for IBM/Lenovo TrackPoint.
PR:		kern/147237 (based on the initial patch for 8.x)
Tested by:	glebius (device detection and suspend/resume)
MFC after:	1 month
2013-03-18 23:22:47 +00:00
Neel Natu b060ba5024 Simplify the assignment of memory to virtual machines by requiring a single
command line option "-m <memsize in MB>" to specify the memory size.

Prior to this change the user needed to explicitly specify the amount of
memory allocated below 4G (-m <lowmem>) and the amount above 4G (-M <highmem>).

The "-M" option is no longer supported by 'bhyveload' and 'bhyve'.

The start of the PCI hole is fixed at 3GB and cannot be directly changed
using command line options. However it is still possible to change this in
special circumstances via the 'vm_set_lowmem_limit()' API provided by
libvmmapi.

Submitted by:	Dinakar Medavaram (initial version)
Reviewed by:	grehan
Obtained from:	NetApp
2013-03-18 22:38:30 +00:00
Joel Dahl c65b9b0bd9 Move example to EXAMPLES. 2013-03-17 06:54:04 +00:00
Neel Natu 1e7d750c75 Change the type of 'ndesc' from 'int' to 'uint16_t' so that descriptor index
wraparound is handled correctly.

The gory details are available here:
http://lists.freebsd.org/pipermail/freebsd-virtualization/2013-March/001119.html

This fixes a regression introduced in r247871.

Pointed out by:	Bruce Evans, Chris Torek
2013-03-16 05:40:29 +00:00
Hans Petter Selasky 6619413096 - Make the FreeBSD's USB library compile under Linux.
- Fix a compile warning where the return value of a call
to a write() function was ignored.
- Remove redundant include files from userland USB header files.
- Add some now needed include files to various C-files.
2013-03-13 12:23:14 +00:00
Neel Natu 4b5e84f615 Convert the offset into the bar that contains the MSI-X table to an offset
into the MSI-X table before using it to calculate the table index.

In the common case where the MSI-X table is located at the begining of the
BAR these two offsets are identical and thus the code was working by accident.

This change will fix the case where the MSI-X table is located in the middle
or at the end of the BAR that contains it.

Obtained from:	NetApp
2013-03-11 17:36:37 +00:00
Antoine Brodin 1f9712deb7 Fix a typo in DPADD. 2013-03-10 17:10:16 +00:00
Attilio Rao a92189b377 Garbage collect NWFS and NCP bits which are now completely disconnected
from the tree since few months.

This patch is not targeted for MFC.
2013-03-09 12:45:36 +00:00
Baptiste Daroussin 968d04c371 Fix bootstrapping pkgng by not appending "/latest/" to PACKAGESITE.
Reporter by :	Alexander Yerenkow (via irc)
2013-03-08 10:43:03 +00:00
Peter Grehan 6be7c5e31c Simplify virtio ring num-available calculation.
Submitted by:	Chris Torek, torek at torek dot net
2013-03-06 07:28:20 +00:00
Peter Grehan ba02487a0e Reorder code to avoid the stat buffer being used uninitialized.
Obtained from:	NetApp
2013-03-06 06:24:09 +00:00
Hiroki Sato 833d853cbf Fix SIGSEGV when set_short_delay() is called when ifi->ifi_ra_timer is NULL.
This can happen in a short period when a prefix is changed by a rtmsg and a
new interface arrives.
2013-03-06 04:58:48 +00:00
Baptiste Daroussin d5bf8a8b57 choose in priority the allocated ABI if any to do the ${ABI} substitution in PACKAGESITE
Reviewed by:	bdrewery
2013-03-05 14:08:36 +00:00
Baptiste Daroussin 9950eceee6 Add the ability to correctly read pkg.conf is exists.
Only look for boostrap useful options:
 - PACKAGESITE
 - ABI
 - MIRROR_TYPE
 - ASSUME_ALWAYS_YES

While here makes PACKAGESITE expand the ${ABI} variable.
Allow to deactivate any SRV record look up (MIRROR_TYPE=none)
Use the same mechanism as for pkgng itself: first get configuration out of
environment variable and fallback on pkg.conf if exists.

Reviewed by:	bdrewery
2013-03-05 13:31:06 +00:00
Devin Teske d2dc532df5 Fix VERBOSE reporting on results when removing _PATH_LOCALTIME for UTC option.
PR:		bin/164976
Submitted by:	dteske
2013-03-04 11:34:31 +00:00
Josh Paetzel 4a99f3fcc1 Use GNOP to force ZFS pools to 4k.
Obtained from:	PC-BSD
2013-03-03 23:07:27 +00:00
Josh Paetzel 9090eb778e Improves and enhances using the "installPackages=" variable.
Adds "pkgExt=" variable to set if pkgs are .tbz or .txz or other.
Auto-detects if packages are PKGNG or old PKG format.
Auto-bootstrap of PKGNG for the new installed environment.
Fixes issues with installing packages from local media, such as DVD/USB.

Switch to using a space-delimiter for installPackages, since a number
of packages use a "," in their version string.

Fix pc-sysinstall to ignore install scripts, and not hang on
user interaction prompts when installing pkgs.

Add pkg2ng command as apart of pkgng bootstrap process.

Obtained from:	PC-BSD
2013-03-03 23:01:46 +00:00
Josh Paetzel b771592d97 Fix a bug extracting files from dist scheme
Obtained from:	PC-BSD
2013-03-03 09:47:47 +00:00
Attilio Rao 4eb0218ace Garbage collect PORTALFS bits which are now completely disconnected from
the tree since few months.

This patch is not targeted for MFC.
2013-03-02 16:43:28 +00:00
Neel Natu 91039bb268 Specify the length of the mapping requested from 'paddr_guest2host()'.
This seems prudent to do in its own right but it also opens up the possibility
of not having to mmap the entire guest address space in the 'bhyve' process
context.

Discussed with:	grehan
Obtained from:	NetApp
2013-03-01 02:26:28 +00:00
Joel Dahl 06db73ec2b Remove EOL whitespace. 2013-02-27 20:16:30 +00:00
Joel Dahl 42e7fa7e09 mdoc: begin sentence on new line. 2013-02-27 20:15:06 +00:00
Alfred Perlstein 4b9b732ac0 watchdogd(8) and watchdog(4) enhancements.
The following support was added to watchdog(4):
- Support to query the outstanding timeout.
- Support to set a software pre-timeout function watchdog with an 'action'
- Support to set a software only watchdog with a configurable 'action'

'action' can be a mask specifying a single operation or a combination of:
 log(9), printf(9), panic(9) and/or kdb_enter(9).

Support the following in watchdogged:
- Support to utilize the new additions to watchdog(4).
- Support to warn if a watchdog script runs for too long.
- Support for "dry run" where we do not actually arm the watchdog,
  but only report on our timing.

Sponsored by:   iXsystems, Inc.
MFC after:      1 month
2013-02-27 19:03:31 +00:00
Neel Natu 58a6b0338a Ignore the BARRIER flag in the virtio block header.
This capability is not advertised by the host so ignore it even if the guest
insists on setting the flag.

Reviewed by:	grehan
Obtained from:	NetApp
2013-02-26 20:02:17 +00:00
Neel Natu 42b4049c34 Get rid of unused struct member.
Pointed out by:	Gopakumar T
Obtained from:	NetApp
2013-02-25 20:31:47 +00:00
Devin Teske 7323adac99 Import media selection/preparation framework (sysinstall inspired). Makes
accessing files from various types of media nice and abstracted away from
the wet-work involved in preparing, validating, and initializing those
types of media. This will be used for the package management system module
and other modules that need access to files and want to allow the user to
decide where those files come from (either in a scripted fashion, prompted
fashion, or any combination thereof).

Heavily inspired by sysinstall and even uses the same reserved words so
that scripts are portable. Coded over months, tested continuously through-
out, and reviewed several times.

Some notes about the changes:
- Move network-setting acquisition/validation routines to media/tcpip.subr
- The options screen from sysinstall has been converted to a dialog menu
- The "UFS" media choice is renamed to "Directory" to reflect how sysinstall
  treats the choice and a new [true] "UFS" media choice has been added that
  acts on real UFS partitions (such as external disks with disklabels).
- Many more help files have been resurrected from sysinstall (I noticed that
  some of the content seems a bit dated; I gave them a once-over but they
  could really use an update).
- A total of 10 media choices are presented (via mediaGetType) including:
  CD/DVD, FTP, FTP Passive, HTTP Proxy, Directory, NFS, DOS, UFS, Floppy, USB
- Novel struct/device management layer for managing the issue of passing
  more information than can comfortably fit in an argument list.
2013-02-25 19:55:32 +00:00
Devin Teske 11c5cac53f Fix typo and update copyright. 2013-02-25 19:14:06 +00:00
Dag-Erling Smørgrav c1803a93a4 - Implement and use usage().
- Document the -C option.
- Allow rtadvd to be invoked without any interfaces on the command line,
  and document that possibility.

MFC after:	1 week
2013-02-25 16:47:09 +00:00
Pawel Jakub Dawidek 081b42f93c Don't print an empty line for files with no attributes when -q is given for
lsextattr(8).
2013-02-22 20:49:50 +00:00
Peter Grehan 0ab13648f5 Add the ability to have a 'fallback' search for memory ranges.
These set of ranges will be looked at if a standard memory
range isn't found, and won't be installed in the cache.
Use this to implement the memory behaviour of the PCI hole on
x86 systems, where writes are ignored and reads always return -1.
This allows breakpoints to be set when issuing a 'boot -d', which
has the side effect of accessing the PCI hole when changing the
PTE protection on kernel code, since the pmap layer hasn't been
initialized (a bug, but present in existing FreeBSD releases so
has to be handled).

Reviewed by:	neel
Obtained from:	NetApp
2013-02-22 00:46:32 +00:00
Baptiste Daroussin ff75c36ae1 Do not use deprecated functions from libarchive 2013-02-20 22:51:42 +00:00
Brooks Davis 1f0ed3c00e Support hardlinks in manifest files by the same logic as the treewalk
code.

Reviewed by:	marcel
Sponsored by:	DARPA, AFRL
2013-02-20 19:32:31 +00:00
Brooks Davis 17b3e6f746 Allow '.' components in manifest paths. They are always the first
component of mtree -C and install -M output and are easily skipped.

Reviewed by:	marcel
Sponsored by:	DARPA, AFRL
2013-02-20 15:28:40 +00:00
Brooks Davis e9a03238b0 Fix the -N option in manifest mode by using pwcache(3). This also
speeds up image creation appreciably.

Reviewed by:	marcel
Sponsored by:	DARPA, AFRL
2013-02-20 15:25:40 +00:00
Brooks Davis b0d9adde80 Add a -D flag that causes duplicate entries in an mtree manifest to be
treated as warnings rather than errors.

Reviewed by:	marcel
Sponsored by:	DARPA, AFRL
2013-02-20 15:18:42 +00:00
Sergey Kandaurov dcdc127b07 Check if the -sec option is given without an argument.
PR:		bin/170413
Submitted by:	Andrey Simonenko <simon@comsys.ntu-kpi.kiev.ua>
MFC after:	1 week
2013-02-20 12:40:26 +00:00
Dimitry Andric a7449e3cca Since clang 3.2 now has an option to suppress warnings about implicitly
promoted K&R parameters, remove the workarounds added for sendmail
components in r228558.

MFC after:	1 week
2013-02-16 20:17:31 +00:00
Jung-uk Kim 9c48c75ed6 Merge ACPICA 20130214. 2013-02-15 20:36:28 +00:00
Neel Natu 74f80b236d Advertise PCI-E capability in the hostbridge device presented to the guest.
FreeBSD wants to see this capability in at least one device in the PCI
hierarchy before it allows use of MSI or MSI-X.

Obtained from:	NetApp
2013-02-15 18:41:36 +00:00
Jamie Gritton e593549587 Handle (ignore) when a process disappears before it can be tracked. 2013-02-14 19:27:52 +00:00
Neel Natu a58ed3e913 Add option "--unassign-pptdev=<bus/slot/func>" to allow 'bhyvectl' to detach
passthru devices from the guest.

Obtained from:	NetApp
2013-02-14 18:41:12 +00:00
Philippe Charnier 3e687cf089 remove old-style function definition
reduce WARNS=6 output
2013-02-14 14:44:08 +00:00
Baptiste Daroussin 86e220abc9 In case of failure of the pkg boostrap advice the user to either change the
PACKAGESITE they use or install from ports directly indicating where the port
is localted in the port collection

Submitted by:	kientzle
2013-02-14 12:42:09 +00:00
Hans Petter Selasky aafcb73207 Add USB API to read power draw on USB devices.
Update usbconfig to print power draw on USB devices.

MFC after:	2 weeks
Submitted by:	Matt Burke @ icritical.com
2013-02-14 12:22:40 +00:00
Xin LI 535875c734 Simplify r243637 and make sure that nfsdargs.{min,max}threads are always set
to meaningful value:

 - When nfsdcnt is set, it dictates all values;
 - Otherwise, nfsdargs.minthreads is set to user specified value, or the
   automatically detected value if there is no one specified;
   nfsdargs.maxthreads is set to the user specified value, or the value
   of nfsdargs.minthreads if there is no one specified; when it is smaller
   than nfsdargs.minthreads, the latter's value is always used.

MFC after:	2 weeks
2013-02-14 02:00:41 +00:00
Xin LI 2a0b6dc5c3 Abstract out setting of nfsdcnt and consistently use MAXNFSDCNT when the
proposed value is too high and DEFNFSDCNT when proposed value is too low.

MFC after:	2 weeks
2013-02-14 01:25:14 +00:00
Xin LI f33fce4865 Use static for all functions that do not need to be exported.
MFC after:	2 weeks
2013-02-14 01:01:53 +00:00
Neel Natu 485b3300cc Implement guest vcpu pinning using 'pthread_setaffinity_np(3)'.
Prior to this change pinning was implemented via an ioctl (VM_SET_PINNING)
that called 'sched_bind()' on behalf of the user thread.

The ULE implementation of 'sched_bind()' bumps up 'td_pinned' which in turn
runs afoul of the assertion '(td_pinned == 0)' in userret().

Using the cpuset affinity to implement pinning of the vcpu threads works with
both 4BSD and ULE schedulers and has the happy side-effect of getting rid
of a bunch of code in vmm.ko.

Discussed with:	grehan
2013-02-11 20:36:07 +00:00
Neel Natu f37ba72632 Use the entire 64 bits of 'bar.pbi_length' when printing the bar size.
This allows bar sizes greater than or equal to 4GB to be displayed correctly.
2013-02-10 19:35:40 +00:00
Colin Percival 4bd1e0bbf8 Don't try to suppress the inclusion of the build date in named's version
string by undefining __DATE__, since (unlike gcc) clang doesn't allow us
to do that.  Instead, define NO_VERSION_DATE, which was helpfully added
to the named source code for exactly this purpose.
2013-02-10 17:58:44 +00:00
Devin Teske efef5e5c1e Remove NO_OBJ from Makefiles that generate manuals because this causes the
GZIP compressed manuals to appear in ./src instead of the appropriate obj dir.

PR:		conf/175844
Submitted by:	Dominique Goncalves <dominique.goncalves@gmail.com>
2013-02-08 11:14:01 +00:00
John Baldwin 0895e9c70c Install <dev/agp/agpreg.h> and <dev/pci/pcireg.h> as userland headers
in /usr/include.

MFC after:	2 weeks
2013-02-05 18:55:09 +00:00
Pedro F. Giffuni 2ebed5db20 crunchgen: Permit use of alternative linkers.
Submitted by:	Pete Chou
MFC after:	1 week
2013-02-05 02:57:59 +00:00
Pedro F. Giffuni e8ee1a1ea5 crunchide(1): Put e_shnum into a local variable.
This simplifies the code a bit.

Submitted by:	Cristoph Mallon
MFC after:	2 weeks
2013-02-03 21:16:33 +00:00
Pedro F. Giffuni b5782a4705 crunchide(1): support non-custom elf object layout
The crunchide utility presumes the last 3 chunks of an ELF object
layout are section headers, symbol table, and then string table.
However, this is  not specified in the ELF standards, and linkers
may generate different layouts when doing partial linking (-r).

This change is required to build FreeBSD with mclinker or the
gold linker.

PR:		bin/174011
Submitted by:	Pete Chou
Reviewed by:	Cristoph Mallon
MFC after:	2 weeks
2013-02-03 20:35:37 +00:00
Pedro F. Giffuni bf861ada38 crunch: Sync some NetBSD changes
Fix a couple of free's in previous commit.

Obtained from:	NetBSD
MFC after:	1 week
2013-02-03 01:54:25 +00:00
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
Baptiste Daroussin 8cc0ef19d2 Directly uses calloc(3) instread of malloc(3) + memset(3)
Reported by:	Jeremy Chadwick <jdc@koitsu.org>
MFC after:	3 days
2013-01-14 07:17:38 +00:00
Devin Teske 27ff90aa87 Add new f_yesno/f_noyes wrapper functions (which take printf(1) syntax). 2013-01-14 01:15:25 +00:00
Devin Teske 3c91c65a2b Add missing dialog(1) arguments to internationalize "Help"-button label. 2013-01-14 01:09:23 +00:00
Nathan Whitehorn aa333a1880 Note that cpufreq(4) is not available on all hardware.
PR:		bin/175139
MFC after:	2 weeks
2013-01-12 16:01:58 +00:00
Joel Dahl 0510534298 Remove EOL whitespace. 2013-01-12 08:44:54 +00:00
Brooks Davis 624c4889c7 Always install our mtree as /usr/sbin/fmtree and link it as
/usr/sbin/mtree by default.

Add a src.conf option WITH_NMTREE that causes NetBSD's mtree to be linked
as /usr/sbin/mtree as well as /usr/sbin/nmtree.
2013-01-09 21:07:08 +00:00
Hajimu UMEMOTO 164051cea5 Add no_prefer_iface option.
It stops treating the address on the interface as special by source
address selection rule even when the interface is outgoing interface.
This is desired in some situation.

Requested by:	hrs
Reviewed by:	IHANet folks including hrs
MFC after:	1 week
2013-01-09 18:18:08 +00:00
Neel Natu c83f77500c Get rid of 'sample.sh' from here - it belongs in the /usr/share/examples
directory.

Obtained from:	NetApp
2013-01-09 04:04:30 +00:00
Neel Natu 0ff4c70271 Sort the 'bhyvectl' subdir alphabetically.
Obtained from:	NetApp
2013-01-09 04:02:23 +00:00
Neel Natu 1b54fbe69d IFC @ r245178 2013-01-09 02:26:50 +00:00
Neel Natu 83994ddc7c Add the 'bhyveload(8)' man page.
Obtained from:	NetApp
Reviewed by:	grehan
2013-01-08 06:00:32 +00:00
Neel Natu e37bc32183 Reduce the default memory allocation for a VM from 768MB to 128MB.
Obtained from:	NetApp
2013-01-08 01:56:05 +00:00
Peter Grehan 70d980fc34 Don't completely drain the read file descriptor. Instead, only
fill up to the uart's rx fifo size, and leave any remaining input
for when the rx fifo is read. This allows cut'n'paste of long lines
to be done into the bhyve console without truncation.

Also, introduce a mutex since the file input will run in the mevent
thread context and may corrupt state accessed by a vCPU thread.

Reviewed by:	neel
Approved by:	NetApp
2013-01-07 07:33:48 +00:00
Peter Grehan 5fdfc2b893 Use 64-bit arithmetic throughout, and lock accesses to globals.
With this change, dbench with >= 4 processes runs without getting
weird jumps forward in time when the APCI pmtimer is the default
timecounter.

Obtained from:	NetApp
2013-01-07 04:51:43 +00:00
Devin Teske 1d70f5f445 Update copyright following last commit. 2013-01-07 00:18:03 +00:00
Devin Teske 3da75d2e7b Add nonInteractive support to f_dialog_yesno/noyes(). 2013-01-07 00:15:52 +00:00
Mateusz Guzik 1f09eec3f8 pw: free group returned by gr_add 2013-01-06 21:56:58 +00:00
Devin Teske 31a41563c0 Update copyrights and dates following last commit. 2013-01-06 18:18:09 +00:00
Devin Teske 99bc932ec2 Add support for scripting (sysinstall style).
Reviewed by:	jilles
2013-01-05 02:08:47 +00:00
Benjamin Kaduk e8ab2920c7 Grammar fixes and some wordsmithing
Discussed with:	rmacklem
Approved by:	hrs (mentor)
MFC after:	2 weeks
2013-01-05 00:27:08 +00:00
Neel Natu 46b1c55d9e IFC @ r244983. 2013-01-04 19:28:32 +00:00