MFStable-10 r259301

  MFC r256657,r257018,r257347,r257423,r257729,r257767,
      r257933,r258609,r258614,r258668,r258673,r258855

  Pull in some minor bugfixes and functionality enhancements
  from CURRENT. These are candidates to be moved to 10.0-release.

  r258855
  mdoc: quote string properly.

  r258673
  Don't create an initial value for the host filesystem of "/".

  r258668
  Allow bhyve and bhyveload to attach to tty devices.

  r258614
  The 22-bit Data Byte Count (DBC) field of a Physical Region Descriptor was
  being read as a 32-bit quantity by the bhyve AHCI driver.

  r258609
  Fix discrepancy between the IOAPIC ID advertised by firmware tables and the
  actual value read by the guest.

  r257933
  Route the legacy timer interrupt (IRQ0) to pin 2 of the IOAPIC.

  r257767
  Fix an off-by-one error when iterating over the emulated PCI BARs.

  r257729
  Add the VM name to the process name with setproctitle().

  r257423
  Make the virtual ioapic available unconditionally in a bhyve virtual machine.

  r257347
  Update copyright to include the author of the LPC bridge emulation code.

  hand-merge r257018
  Tidy usage messages for bhyve and bhyveload.

  r256657
  Add an option to bhyveload(8) that allows setting a loader environment variable
  from the command line.

Approved by:	re@ (gjb)
MF10 259465:
Add new sysctl, kern.supported_archs, containing the list of FreeBSD
MACHINE_ARCH values whose binaries this kernel can run. This patch provides
a feature requested for implementing pkgng ABI identifiers in a robust
way.

The list is designed to indicate whether, say, an i386 package can be run on
the current system. If kern.supported_abis contains "i386", then the answer
is yes. Otherwise, the answer is no.

At the moment, this only supports MACHINE_ARCH and MACHINE_ARCH32. As we
gain support for more interesting combinations, this needs to become more
flexible, possibily through the sysent framework, along with the
hw.machine_arch emulation immediately preceding this code in kern_mib.c.

Reviewed by:	imp
Approved by:	re (glebius)
MFC r259426, r259427:

r259426:
  Add a pkg(8) repository configuration file for cdrom-based package
  installation.

  As part of the 'pkg-stage' target, copy the configuration file
  to the 'packages/repos/' directory on the DVD filesystem.

r259427:
  Export 'REPOS_DIR' when the selected source medium for package
  installation is cdrom.  This enables bsdconfig(8) to make use
  of the on-disc pkg(8) repository configuration, which fixes
  package selection and installation from the dvd installer.

Approved by:	re (delphij, glebius)
Sponsored by:	The FreeBSD Foundation
Set PACKAGESITE to 'release/0' for the pkg-stage target to pull
the release set of packages.

This is a direct commit to releng/10.0/.

Approved by:	re (rodrigc)
Sponsored by:	The FreeBSD Foundation
MFS r259613:

  Fix multi-repository support by properly respecting 'enabled' flag.

  This will read the REPOS_DIR env/config setting (default is /etc/pkg
  and /usr/local/etc/pkg/repos) and use the last enabled repository.

  This can be changed in the environment using a comma-separated list,
  or in /usr/local/etc/pkg.conf with JSON array syntax of:
      REPOS_DIR: ["/etc/pkg", "/usr/local/etc/pkg/repos"]

Approved by:	bapt (mentor)
Approved by:	re (gjb)
Defer start/stop port to workqueues.
MF10: r259608

Approved by:	re
Merge r259622:
cxgbe.4: Belated update to the man page to reflect T5 support.

Approved by:	re (gjb)
Merge r259541 from stable/10:

  Merge r256868,257276-257277,257515,257913 from head. These are fixes
  required to make Xen buildable w/o INET.

Approved by:	re (delphij)
MFStable r259536
  MFC r259302,r259413

  r259302
    bhyve(8) man page

  r259413
    mdoc: sort SEE ALSO

Approved by:	re@ (glebius)
MFS10 SVN r259621:

MFC r259276,259468-259470,259472,259474,259476-259478,259480-259481,259570,
259572, and 259597-259598...

r259276: Fix bug in `services' script in adding dumpdev comment to rc.conf
r259468: Ignore spurious escape generated by VMware's Ctrl-Cmd combination
r259469: Mask errors in `config' script from newaliases(1) about non-FQHN
r259470: Set atime=on for /var/mail zfsboot dataset to support mail server
r259472: Accept NULL input for zfsboot SWAP to indicate SWAP of zero bytes
r259474: Multiple changes, including bug-fixes and debugging improvements
r259476: Change default ZFS disk layout, making it easier to resize
r259477: fletcher4 is now the default (zfsboot related)
r259478: De-uglify the geli(8)-setup infobox (zfsboot related)
r259480: Fix ghosted zroot issue by always performing labelclear on swap
r259481: Auto-enable 4k sector alignmet when geli(8) is enabled (zfsboot)
r259570: Fix numerical comparison error (zfsboot)
r259572: Mask spurious rm error in bsdinstall_log from `auto' script
r259597: Fix zfsboot regression when installing to 3+ disks
r259598: Set cachefile property of bootpool so it imports to new system

Approved by:    re (gjb)
MFC r259734:

MFV r258923: 4188 assertion failed in dmu_tx_hold_free(): dn_datablkshift != 0

illumos/illumos-gate@bb411a08b05466bfe0c7095b6373bbc1587e259a

Approved by:	re (gjb)
Merge from stable/10 r259380:

MFC r259038, r259039:

 Bump the maximum VM space from 3 * memory size to a fixed
 256MB. That's all we have room for since we map the hardware registers
 starting at 0xd0000000. This allows my 64MB AT91SAM9G20 to boot again
 after the unmmaped I/O changes were MFC'd at r251897. Other
 subplatforms may need similar treatment.

 Although not strictly required to boot a 64MB board, bump
 vm_max_virtual_address to be KERNVIRTADDR + 256MB. This allows some
 future shock protection since the KVA requirements have gone up since
 the unmapped changes have gone in, as well as preventing us from
 overlapping with the hardware devices, which we map at 0xd0000000,
 which we'd hit with anything more than 85MB...

Approved by:	re@ (gjb@)
Merge from stable/10 r259381:

MFC r259212, r259220:

 Fix one race and one fence post error. When the TX buffer was
 completely full, we'd not complete any of the mbufs due to the fence
 post error (this creates a large leak). When this is fixed, we still
 leak, but at a much smaller rate due to a race between ateintr and
 atestart_locked as well as an asymmetry where atestart_locked is
 called from elsewhere.  Ensure that we free in-flight packets that
 have completed there as well. Also remove needless check for NULL on
 mb, checked earlier in the loop and simplify a redundant if.

Approved by:	re@ (gjb@)
Direct commit: not relevant to other branches.

Fix mountroot> prompt eating most of the characters by not enabling
RXRDY interrupts in the attach routine. Instead, defer this until the
first interrupt we see after the device is opened. Given the console
use case, we're guaranteed to get a TXRDY interrupt before any reads
are posted due to boot messages, which makes this work.

The real fix is to use cngrab/cnungrab function pointers to disable
RXRDY interrupts while grabbed. However, that touches the MI uart
code, so was disallowed for 10.0 due to the lateness of the hour this
fix was proposed. It works for mountroot, the most common atmel kernel
prompt use cases, but wouldn't work for GELI since it prompts later in
the boot process.

Approved by:	re@ (gjb@)