Il 16/03/2012 16:23, Jason Wang ha scritto: >>> >> Or just a global need_announce instead of looking at the runstate. >> >> Paolo >> > Then I think it's better for us introduce a parameter for vm_start() > like what we've done in V4.
But that didn't work because you ended up changing the "cont" semantics. There are two possibilities. 1) Changing those is okay, in which case you only need to check more runstates; 2) Changing those is not okay, in which case you need something like this in qemu_announce_self() void qemu_announce_self() { if (!runstate_is_running()) { need_announce = true; return; } need_announce = false; ... } and then you just check need_announce in vm_start. Nothing to change in all the invocations of vm_start, you just mark that you need to do work later. Paolo