[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 03/11] target/i386/misc_helper: wrap BQL around anoth
From: |
Alex Bennée |
Subject: |
[Qemu-devel] [PULL 03/11] target/i386/misc_helper: wrap BQL around another IRQ generator |
Date: |
Mon, 10 Apr 2017 13:55:16 +0100 |
Anything that calls into HW emulation must be protected by the BQL.
Signed-off-by: Alex Bennée <address@hidden>
Reviewed-by: Richard Henderson <address@hidden>
Acked-by: Eduardo Habkost <address@hidden>
diff --git a/target/i386/misc_helper.c b/target/i386/misc_helper.c
index ca2ea09f54..628f64aad5 100644
--- a/target/i386/misc_helper.c
+++ b/target/i386/misc_helper.c
@@ -18,6 +18,7 @@
*/
#include "qemu/osdep.h"
+#include "qemu/main-loop.h"
#include "cpu.h"
#include "exec/helper-proto.h"
#include "exec/exec-all.h"
@@ -156,7 +157,9 @@ void helper_write_crN(CPUX86State *env, int reg,
target_ulong t0)
break;
case 8:
if (!(env->hflags2 & HF2_VINTR_MASK)) {
+ qemu_mutex_lock_iothread();
cpu_set_apic_tpr(x86_env_get_cpu(env)->apic_state, t0);
+ qemu_mutex_unlock_iothread();
}
env->v_tpr = t0 & 0x0f;
break;
--
2.11.0
- [Qemu-devel] [PULL 00/11] Final icount and misc MTTCG fixes for 2.9, Alex Bennée, 2017/04/10
- [Qemu-devel] [PULL 04/11] cpus: remove icount handling from qemu_tcg_cpu_thread_fn, Alex Bennée, 2017/04/10
- [Qemu-devel] [PULL 02/11] cpus: fix wrong define name, Alex Bennée, 2017/04/10
- [Qemu-devel] [PULL 05/11] cpus: check cpu->running in cpu_get_icount_raw(), Alex Bennée, 2017/04/10
- [Qemu-devel] [PULL 06/11] cpus: move icount preparation out of tcg_exec_cpu, Alex Bennée, 2017/04/10
- [Qemu-devel] [PULL 03/11] target/i386/misc_helper: wrap BQL around another IRQ generator,
Alex Bennée <=
- [Qemu-devel] [PULL 01/11] scripts/qemugdb/mtree.py: fix up mtree dump, Alex Bennée, 2017/04/10
- [Qemu-devel] [PULL 10/11] cpus: call cpu_update_icount on read, Alex Bennée, 2017/04/10
- [Qemu-devel] [PULL 08/11] cpus: introduce cpu_update_icount helper, Alex Bennée, 2017/04/10
- [Qemu-devel] [PULL 11/11] replay: assert time only goes forward, Alex Bennée, 2017/04/10
- [Qemu-devel] [PULL 09/11] cpu-exec: update icount after each TB_EXIT, Alex Bennée, 2017/04/10
- [Qemu-devel] [PULL 07/11] cpus: don't credit executed instructions before they have run, Alex Bennée, 2017/04/10
- Re: [Qemu-devel] [PULL 00/11] Final icount and misc MTTCG fixes for 2.9, Peter Maydell, 2017/04/10