libvfio-user
by
nutanix

Description: framework for emulating devices in userspace

View on GitHub ↗

Summary Information

Updated 15 minutes ago
Added to GitGenius on May 24th, 2024
Created on September 30th, 2019
Open Issues & Pull Requests: 82 (+0)
Number of forks: 63
Total Stargazers: 229 (+0)
Total Subscribers: 16 (+0)

Issue Activity (beta)

Open issues: 54
New in 7 days: 0
Closed in 7 days: 0
Avg open age: 1,427 days
Stale 30+ days: 53
Stale 90+ days: 53

Recent activity

Opened in 7 days: 0
Closed in 7 days: 0
Comments in 7 days: 0
Events in 7 days: 0

Top labels

  • bug (41)
  • enhancement (34)
  • api-change (7)
  • nutanix-tp (7)
  • documentation (5)
  • good first issue (3)
  • help wanted (1)

Most active issues this week

No issue events were indexed in the last 7 days.

Repository Insights (GitGenius)

Median issue/PR response: 3.4 hours
Mean response time: 281.3 days
90th percentile: 1178.5 days
Tracked items: 32

Most active contributors

Detailed Description

libvfio-user is a C-language framework developed by Nutanix that enables the implementation of PCI devices entirely in userspace. The library provides an API for building servers that communicate with clients such as QEMU over a UNIX socket using the vfio-user protocol. Rather than requiring kernel involvement through the traditional VFIO mechanism, libvfio-user allows device emulation to occur entirely in userspace, eliminating the need for kernel components while maintaining compatibility with the VFIO ioctl interface model.

The core purpose of libvfio-user is to abstract the complexity of device representation by allowing applications to define device characteristics through region and interrupt information, then register callbacks that the library invokes when those regions are accessed. This design enables diverse use cases including prototyping novel devices, testing frameworks, implementing alternatives to QEMU's device emulation, and adapting device classes for network operation. The library handles the protocol-level details, allowing developers to focus on device-specific logic.

The framework supports memory mapping of device regions, enabling virtual machines to directly access parts of virtual devices such as PCI BARs. Applications implement an mmap callback that provides memory addresses whose backing pages satisfy the original mmap request. Interrupt handling is implemented through eventfds passed from the client and registered with the library, allowing consumers to trigger interrupts by writing to the eventfd.

Building libvfio-user requires meson version 0.53.0 or above, along with libjson-c-dev and libcmocka-dev libraries. The kernel headers are necessary because VFIO structures and definitions are reused from the kernel. The project includes documentation for integration with QEMU and libvirt, and SPDK uses libvfio-user to implement a virtual NVMe controller.

According to GitGenius activity tracking, the repository shows a median issue and pull request response latency of 3.4 hours across 32 tracked items, indicating active maintenance. The most frequently addressed issue category is bugs, with 9 tracked instances. Primary contributors include jlevon with 54 tracked events and tmakatos with 19 events. The repository shares contributors with kata-containers, meson, and redis projects, suggesting cross-project collaboration within the virtualization and systems software ecosystem.

The project originated as "muser," a proof-of-concept implementation of VFIO mediated devices in userspace that required a small kernel module for forwarding. The current libvfio-user implementation eliminates this kernel dependency entirely. Development is coordinated through the libvfio-user-devel mailing list and community channels including Slack and IRC, with contributions requiring Developer Certificate of Origin sign-off. The project employs continuous integration checks through GitHub CI and Coverity scanning post-merge.

libvfio-user
by
nutanixnutanix/libvfio-user

Repository Details

Fetching additional details & charts...