On Wed, Mar 18, 2015 at 02:49:28PM +0800, Fam Zheng wrote: > +static coroutine_fn int null_co_common(BlockDriverState *bs) > +{ > + BDRVNullState *s = bs->opaque; > + > + /* Only emulate latency after vcpu is running. */ > + if (s->latency_ns && qemu_clock_get_us(QEMU_CLOCK_VIRTUAL) > 0) { This seems a little hacky. There is runstate_is_running(), which doesn't depend on the CPU clock offset being 0 in qemu_clock_get_us().