Hypervisor for DragonFly/x86_64 - Code Bounty

Kamil Rytarowski kamil at moritz.systems
Mon Aug 17 03:59:34 PDT 2020

Hello everybody!

The Moritz Systems team have reserved the Code Bounty "Hypervisor for
DragonFly/x86_64" as specified on

We plan to port NetBSD Virtual Machine Monitor (abbr: NVMM) from
NetBSD (current) to DragonFly (current).

NVMM is a hypervisor platform that provides hardware-accelerated
virtualization support. It is made of an ~MI frontend, to which MD
backends can be plugged. A virtualization API is shipped via libnvmm,
that allows to easily create and manage virtual machines via NVMM.

The Qemu package in pkgsrc has been modified to leverage this
virtualization API and provide fast emulation based on NVMM.

More information on NVMM:


There is an ongoing process of upstreaming NVMM to Qemu. Once the
process is done, the NVMM backend in Qemu should work on DragonFly out
of the box and be readily available in DPorts. Currently the support
will rely on pkgsrc and the homegrown local packages.

Deliverables of this project:

 - port of NVMM v1 (API compatible with NetBSD 9.0) with enhancements
from NetBSD-current
 - the kernel code - the kernel driver
  * MI part
  * MD part for Intel x86_64
  * MD part for AMD 64bit
 - libnvmm - the end-user API wrapping kernel ioctls and delivering
generic features
 - nvmmctl - program to control virtual machines
 - the man pages: libnvmm(3), nvmm(4), nvmmctl(8)

The project will be published in
https://github.com/Moritz-Systems/DragonFlyBSD as a branch and pull
requested to https://github.com/DragonFlyBSD/DragonFlyBSD The
DragonFly developers will test the patch and integrate it according to
the rules of code bounties.

Definition of a successful project:

 - Port NVMM v1 (NVMM_KERN_VERSION=1 and NVMM_USER_VERSION=1) to DragonFly
 - Port of the kernel NVMM device, libnvmm, nvmmctl and man pages to
the DragonFly BSD repository and integrate with the build system.
 - Add support for at least Intel or AMD CPU. The goal is to support
both CPU vendors, but if one of them will be finished and the other
one in an advanced phase of porting, the bounty should be considered
as successful. This relaxes the original bounty requirement of
supporting both AMD and Intel CPUs.
 - Build qemu with local patches integrated in pkgsrc, using the
pkgsrc framework on DragonFly. Backporting patches to DPorts is
deferred to the community.
 - Run hardware accelerated guest Operating Systems: Linux 64bit (with
disabled APIC checks in a bootloader -- it's not a bug in NVMM, but
Linux specific behavior disabled for KVM) and Windows 10 64bit.

 - Backporting patches to DPorts is deferred to the community.
 - Testing and eventual fixing support for the remaining guest OSs is
deferred to the community, but everything should work as well as on
 - This bounty does not involve additional work on PCI/USB
passthrough, Spice Space or other features.

We plan to start the project shortly after agreeing on the conditions
(by the bounty donors).

Our internal deadline for finishing the project is September 1st 2020.

The main developer in this bounty is Jaromir Dolecek.

Kamil Rytarowski
CTO, Moritz Systems

More information about the Kernel mailing list