question about qemu IO process
Hello, I'm a newbie of Qemu. sorry about my stupid question.
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?
Thanks a lot!
sou
Quoted 4 lines · On Thu, Dec 15, 2016 at 02:50:41PM +0800, [email protected] 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 reade->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)