Since pipes and sockets can be used by the ioregionfd wire protocol I decided to write a few words about how these IPC mechanisms are implemented in linux kernel. I haven’t had an opportunity to dig into pipe internals so I was wondering how pipe buffering works.
Currently there are two mechanisms for handling guest MMIO/PIO accesses in KVM: returning KVM_EXIT_MMIO/KVM_EXIT_IO from ioctl(KVM_RUN) and ioeventfd. In the first case KVM exits back to qemu and then forward the access to emulated device. The traditional dispatch mechanism looks like this: