Show HN: Device emulation outside QEMU using vfio-user and libvfio-user

tmakatos1 pts0 comments

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 testingRepo: https://github.com/nutanix/libvfio-user

user vfio device emulation qemu libvfio

Related Articles