MFC r258841:

Fix typos.

Approved by:	re (gjb)
Sponsored by:	The FreeBSD Foundation
MFC r258842:

Grammar fix.

Approved by:	re (gjb)
Sponsored by:	The FreeBSD Foundation
MFC r257769 to stable/10

Fix powerd/states on AMD cpus.  Resolves issues with system reporting:
hwpstate0: set freq failed, err 6

Tested on FX-8150 and others.

PR:		kern/167018
Submitted by:	avg@
Approved by:	re (gjb)
MFC 257876:

On XenServer the "halt" message is used instead of "poweroff", which
makes FreeBSD halt but not poweroff (as expected when issuing a
shutdown from the VM manager). Fix this by using the same handler
for both "halt" and "poweroff".

NB: The "halt" signal seems to be used on XenServer only.  The OSS
    Xen toolstack (xl) uses "poweroff" instead.

Submitted by:	Roger Pau Monné
Sponsored by:	Citrix Systems R&D
Reviewed by:	gibbs
Approved by:	gibbs (mentor)
Approved by:	re (gjb)
MFC 258176:

Fix accounting for hw.realmem on the i386 and amd64 platforms.

sys/i386/i386/machdep.c:
sys/amd64/amd64/machdep.c:
	The value reported by FreeBSD as "real memory" when booting
	doesn't match what is later reported by sysctl as hw.realmem.
	This is due to the fact that the value printed during the
	boot process is fetched from smbios data (when possible),
	and accounts for holes in physical memory. On the other
	hand, the value of hw.realmem is unconditionally set to be
	one larger than the highest page of the physical address
	space.

	Fix this by setting hw.realmem to the same value printed
	during boot, this makes hw.realmem honour it's name and
	account properly for physical memory present in the system.

Submitted by:	Roger Pau Monné
Reviewed by:	gibbs
Approved by:	gibbs (mentor)
Approved by:	re (gjb)
MFC 258178:

Improve robustness of the Xen balloon driver.

sys/dev/xen/balloon/balloon.c:
	Remove unused and commented out code.

	Fix deadlock caused by performing a sleepable malloc
	while holding the balloon mutex.

	Perform proper accounting of the memory used by the domain.

Submitted by:	Roger Pau Monné
Sponsored by:	Citrix Systems R&D
Reviewed by:	gibbs
Approved by:	gibbs (mentor)
Approved by:	re (gjb)
MFC r258894: Make rc(8) re-source rc.conf upon receipt of SIGALRM.

The rc system aggressively caches the contents of /etc/rc.conf in order to
improve boot performance; this produces arguably astonishing (non-)results
if /etc/rc.conf is modified during the boot process.  This commit provides
a mechanism for explicitly requesting that rc.conf be reloaded.

Approved by:	re (rodrigc)
MFC r258941:

Apply vendor improvements to oce(4) driver:

 - Add support to 40Gbps devices;
 - Add support to control adaptive interrupt coalescing (AIC)
   via sysctl;
 - Improve support of BE3 devices;

Many thanks to Emulex for their continued support of FreeBSD.

Submitted by:	Venkata Duvvuru <VenkatKumar.Duvvuru Emulex Com>
Approved by:	re (rodrigc)
MFC r258948:

Support Hyper-V on i386:

 - Add 'hyperv' module into build;
 - Allow building Hyper-V support as part of the kernel;
 - Hook Hyper-V build into NOTES.

Approved by:	re (rodrigc)
MFC r258927: Fix a regression introduced by SVN r257842 that prevents
Encryption from being enabled.

Approved by:	re (gjb)
Set stable/10 to -PRERELEASE, now that releng/10.0 has been branched.

Approved by:	re (implicit)
Sponsored by:	The FreeBSD Foundation
Bump __FreeBSD_version to 1000700, to set it higher than what is in
releng/10.0 now.

Approved by:	re (implicit)
Sponsored by:	The FreeBSD Foundation
Hoist all the mergeinfo up to the root in preparation for enforcing merges
to the root only.  All MFC's were rerecorded to the root.

Going forward, if an MFC includes mergeinfo, it will need to be made to
the root and committed from the root.  Merges with --ignore-ancestry
or diff | patch can go anywhere.

The mergeinfo in HEAD is in a bad state from years of neglect and manual
tampering and this was branched into 10.x.  This confuses the coalescing
code and prevents it from doing its job.

Approved by:	re (gjb, implicit)
MFC r258924:

  Add missing period for WITHOUT_PKGBOOTSTRAP so that it matches all
  other entries.

Approved by:	bapt (implicit)
Regenerate after r259138

Approved by:	bapt (implicit)
MFC r259094 - Fix undocumented side effect of r256256 that changes/breaks
existing jails.  This burned us in the freebsd cluster yesterday.
MFC r257654, r257772, r258441, r258689, r258698, r258879, r259048, and
r259103.

r257654:
cxgbe(4): Exclude MPS_RPLC_MAP_CTL (0x11114) from the register dump.  Turns
out it's a write-only register with strange side effects on read.

r257772:
cxgbe(4): Tidy up the display for payload memory statistics (pm_stats).

r258441:
cxgbe(4): update the internal list of device features.

r258689:
Disable an assertion that relies on some code[1] that isn't in HEAD yet.

r258698:
cxgbetool: "modinfo" command to display SFP+ module information.

r258879:
cxgbe(4):  T4_SET_SCHED_CLASS and T4_SET_SCHED_QUEUE ioctls to program
scheduling classes in the chip and to bind tx queue(s) to a scheduling
class respectively.  These can be used for various kinds of tx traffic
throttling (to force selected tx queues to drain at a fixed Kbps rate,
or a % of the port's total bandwidth, or at a fixed pps rate, etc.).

r259048:
Two new cxgbetool subcommands to set up scheduler classes and to bind
them to NIC queues.

r259103:
cxgbe(4): save a copy of the RSS map for each port for the driver's use.
MFC r259079:
  Add WITH_DVD to RELEASE_RMAKEFLAGS, otherwise it is not actually
  passed to 'make release'.

Sponsored by:	The FreeBSD Foundation
MFC r259053:

Pull in r196590 from upstream clang trunk (by rdivacky):

  Move the body of GCCInstallationDetector ctor into an init() function
  and call it from its only user. The linux toolchain. This saves quite
  a lot of directory searching on other platforms.

See http://docs.freebsd.org/cgi/mid.cgi?51E6FAF5.3080802 for the
original discussion.  With this fix, the search for gcc installations is
completely eliminated on FreeBSD.

Reported by:	Kurt Lidl <lidl@pix.net>
MFC r259083:

For WARNS <= 3, change the clang warning flag -Wno-conversion to
-Wno-enum-conversion.  In earlier clang versions (before 3.2), the
latter did not exist, and suppressing enum conversion warnings was
really the goal of this warning suppression flag.

This should enable the same kind of warning again as was fixed by
r259072 ("incompatible integer to pointer conversion passing 'Elf_Addr'
(aka 'unsigned int') to parameter of type 'void *'"), and which was only
emitted by gcc.

Noticed by:	kib