Breaking this invariant means that you have a very small window where
{'execute':'cont'} would actually not restart the VM. I think this
should be fixed by dropping the request in vm_start, like this:
[...]
Sounds like an option. Do we need to send a QEVENT_STOP/QEVENT_RESUME
pair? If we don't, the client will still notice a difference to a real
stop and resume.
Also, I think that bdrv_emit_qmp_error_event is placed wrong.
It should be called only after setting the iostatus, otherwise
there is a small window where the iostatus is "no error" but
the event has been generated already.
Yes, I agree.
The documentation for this event actually answers my above question:
Note: If action is "stop", a STOP event will eventually follow the
BLOCK_IO_ERROR event.
Perhaps we should also change the documentation of the "stop" value to
clarify that the VM may not actually be stopped yet. It currently reads
like this:
"stop": error caused VM to be stopped