Revision d549db5a
b/kvm-all.c | ||
---|---|---|
605 | 605 |
} |
606 | 606 |
|
607 | 607 |
kvm_arch_pre_run(env, run); |
608 |
qemu_mutex_unlock_iothread(); |
|
608 | 609 |
ret = kvm_vcpu_ioctl(env, KVM_RUN, 0); |
610 |
qemu_mutex_lock_iothread(); |
|
609 | 611 |
kvm_arch_post_run(env, run); |
610 | 612 |
|
611 | 613 |
if (ret == -EINTR || ret == -EAGAIN) { |
b/qemu-common.h | ||
---|---|---|
146 | 146 |
void *get_mmap_addr(unsigned long size); |
147 | 147 |
|
148 | 148 |
|
149 |
void qemu_mutex_lock_iothread(void); |
|
150 |
void qemu_mutex_unlock_iothread(void); |
|
151 |
|
|
149 | 152 |
/* Error handling. */ |
150 | 153 |
|
151 | 154 |
void QEMU_NORETURN hw_error(const char *fmt, ...) |
b/vl.c | ||
---|---|---|
3560 | 3560 |
} |
3561 | 3561 |
} |
3562 | 3562 |
|
3563 |
#define qemu_mutex_lock_iothread() do { } while (0)
|
|
3564 |
#define qemu_mutex_unlock_iothread() do { } while (0)
|
|
3563 |
void qemu_mutex_lock_iothread(void) {}
|
|
3564 |
void qemu_mutex_unlock_iothread(void) {}
|
|
3565 | 3565 |
|
3566 | 3566 |
void vm_stop(int reason) |
3567 | 3567 |
{ |
... | ... | |
3760 | 3760 |
qemu_mutex_unlock(&qemu_fair_mutex); |
3761 | 3761 |
} |
3762 | 3762 |
|
3763 |
static void qemu_mutex_lock_iothread(void)
|
|
3763 |
void qemu_mutex_lock_iothread(void) |
|
3764 | 3764 |
{ |
3765 | 3765 |
if (kvm_enabled()) { |
3766 | 3766 |
qemu_mutex_lock(&qemu_fair_mutex); |
... | ... | |
3770 | 3770 |
qemu_signal_lock(100); |
3771 | 3771 |
} |
3772 | 3772 |
|
3773 |
static void qemu_mutex_unlock_iothread(void)
|
|
3773 |
void qemu_mutex_unlock_iothread(void) |
|
3774 | 3774 |
{ |
3775 | 3775 |
qemu_mutex_unlock(&qemu_global_mutex); |
3776 | 3776 |
} |
Also available in: Unified diff