qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [newbie] main_loop_wait & os_host_main_loop_wait understand


From: telecolega .
Subject: [Qemu-devel] [newbie] main_loop_wait & os_host_main_loop_wait understanding
Date: Tue, 10 Mar 2015 12:48:08 +0100

Hi,

I am trying to understand the code of QEMU and one of the things which
is unclear to me is what are the purposes of the loops:
main_loop_wait() and os_host_main_loop_wait(). They both look similar
since they prepare fds, poll them and dispatch them but I assume they
process different fds (otherwise, why there would be two different
loops?).

>From the name, I tend to think that main_loop_wait() polls fds which
represent emulated devices consumed by the guest OS, whereas
os_host_main_loop() polls fds from the host OS which are consumed by
QEMU. Assuming my interpretation is correct, if the guestOS writes a
block on /dev/vda, the write call will be processed by
main_loop_wait() (it will send the block to the specific disk device
in the host) and the ack from the disk will be first processed by
os_host_main_loop_wait() (it will send the ack to the Guest OS).

Is my interpretation correct?

Thanks in advance!



reply via email to

[Prev in Thread] Current Thread [Next in Thread]