ANSI-fy prototype.

MFC after:	2 weeks


git-svn-id: svn+ssh://svn.freebsd.org/base/head@260618 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Add an API to rendezvous all active vcpus in a virtual machine. The rendezvous
can be initiated in the context of a vcpu thread or from the bhyve(8) control
process.

The first use of this functionality is to update the vlapic trigger-mode
register when the IOAPIC pin configuration is changed.

Prior to this change we would update the TMR in the virtual-APIC page at
the time of interrupt delivery. But this doesn't work with Posted Interrupts
because there is no way to program the EOI_exit_bitmap[] in the VMCS of
the target at the time of interrupt delivery.

Discussed with:	grehan@


git-svn-id: svn+ssh://svn.freebsd.org/base/head@260619 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Add missing EM_PPC64 to e_machine header display.

MFC after:	1 week


git-svn-id: svn+ssh://svn.freebsd.org/base/head@260621 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Don't output any modifier keys before we see a valid
non-modifier key press. This prevents so-called "ghost
keyboards" keeping modifier keys pressed while not
actually seen as a real keyboard.

MFC after:	2 weeks


git-svn-id: svn+ssh://svn.freebsd.org/base/head@260622 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Support defining test program metadata from the Makefiles.

Introduce a new, per-test-program TEST_METADATA.<program> variable that
contains a list of key/value paris describing metadata properties for
that test program.  These properties are later written into the
auto-generated Kyuafile when using the KYUAFILE=auto functionality.

This is to avoid having to supply hand-crafted Kyuafiles when the needs
for metadata overrides are trivial.

While doing this, and because I am documenting TEST_METADATA, take the
chance to document the TEST_INTERFACE setting as well.

MFC after:	5 days


git-svn-id: svn+ssh://svn.freebsd.org/base/head@260632 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Support perl-based TAP-compliant test programs.

Introduce a TAP_TESTS_PERL primitive to list test programs written in perl.
Only do this in tap.test.mk because I only expect perl-based test programs
with this interface.

This is very similar to TAP_TESTS_SH but the difference is that we record
in the Kyuafile that the test program requires a perl interpreter.  This
in turn makes Kyua mark the test as skipped if the perl package is not yet
installed, instead of mysteriously failing to run the program.

MFC after:	5 days


git-svn-id: svn+ssh://svn.freebsd.org/base/head@260633 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Use TAP_TESTS_PERL to register the legacy_test in bin/pax.

Redo r260586 by using the new functionality in tap.test.mk to transparently
support perl-based test programs.

As a side-effect, we get rid of an explicit path to /usr/bin/perl by
replacing it with /usr/local/bin/perl (or as defined in tap.test.mk).

This also fixes the name of the legacy_test source file because this should
have always been legacy_test.pl and not legacy_test.sh.  My mistake when
originally moving the code around without realizing that this was a perl
script.

MFC after:	5 days


git-svn-id: svn+ssh://svn.freebsd.org/base/head@260634 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Replace hand-crafted Kyuafiles with automatic generation.

Redo r260506 by using the new TEST_METADATA functionality of bsd.test.mk
to mark the sh(1) and test(1) tests as not supporting root.  This is to
get rid of hand-crafted Kyuafiles for these very simple cases.

MFC after:	5 days


git-svn-id: svn+ssh://svn.freebsd.org/base/head@260635 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Fix bsnmpd remote denial of service vulnerability.

Reported by:	dinoex
Submitted by:	harti
Security:	FreeBSD-SA-14:01.bsnmpd
Security:	CVE-2014-1452


git-svn-id: svn+ssh://svn.freebsd.org/base/head@260636 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Disable 'monitor' feature in ntpd by default.

Security:	FreeBSD-SA-14:02.ntpd
Approved by:	so


git-svn-id: svn+ssh://svn.freebsd.org/base/head@260637 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Fix lock leak in purely hypothetical case of TCP connection without SVC_ACK
method.  This change should be NOP now, but it is better to be future safe.

Reported by:	rmacklem


git-svn-id: svn+ssh://svn.freebsd.org/base/head@260648 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
libc/resolv: Use poll() instead of kqueue().

The resolver in libc creates a kqueue for watching a single file descriptor.
This can be done using poll() which should be lighter on the kernel and
reduce possible problems with rlimits (file descriptors, kqueues).

Reviewed by:	jhb


git-svn-id: svn+ssh://svn.freebsd.org/base/head@260652 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
- Purge old translations.
- Add missing footer due to DSSSL->XSLT migration and use XML catalog to
  resolve URI[*].

Based on the work by:	gabor [*]


git-svn-id: svn+ssh://svn.freebsd.org/base/head@260653 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sh: Remove SIGWINCH handler and just check for resize before every read.

The SIGWINCH handler triggers breakage in libedit which is hard to fix; see
PR bin/169773.

Also, window size changes while a program is in foreground (and it rather
than sh will receive SIGWINCH) will now be picked up automatically.

Downside: it is now certain that a resize is only processed after pressing
<Enter>. If libedit is fixed, sh will most likely have to be changed also.

PR:		bin/180146


git-svn-id: svn+ssh://svn.freebsd.org/base/head@260654 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Add missing arch= and revision= support.


git-svn-id: svn+ssh://svn.freebsd.org/base/head@260655 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
In the nested TLB fault handler, for a direct-mapped address, make
sure to clear the lower 12 bits. We're adding the translation
attributes to the physical address and non-zero bits in the first
12 bits would give us something unexpected, including invalid bit
values. Those trigger nested general protection faults.
We do not have to clear the region bits, because they are ignored
anyway, so we can replace an existing dep instruction with the one
we need.

This fixes GP faults for the swapper thread, as it's the only thread
that has a direct-mapped stack. Since the bug is in the nested TLB
fault handler, the frequency of hitting the GP is in the order of
hours/days under load.


git-svn-id: svn+ssh://svn.freebsd.org/base/head@260666 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Update xboxfb driver to actual state.
NOTE: Not tested.

Sponsored by:	The FreeBSD Foundation


git-svn-id: svn+ssh://svn.freebsd.org/base/head@260688 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Remove reference to FreeBSD 6.2-RELEASE from 'Upgrading from
previous releases' paragraph since all supported version of FreeBSD
now support binary upgrades

Remove 'of course,' from foot note reminding to create a backup
before attempting a binary update

Approved by:    hrs (mentor)


git-svn-id: svn+ssh://svn.freebsd.org/base/head@260689 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
- Fix indent.
- Minor clean up after DB5 migration.


git-svn-id: svn+ssh://svn.freebsd.org/base/head@260691 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Provide a simplified way to specify GPIO pins for the Atmel port.


git-svn-id: svn+ssh://svn.freebsd.org/base/head@260695 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f