nutanix/libvfio-user
libvfio-user
framework for emulating devices in userspace
241stars
nutanix/libvfio-user
libvfio-user
A framework for emulating devices in userspace using vfio-user protocol, enabling device emulation in separate processes. Supports C, Python, and Rust. Used for emulating NVMe PCI controllers, RDMA NICs, AI accelerators.
Visit project- First shared
- Jun 22, 2026
- HN activity
- 30
Show HN@tmakatosJun 22, 2026
Show HN: Device emulation outside QEMU using vfio-user and libvfio-user
VMMs like QEMU run the entire emulation inside a single process. That works fine until you want an implementation that doesn't align with QEMU's runtime environment, such as SPDK to handle multiple VMs' virtual disks and multiple physical disks from a single process. For this, we've built vfio-user, a protocol modelled after the kernel's VFIO framework that lets device emulation run in a separate process. In vfio-user, there's the vfio-user client, which runs in the VMM, and the vfio-user server, which is the separate process where the device emulation runs. We also built libvfio-user, the vfio-user server-side library, which facilitates implementing a PCI device in C or Python (Rust should be possible as well). This makes it easy to quickly prototype devices without modifying QEMU and to reuse the same device implementation across multiple VMMs. Real-world use cases: - emulate an NVMe PCI controller in SPDK - emulate an RDMA NIC for testing - emulate an AI accelerator for testing Repo: https://github.com/nutanix/libvfio-user
Community