Import HyperV Key-Value Pair (KVP) driver and daemon code by Microsoft,
many thanks for their continued support of FreeBSD.

While I'm there, also implement a new build knob, WITHOUT_HYPERV to
disable building and installing of the HyperV utilities when necessary.

The HyperV utilities are only built for i386 and amd64 targets.

This is a stable/10 candidate for inclusion with 10.1-RELEASE.

Submitted by:	Wei Hu <weh microsoft com>
MFC after:	1 week
Regen.
Add a sysctl to export the EFI memory map along with a handler in the
sysctl(8) binary to format it.

Reviewed by:	emaste
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D771
Propagate the error status of /usr/sbin/bhyve out of the vmrun.sh script.
Clean up the /dev/vmm entry for this VM when vmrun.sh exits.

Reviewed by: neel
Phabric:     D767
Implement range checks between UNMAP and READ/WRITE commands.

Before this change UNMAP completely blocked other I/Os while running.
Now it blocks only colliding ones, slowing down others only due to ZFS
locks collisions.

Sponsored by:	iXsystems, Inc.
Improve transmit sending offload, TSO, algorithm in general.

The current TSO limitation feature only takes the total number of
bytes in an mbuf chain into account and does not limit by the number
of mbufs in a chain. Some kinds of hardware is limited by two
factors. One is the fragment length and the second is the fragment
count. Both of these limits need to be taken into account when doing
TSO. Else some kinds of hardware might have to drop completely valid
mbuf chains because they cannot loaded into the given hardware's DMA
engine. The new way of doing TSO limitation has been made backwards
compatible as input from other FreeBSD developers and will use
defaults for values not set.

MFC after:	1 week
Sponsored by:	Mellanox Technologies
Add "readcache" and "writecache" LUN options to control default behavior.

Default values are "on".  Disabling requires backend to support IO_DIRECT
and IO_SYNC flags respectively, or some alternatives.
vt(4): Enclose vt_mouse_paste() prototype inside #ifndef SC_NO_CUTPASTE/#endif

This fixes the build with sparc64 LINT for instance.

Reported by:	bz@
MFC after:	3 days
Implement control over command reordering via options and control mode page.

It allows to bypass range checks between UNMAP and READ/WRITE commands,
which may introduce additional delays while waiting for UNMAP parameters.
READ and WRITE commands are always processed in safe order since their
range checks are almost free.
Fix error handling in cpuset_setithread() introduced in r267716.

Noted by:	kib
MFC after:	1 week
Do not try to read i2c info when no transceiver is present.

MFC with:	r270064
Sponsored by:	Yandex LLC
MFV r271510:

Enforce 4K as smallest indirect block size (previously the smallest
indirect block size was 1K but that was never used).

This makes some space estimates more accurate and uses less memory
for some data structures.

Illumos issue:
    5141 zfs minimum indirect block size is 4K

MFC after:	2 weeks
MFV r271511:

Use fnvlist_* to make code more readable.

Illumos issue:
    5135 zpool_find_import_cached() can use fnvlist_*

MFC after:	2 weeks
MFV r271512:

Illumos issue:
    5136 fix write throttle comment in dsl_pool.c

MFC after:	2 weeks
MFV r271515:

Add a new tunable/sysctl, vfs.zfs.free_max_blocks, which can be used to
limit how many blocks can be free'ed before a new transaction group is
created.  The default is no limit (infinite), but we should probably have
a lower default, e.g. 100,000.

With this limit, we can guard against the case where ZFS could run out of
memory when destroying large numbers of blocks in a single transaction
group, as the entire DDT needs to be brought into memory.

Illumos issue:
    5138 add tunable for maximum number of blocks freed in one txg

MFC after:	2 weeks
MFV r271516:

Enable debug printf's when ZFS_DEBUG or debug= is set.

Illumos issue:

    5134 if ZFS_DEBUG or debug= is set, libzpool should enable debug prints

MFC after:	2 weeks
MFV r271517:

In zil_claim, don't issue warning if we get EBUSY (inconsistent) when
opening an objset, instead, ignore it silently.

Illumos issue:

    5140 message about "%recv could not be opened" is printed when booting after crash

MFC after:	1 week
Make inclusion of fdt clock support conditional on fdt_clock, not just fdt.
There are plenty of platforms that use fdt without needing the overhead of
the new clock support routines.
MFV r271518:

Correctly report hole at end of file.

When asked to find a hole, the DMU sees that there are no holes in the
object, and returns ESRCH.  The ZPL interprets this as "no holes before
the end of the file", and therefore inserts the "virtual hole" at the
end of the file.  Because DMU and ZPL have different ideas of where the
end of an object/file is, we will end up returning the end of file,
which is generally larger, instead of returning the end of object.

The fix is to handle the "virtual hole" in the DMU. If no hole is found,
the DMU will return a hole at the end of the file, rather than an error.

Illumos issue:
    5139 SEEK_HOLE failed to report a hole at end of file

MFC after:	1 week
Switch if_vlan(4) to use counter(9) using new
  if_get_counter api.