HomeFreeBSD

libvmmapi: Fix auto-loading of vmm.ko

Description

libvmmapi: Fix auto-loading of vmm.ko

  • We should autoload vmm.ko when creating a VM with vm_openf(), to preserve behaviour prior to commit 99127fd10362.
  • kldload(2) returns a non-zero value upon success, so the existing code was wrong.

Reviewed by: jhb
Reported by: olivier
Fixes: 99127fd10362 ("libvmmapi: Use the vmmctl device file to create and destroy VMs")
Differential Revision: https://reviews.freebsd.org/D48797