Il 26/07/2013 11:08, Alex Bligh ha scritto: > > > --On 26 July 2013 10:43:45 +0200 Stefan Hajnoczi <stefa...@gmail.com> > wrote: > >> block.c and block/qed.c use vm_clock because block drivers should not do >> guest I/O while the vm is stopped. This is especially true during live >> migration where it's important to hand off the image file from the >> source host to the destination host with good cache consistency. The >> source host is not allowed to modify the image file anymore once the >> destination host has resumed the guest. >> >> Block jobs use rt_clock because they aren't considered guest I/O. > > That's going to be 'interesting' if qemu-img uses a block driver that > uses a timer, as I don't think the vm timer is running when qemu-img > is running.
Yes, it is, see stubs/cpu-get-clock.c: #include "qemu-common.h" #include "qemu/timer.h" int64_t cpu_get_clock(void) { return get_clock_realtime(); } vm_clock becomes a synonym of rt_clock basically. Paolo