Feature #13379


bhyve upstream sync 2020 Dec

Added by Andy Fiddaman over 2 years ago. Updated over 2 years ago.

Start date:
Due date:
% Done:


Estimated time:
Gerrit CR:
External Bug:


Sync upstream activity in FreeBSD's bhyve into illumos.

Continuing to ignore save/restore, also skipping Add virtio-9p (aka VirtFS) filesystem sharing to bhyve which will be looked at separately.

Related issues

Related to illumos gate - Feature #13373: Import upstream improvements to bhyve VNC serverClosedAndy Fiddaman

Actions #1

Updated by Andy Fiddaman over 2 years ago

  • Follows Feature #13373: Import upstream improvements to bhyve VNC server added
Actions #2

Updated by Electric Monk over 2 years ago

  • Gerrit CR set to 1109
Actions #3

Updated by Andy Fiddaman over 2 years ago

FreeBSD commits included:

  • bhyve: allow for automatic destruction on power-off
  • Prevent calling USB backends multiple times.
  • bhyve: convert NVMe logging statements
  • bhyve: refactor NVMe IO command handling
  • bhyve: implement NVMe Flush command
  • bhyve: add a comment explaining NVME dsm option
  • bhyve: add locks around NVMe queue accesses
  • bhyve: Consolidate NVMe CQ update
  • bhyve: implement NVMe Namespace Identification Descriptor
  • bhyve: fix NVMe Get Log Page command
  • bhyve: fix NVMe queue creation and deletion
  • bhyve: add more compliant NVMe Get/Set Features
  • bhyve: make unsupported NVMe commands a debug message
  • bhyve: implement NVMe Format NVM command
  • bhyve: refactor NVMe I/O read/write
  • bhyve: base pci_nvme_ioreq size on advertised MDTS
  • bhyve: validate NVMe deallocate range values
  • bhyve: implement NVMe SMART data I/O statistics
  • bhyve: validate the NVMe LBA start and count
  • bhyve: Add AER support to NVMe emulation
  • bhyve: add basic NVMe Firmware Commit support
  • bhyve: add NVMe Feature Interrupt Vector Config
  • bhyve: fix NVMe Get Features, Predictable Latency
  • bhyve: NVMe handle zero length DSM ranges
  • bhyve: fix NVMe Active Namespace list
  • Silence ACPI RTC error/warning in Linux guests.
  • Advertise 64-bit physical-address capability.
  • Support the setting of additional AHCI controller parameters.
  • Replace magic numbers in Identify page register 0 with ATA definitions.
  • bhyve: NVMe set nominal health values
  • bhyve: NVMe queue create must init head/tail
  • amd64: clean up empty lines in .c and .h files
  • Fix byte-reversal of language ID in string descriptor.
  • bhyve: Update TX descriptor base address and host mapping on change
  • bhyve currently reports each of "smbios.system.maker" and
  • VirtIO: Make sure the guest knows the TRIM alignment requirements
  • Return the same value for smbios.chassis.maker as smbios.system.maker (and prevents returning a space character).
  • bhyve: update smbiostbl.c to bump the version and release date
  • bhyve: fix smbiostbl.c style issues and add comment about date format
  • bhyve: increase allowed size for 64bit BAR allocation below 4G from 32 to 128 MB.
  • bhyve: remove a hack to map all 8G BARs 1:1
  • Fix regression in AHCI controller settings.
  • Add legacy debug/test interfaces for kvm unit tests.
  • Fix bhyve SMBIOS type 19 handling to avoid misreporting total RAM amount
  • Honor the disabled setting for MSI-X interrupts for passthrough devices.
  • Remove manual instruction encodings for VMLOAD, VMRUN, and VMSAVE.
  • [bhyve] virtio-net: Do not allow receiving packets until features have been negotiated.
  • Pull the check for VM ownership into ppt_find().

Skipped because illumos already has them

  • Allow guest device MMIO access from bootmem memory segments.
  • bhyve: intercept AMD SVM instructions.
  • bhyve: do not permit write access to VMCB / VMCS
  • Clear the upper 32-bits of registers in x86_emulate_cpuid().
  • Fix issues with various VNC clients. (or will have this after #13373)

Skipped due to not applicable, already on the illumos vmm roadmap or other kernel divergence:

  • bhyve(8): For prototyping, reattempt decode in userspace
  • Advance RIP after userspace instruction decode
  • amd64 pmap: LA57 AKA 5-level paging
  • Add bhyve support for LA57 guest mode.
  • Use vmcb_read/write for the vmcb snapshot functions.
  • bhyve: Fix build with option BHYVE_SNAPSHOT
  • Remove svn:executable from a couple of vmm(4) source files.
  • bhyve: avoid allocating BARs above the end of supported physical addresses.
  • bhyve: 'xhci,tablet' snapshot fixes
  • bhyve: Add snapshot support for virtio-rnd.
  • Suspend I/O on ahci-cd devices during a snapshot.
  • Add deprecation notice for bvmconsole and bvmdebug
  • Convert vmm_ops calls to IFUNC
  • bhyve: limit max GPA to VM_MAXUSER_ADDRESS_LA48.
  • vmx: Implement pmap (de)activation in C
  • vmm: Make pmap_invalidate_ept() wait synchronously for guest exits
  • Export a routine to provide the TSC_AUX MSR value and use this in vmm.
  • Support guest rdtscp and rdpid instructions on Intel VT-x
Actions #4

Updated by Bryan Stenson over 2 years ago

I'm hoping these changes will incorporate the fix for OpenBSD hosts' PCI passthru, fixed in FreeBSD here:

Actions #5

Updated by Andy Fiddaman over 2 years ago

This change has been tested on top of OmniOS booting a variety of systems including Windows 10, FreeBSD, Debian Linux and OmniOS, also testing OmniOS on top of a virtual NVMe drive.

Jorge Schrauwen tested the bhyve updates on top of SmartOS, again booting a variety of systems including ones where a network card was successfully passed through to the guest.

Actions #6

Updated by Electric Monk over 2 years ago

git commit 6960cd891105f9a002a0327e31a6182f9c6de88e

commit  6960cd891105f9a002a0327e31a6182f9c6de88e
Author: Andy Fiddaman <>
Date:   2021-02-02T23:16:11.000Z

    13379 bhyve upstream sync 2020 Dec
    Reviewed by: Patrick Mooney <>
    Reviewed by: Jorge Schrauwen <>
    Approved by: Robert Mustacchi <>

Actions #7

Updated by Andy Fiddaman over 2 years ago

  • Follows deleted (Feature #13373: Import upstream improvements to bhyve VNC server)
Actions #8

Updated by Andy Fiddaman over 2 years ago

  • Related to Feature #13373: Import upstream improvements to bhyve VNC server added
Actions #9

Updated by Andy Fiddaman over 2 years ago

  • Status changed from In Progress to Closed

Also available in: Atom PDF