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
Jan Kiszka wrote:
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