On Thu, Dec 15, 2016 at 02:50:41PM +0800, ous...@sina.com wrote: > I recently try to figure out the the whole IO process in qemu, I have traced > most parts of this process, but I'm still confused about how guest OS notify > qemu to handle virtqueue > I traced to virtio_queue_host_notifier_read -> event_notifier_test_and_clear, > and qemu will read e->rfd, so I assumed that some part of code will write to > this descriptor, to notify qemu > Unfortunatelly, I have set some breakpoints but noting catched yet. > Could someone point it out for me which code write to this descriptor? Or > show me the web link about this design?
"The KVM kernel module has a feature known as ioeventfd for taking an eventfd and hooking it up to a particular guest I/O exit. QEMU userspace registers an ioeventfd for the VIRTIO_PCI_QUEUE_NOTIFY hardware register access which kicks the virtqueue." From http://blog.vmsplice.net/2011/09/qemu-internals-vhost-architecture.html (careful the rest of the post is about vhost, not QEMU) http://blog.allenx.org/2015/07/05/kvm-irqfd-and-ioeventfd
signature.asc
Description: PGP signature