On Thu, Oct 24, 2019 at 05:09:26AM -0400, Jagannathan Raman wrote: > @@ -656,6 +657,19 @@ static void init_proxy(PCIDevice *dev, char *command, bool need_spawn, Error **e > } > } > > +static void proxy_vm_state_change(void *opaque, int running, RunState state) > +{ > + PCIProxyDev *dev = opaque; > + MPQemuMsg msg = { 0 }; > + > + msg.cmd = RUNSTATE_SET; > + msg.bytestream = 0; > + msg.size = sizeof(msg.data1); > + msg.data1.runstate.state = state; > + > + mpqemu_msg_send(dev->mpqemu_link, &msg, dev->mpqemu_link->com); > +} Changing vm state is a barrier operation - devices must not dirty memory afterwards. This function doesn't have barrier semantics, it sends off the message without waiting for the remote process to finish processing it. This means there is a race condition where QEMU has changes the vm state but devices could still dirty memory. Please wait for a reply to prevent this. Stefan