Page MenuHomeFreeBSD

vmm: add VM_BIND_MEMSEG for userspace-backed devmem
Needs ReviewPublic

Authored by zishun.yi.dev_gmail.com on Mon, Aug 3, 11:42 AM.
Tags
None
Referenced Files
F168729412: D58595.diff
Sat, Aug 29, 8:41 PM
F168641549: D58595.id.diff
Sat, Aug 29, 9:50 AM
Unknown Object (File)
Thu, Aug 27, 7:55 AM
Unknown Object (File)
Wed, Aug 26, 7:46 PM
Unknown Object (File)
Tue, Aug 25, 3:14 AM
Unknown Object (File)
Sun, Aug 23, 3:54 PM
Unknown Object (File)
Fri, Aug 21, 7:58 PM
Unknown Object (File)
Thu, Aug 20, 11:54 AM

Details

Reviewers
andrew
manu
Group Reviewers
bhyve
Summary

Add VM_BIND_MEMSEG, allowing userspace to bind an existing sealed shared-memory
object to a VMM memory segment. Expose the operation through libvmmapi as
vm_bind_devmem(). The current implementation accepts sealed shm objects only,
but the interface can be extended to other backing-object types.

By decoupling devmem allocation from the VMM, this lets bhyve use userspace
memory-sharing and acceleration mechanisms. For example, bhyve can create a
framebuffer from a memfd, bind it as devmem, and export it as a dmabuf through
udmabuf for zero-copy display.

This is the first step toward using my GSoC udmabuf work to improve bhyve's
local display path. I intend to follow it with a D-Bus backend for fbuf, and
later investigate vhost-user-gpu with D-Bus display, bringing newer virtual
graphics paths to bhyve without GPL code in base.

This revision can hang until the D-Bus backend is implemented, since the API
currently has no users.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 75345
Build 72228: arc lint + arc unit