From nobody Tue Feb 10 05:42:01 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1488484726372484.7318028740666; Thu, 2 Mar 2017 11:58:46 -0800 (PST) Received: from localhost ([::1]:54288 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cjWs7-0003Jv-6U for importer@patchew.org; Thu, 02 Mar 2017 14:58:43 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59630) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cjWnH-0007xW-7Z for qemu-devel@nongnu.org; Thu, 02 Mar 2017 14:53:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cjWnG-0002TI-C0 for qemu-devel@nongnu.org; Thu, 02 Mar 2017 14:53:43 -0500 Received: from mail-wr0-x234.google.com ([2a00:1450:400c:c0c::234]:34511) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cjWnG-0002T6-5f for qemu-devel@nongnu.org; Thu, 02 Mar 2017 14:53:42 -0500 Received: by mail-wr0-x234.google.com with SMTP id l37so60262185wrc.1 for ; Thu, 02 Mar 2017 11:53:41 -0800 (PST) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id 136sm2800020wmg.12.2017.03.02.11.53.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 02 Mar 2017 11:53:37 -0800 (PST) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 5DE2E3E04B2; Thu, 2 Mar 2017 19:53:37 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=DDm08/obXFO5/zyPEDyy5yaU4fu9phkTVhZl5s7VrQo=; b=ZUBgqa+wN2Ylo+cpvaj00T8VEaiv3qbYSsu8J0VbDw0GtxkzYyE56zol9yDDqtF8N6 zTbNlsfBXxAWR7dE518gWcYSiZcg2pcKX2hEPDpnWpAYKQJTXJIwbDCW7pr6H/wau73r h1HZPtYXcCri2m//FDTQeyAHR05jkNRlyN0GU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=DDm08/obXFO5/zyPEDyy5yaU4fu9phkTVhZl5s7VrQo=; b=pfTmSqujpaFTD8B12nR1yEq7i14pZK8omTjgkqdSk6j0+dU4iQlcxU3HGObSKH1KgO Dr/qKygzZOWgqi7HV3FsNMxXIiAXs8P0VjN0yMVmKbbp/rx2H1CxzedWQxmIrlGqtfJO I9AmOc5oLUtj3Yf8LjJZPPDRQglezfkxZ/bJ+knO41dUkUQ1aj3i1ceM2rSoACML5/hl Md9XxSqtIh5c92CDXz47b9Lexc64U3S5KzQ+jLiRpWjP5RGL9oQJWlxdp7GXI8Keu0mG w8PQFoECMarTw59tmbXWH/u8HZmEvJ+UW4fFR8hypa4JBfzrW1Almkr6661zcE7wlohY CkkQ== X-Gm-Message-State: AMke39mGC9udIFl3MU6RfgODtS57xr1h8UIErer9+QWHH4fdAb1GEsAh7XvpxGmY+m+/Wdme X-Received: by 10.223.173.199 with SMTP id w65mr13961566wrc.125.1488484420946; Thu, 02 Mar 2017 11:53:40 -0800 (PST) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: peter.maydell@linaro.org, rth@twiddle.net, pbonzini@redhat.com Date: Thu, 2 Mar 2017 19:53:30 +0000 Message-Id: <20170302195337.31558-5-alex.bennee@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170302195337.31558-1-alex.bennee@linaro.org> References: <20170302195337.31558-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c0c::234 Subject: [Qemu-devel] [PATCH v2 04/11] translate: downgrade IRQ BQL asserts to tcg_debug_assert X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mttcg@listserver.greensocs.com, nikunj@linux.vnet.ibm.com, Peter Crosthwaite , a.rigo@virtualopensystems.com, qemu-devel@nongnu.org, cota@braap.org, bobby.prani@gmail.com, =?UTF-8?q?Alex=20Benn=C3=A9e?= , fred.konrad@greensocs.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 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=C3=A9e --- 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) =20 void cpu_interrupt(CPUState *cpu, int mask) { - g_assert(qemu_mutex_iothread_locked()); + tcg_debug_assert(qemu_mutex_iothread_locked()); cpu->interrupt_request |=3D mask; cpu->tcg_exit_req =3D 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" =20 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()); =20 old_mask =3D cpu->interrupt_request; cpu->interrupt_request |=3D mask; --=20 2.11.0