The v4 version includes: * Simpler start/stop ioeventfd mechanism using bool ioeventfd_started state * Support for migration * Handle deassign race condition to avoid dropping a virtqueue kick * Add missing kvm_enabled() check to kvm_has_many_ioeventfds() * Documentation updates for qdev -device with ioeventfd=on|off
Virtqueue notify is currently handled synchronously in userspace virtio. This prevents the vcpu from executing guest code while hardware emulation code handles the notify. On systems that support KVM, the ioeventfd mechanism can be used to make virtqueue notify a lightweight exit by deferring hardware emulation to the iothread and allowing the VM to continue execution. This model is similar to how vhost receives virtqueue notifies. The result of this change is improved performance for userspace virtio devices. Virtio-blk throughput increases especially for multithreaded scenarios and virtio-net transmit throughput increases substantially. Now that this code is in virtio-pci.c it is possible to explicitly enable devices for which virtio-ioeventfd should be used. Only virtio-blk and virtio-net are enabled at this time.