diff options
author | Alex Bennée <alex.bennee@linaro.org> | 2017-03-22 16:11:13 +0000 |
---|---|---|
committer | Alex Bennée <alex.bennee@linaro.org> | 2017-03-28 10:52:24 +0100 |
commit | 85390939190e4b7eeba57765e344947c328cd166 (patch) | |
tree | ff95e20e02aefd04fb884ca32925caed89a05ff1 /cpu-exec-common.c | |
parent | 95992b674c43339d0b313dd79fa8cc45ba22eab8 (diff) | |
download | qemu-85390939190e4b7eeba57765e344947c328cd166.zip qemu-85390939190e4b7eeba57765e344947c328cd166.tar.gz qemu-85390939190e4b7eeba57765e344947c328cd166.tar.bz2 |
ui/console: ensure do_safe_dpy_refresh holds BQL
I missed the fact that when an exclusive work item runs it drops the
BQL to ensure all no vCPUs are stuck waiting for it, hence causing a
deadlock. However the actual helper needs to take the BQL especially
as we'll be messing with device emulation bits during the update which
all assume BQL is held.
We make a minor cpu_reloading_memory_map which must try and unlock the
RCU if we are actually outside the running context.
Reported-by: Laurent Desnogues <laurent.desnogues@gmail.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'cpu-exec-common.c')
-rw-r--r-- | cpu-exec-common.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cpu-exec-common.c b/cpu-exec-common.c index 0504a94..e81da27 100644 --- a/cpu-exec-common.c +++ b/cpu-exec-common.c @@ -35,7 +35,7 @@ void cpu_loop_exit_noexc(CPUState *cpu) #if defined(CONFIG_SOFTMMU) void cpu_reloading_memory_map(void) { - if (qemu_in_vcpu_thread()) { + if (qemu_in_vcpu_thread() && current_cpu->running) { /* The guest can in theory prolong the RCU critical section as long * as it feels like. The major problem with this is that because it * can do multiple reconfigurations of the memory map within the |