[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v2 04/11] translate: downgrade IRQ BQL asserts to tc
From: |
Alex Bennée |
Subject: |
[Qemu-devel] [PATCH v2 04/11] translate: downgrade IRQ BQL asserts to tcg_debug_assert |
Date: |
Thu, 2 Mar 2017 19:53:30 +0000 |
While on MTTCG hosts it is very important that updates to
cpu->interrupt_request are protected by the BQL not all guests have
been converted to the correct locking yet. As a result we are seeing
breaking on non-MTTCG enabled guests in production builds.
The locking in the guests needs to be fixed but while running single
threaded they will continue to work. By moving the asserts to
tcg_debug_asserts() they will still be useful during conversion
work (much like the existing assert_memory_lock/assert_tb_lock
asserts).
Signed-off-by: Alex Bennée <address@hidden>
---
translate-all.c | 2 +-
translate-common.c | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/translate-all.c b/translate-all.c
index 9bac061c9b..7ee273410d 100644
--- a/translate-all.c
+++ b/translate-all.c
@@ -1928,7 +1928,7 @@ void dump_opcount_info(FILE *f, fprintf_function
cpu_fprintf)
void cpu_interrupt(CPUState *cpu, int mask)
{
- g_assert(qemu_mutex_iothread_locked());
+ tcg_debug_assert(qemu_mutex_iothread_locked());
cpu->interrupt_request |= mask;
cpu->tcg_exit_req = 1;
}
diff --git a/translate-common.c b/translate-common.c
index d504dd0d33..24e05c077a 100644
--- a/translate-common.c
+++ b/translate-common.c
@@ -22,6 +22,7 @@
#include "qom/cpu.h"
#include "sysemu/cpus.h"
#include "qemu/main-loop.h"
+#include "tcg.h"
uintptr_t qemu_real_host_page_size;
intptr_t qemu_real_host_page_mask;
@@ -31,7 +32,7 @@ intptr_t qemu_real_host_page_mask;
static void tcg_handle_interrupt(CPUState *cpu, int mask)
{
int old_mask;
- g_assert(qemu_mutex_iothread_locked());
+ tcg_debug_assert(qemu_mutex_iothread_locked());
old_mask = cpu->interrupt_request;
cpu->interrupt_request |= mask;
--
2.11.0
- [Qemu-devel] [PATCH v2 00/11] MTTCG fixups for 2.9, Alex Bennée, 2017/03/02
- [Qemu-devel] [PATCH v2 01/11] vl/cpus: be smarter with icount and MTTCG, Alex Bennée, 2017/03/02
- [Qemu-devel] [PATCH v2 04/11] translate: downgrade IRQ BQL asserts to tcg_debug_assert,
Alex Bennée <=
- Re: [Qemu-devel] [PATCH v2 04/11] translate: downgrade IRQ BQL asserts to tcg_debug_assert, Peter Maydell, 2017/03/03
- Re: [Qemu-devel] [PATCH v2 04/11] translate: downgrade IRQ BQL asserts to tcg_debug_assert, Alex Bennée, 2017/03/03
- Re: [Qemu-devel] [PATCH v2 04/11] translate: downgrade IRQ BQL asserts to tcg_debug_assert, Peter Maydell, 2017/03/03
- Re: [Qemu-devel] [PATCH v2 04/11] translate: downgrade IRQ BQL asserts to tcg_debug_assert, Richard Henderson, 2017/03/03
- Re: [Qemu-devel] [PATCH v2 04/11] translate: downgrade IRQ BQL asserts to tcg_debug_assert, Eric Blake, 2017/03/03
- Re: [Qemu-devel] [PATCH v2 04/11] translate: downgrade IRQ BQL asserts to tcg_debug_assert, Eric Blake, 2017/03/03
- Re: [Qemu-devel] [PATCH v2 04/11] translate: downgrade IRQ BQL asserts to tcg_debug_assert, Paolo Bonzini, 2017/03/03
[Qemu-devel] [PATCH v2 02/11] target/i386/cpu.h: declare TCG_GUEST_DEFAULT_MO, Alex Bennée, 2017/03/02
[Qemu-devel] [PATCH v2 03/11] cpus.c: add additional error_report when !TARGET_SUPPORT_MTTCG, Alex Bennée, 2017/03/02