Hello everyone, I have a user-land introspection application that communicates with KVM through QMP & ioctls (Qemu version 2.4.50). My application is essentially event-driven and the general logic of my project is as following: introspection-related vm_event ---> kvm_handle_exit -> qemu_handle_exit -> stop_vm -> qmp_event -> introspection_app -> handle_event -> resume_vm The goal of stop_vm & resume_vm is to synchronize (make consistent) event handling at the level of the introspection app with VM execution. The issue I'm facing is that stop_vm & resume_vm have a huge impact on introspection app & VM performance (due to very frequent introspection related events) that varies according to their implementation: 0- without stop_vm & resume_vm: excellent performance in both introspection app & VM. 1- implementation using qmp_stop & qmp_cont: the performance overhead is huge in both introspection app & VM. in this case I tested calling qmp_cont just after qmp_stop, the VM blocks infinitely ! 2- implementation using pause_all_vcpus & resume_all_vcpus: better but still insufficient performance for the introspection app. Also resume_all_vcpus must be called multiple time from the introspection app otherwise the VM won't resume its execution ! For now I'm using this implementation. 3- implementation using inter process semaphore (sem_wait & sem_post) between introspection app & qemu: excellent performance in the introspection app, but the whole qemu process is blocked and hence no qmp command can be launched without doing sem_post. Hence I can do almost nothing during handling a qmp event. Is there a better synchronisation logic (in terms of execution performance) I can use for my project ? Thanks in advance for any feedback. Yacine