In ioemu/vl.c: do_savevm(), before saving the current VM state for live VM migration (qemu_savevm_state()), it calls qemu_aio_flush() in ioemu/block-raw.c. Now qemu_aio_flush() internally calls qemu_aio_poll() where we loop through the linked list of RawAIOCB structures and remove the request (qemu_aio_release()) only if the request is CANCELED or NOT IN PROGRESS.

I am not really sure then why ioemu/hw/ide.c:pci_ide_save() has a comment saying "If a transfer is pending, we do not save it yet". Looking at qemu_aio_poll() doesn't seem to indicate so...

Also, looking at /usr/include/aio.h sees to suggest that the pending requests get stored in the aio_buf of "struct aiocb" structure. Do the responses to these requests go in the same buffer (in which case the aio_buf and aio_nbytes would get overwritten by the response) ??

any help in this regard would be helful.

-Kaushik

Blue Swirl wrote:
On 10/4/07, Kaushik Bhandankar <[EMAIL PROTECTED]> wrote:
1) I guess the IDE disk code is in ioemu/hw/ide.c. But where is the IDE
disk controller code located ??

Same file, see ide_ioport_write().

2) I do not really understand BMDMA in ioemu/hw/ide.c. google doesnt
seem to be helping much here. Any documentation about the QEMU IDE disks
would be greatly appreciated.

No idea.

3) vl.c:5522 seems to be not the correct code (I guess our vl.c codes
are different).. Could you point me to the routine in vl.c where the
pending disk IO requests are flushed before VM save (I guess the VM save
happens in qemu_savevm_state() in vl.c wherein it invokes all the
registered save handlers)?

It's in:
void do_savevm(const char *name)

4) Somebody told me that the pending disk IO requests are stored
somewhere in quemu's I/O disk model but I am not sure exactly
where....Can somebody help me with this ?

Qemu uses asynchronous IO, grepping aio or AIO should find something.




--
"question = ( to ) ? be : ! be;"
               -- Wm. Shakespeare



Reply via email to