CVSROOT: /cvs Module name: src Changes by: d...@cvs.openbsd.org 2022/12/23 12:25:22
Modified files: usr.sbin/vmd : vioscsi.c virtio.c virtio.h vm.c vmd.h Log message: vmd(8): implement zero-copy operations on virtqueues. The original virtio device implementation relied on allocating a buffer on heap, copying the virtqueue from the guest, mutating the copy, and then overwriting the virtqueue in the guest. While the approach worked, it was both complex and added extra overhead. On older hardware, switching to the zero-copy approach can show a noticeable performance improvement for vionet devices. An added benefit is this diff also reduces the amount of code in vmd, which is always a welcome change. In addition, change to talking about the queue pfn and not "address" as the virtio-pci spec has drivers provide a 32-bit value representing the physical page number of the location in guest memory, not the linear address. Original idea from dlg@ while working on re-adding async task queues. ok dlg@, tested by many