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
F167446904: D58595.diff
Fri, Aug 21, 7:58 PM
Unknown Object (File)
Thu, Aug 20, 11:54 AM
Unknown Object (File)
Wed, Aug 19, 9:21 PM
Unknown Object (File)
Wed, Aug 19, 1:55 PM
Unknown Object (File)
Sun, Aug 16, 7:12 AM
Unknown Object (File)
Thu, Aug 13, 1:28 PM
Unknown Object (File)
Thu, Aug 13, 4:27 AM
Unknown Object (File)
Wed, Aug 12, 7:53 PM

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