3 ms·
With VFIO, there is increasingly little need for writing in-kernel device drivers. You can do everything in userspace with better DX and without having to deal
by oasisaimlessly 3y ago
With VFIO, there is increasingly little need for writing in-kernel device drivers. You can do everything in userspace with better DX and without having to deal with kernel API breakage.
If you want to try out VFIO, you could try writing a userspace program that interfaces with some simple PCI device, like a serial card.
- matt3210 3y agoGood point, can you point me in the right direction for more info? Edit: A cursory glance suggests this is for connecting existing devices to virtualized guests, how does that replace kernel modules for hardware components?
- oasisaimlessly 3y agoPaaaing hardware to VMs is the "killer app" for VFIO, but VMs (e.g. QEMU) are just normal userspace processes. In other words, VFIO can delegate control of a device to any userspace process, but it's most commonly used for VMs. DPDK [1] is an example of a non-VM VFIO user. [1] https://doc.dpdk.org/guides/linux_gsg/linux_drivers.html https://doc.dpdk.org/guides/linux_gsg/linux_drivers.html
- synergy20 3y agofor userspace drivers check out UIO. VFIO is still mostly about virtual machines, as a beginner I won't touch it for now. I will stay in the kernel for a while before doing userspace drivers.