kvm-69rc1
As suggested by Anthony, this patch encapsulates the sequence "save cpu_single_env, temporarily drop qemu_mutex, restore cpu_single_env" for condition variables in a helper function. It also adds a safety check to the open-coded kvm_mutex_lock that the caller is not a vcpu thread (as kvm_mutex_unlock clears cpu_single_env). Signed-off-by: Jan Kiszka <jan.kiszka@web.de> Signed-off-by: Avi Kivity <avi@qumranet.com>