From patchwork Tue Jan 15 19:47:54 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emilio Cota X-Patchwork-Id: 10765045 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D7F6E17FB for ; Tue, 15 Jan 2019 19:49:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C7BC82D802 for ; Tue, 15 Jan 2019 19:49:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BC4082D814; Tue, 15 Jan 2019 19:49:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 752B12D802 for ; Tue, 15 Jan 2019 19:49:36 +0000 (UTC) Received: from localhost ([127.0.0.1]:36450 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gjUiN-00013x-Lx for patchwork-qemu-devel@patchwork.kernel.org; Tue, 15 Jan 2019 14:49:35 -0500 Received: from eggs.gnu.org ([209.51.188.92]:42619) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gjUh2-0008A4-Ja for qemu-devel@nongnu.org; Tue, 15 Jan 2019 14:48:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gjUgy-0006yS-QC for qemu-devel@nongnu.org; Tue, 15 Jan 2019 14:48:12 -0500 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:42623) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gjUgy-0006wx-I7 for qemu-devel@nongnu.org; Tue, 15 Jan 2019 14:48:08 -0500 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id CAE5328A72; Tue, 15 Jan 2019 14:48:05 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Tue, 15 Jan 2019 14:48:05 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=braap.org; h= from:to:cc:subject:date:message-id:in-reply-to:references; s= mesmtp; bh=Xjqflkzsm/KA4zxMJftg15BS6QHmhM0q3vVFDsmGv8Y=; b=TBVjG g+vH9eI8gaxfDvCNwS7kRBcShDcdOcwKS0wICWqsvzdDh2aeYbVvry5ZqOfc2egA xsTBbmxo2kn8olloUQCdfZNSkFTEbHgIHvrg90OfiDiLvJCmryUM4ZVkG2mFyJ6n cyH6En1EfCoCGcO2VEkMVLv6vNt2zlZJgswR3I= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:date:from:in-reply-to:message-id :references:subject:to:x-me-proxy:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; bh=Xjqflkzsm/KA4zxMJftg15BS6QHmh M0q3vVFDsmGv8Y=; b=RQFzmD60qc75BIrzotnPgC5fWnv8WENoft8b8d1e+3Xkb AUeRH8AiQeOeRc1gy4C0E17p2wl93mULxNFpRIpbl0mbn/NBzT7nkd1or5ex1/uD zD8BaeMxFaO+kewW+6n1vG5VZfNzgK4MHsAhrWqvc8tzj9BPKdt2dKN2+47yhSoI lwqTHBjg4IjQ+6pgReF3jlpcTAbuY2Viqgbp9ho4jHNR85NmL1+j3jk9oAKnP3jm dOQFNT19l7gZ4QDTA8dWktgj631tNsb73jEx1Zr52vtvSPxHl7SzythLxRlE3icR HbouywJo+ZkQ0t2wQ+qME+sZdW4XzXqSuCLo9ZDhg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedtledrgeefgdduvdekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfquhhtnecuuegrihhlohhuthemucef tddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffufffkof gjfhestddtredtredttdenucfhrhhomhepfdfgmhhilhhiohcuifdrucevohhtrgdfuceo tghothgrsegsrhgrrghprdhorhhgqeenucfkphepuddvkedrheelrddvtddrvdduieenuc frrghrrghmpehmrghilhhfrhhomheptghothgrsegsrhgrrghprdhorhhgnecuvehluhhs thgvrhfuihiivgeptd X-ME-Proxy: Received: from localhost (flamenco.cs.columbia.edu [128.59.20.216]) by mail.messagingengine.com (Postfix) with ESMTPA id 5C50CE4511; Tue, 15 Jan 2019 14:48:05 -0500 (EST) From: "Emilio G. Cota" To: qemu-devel@nongnu.org Date: Tue, 15 Jan 2019 14:47:54 -0500 Message-Id: <20190115194754.7670-3-cota@braap.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190115194754.7670-1-cota@braap.org> References: <20190115194754.7670-1-cota@braap.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 66.111.4.29 Subject: [Qemu-devel] [PATCH 2/2] cpu-exec: reset BQL after longjmp in cpu_exec_step_atomic 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: Paolo Bonzini , Richard Henderson , Max Filippov Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Just like we do in cpu_exec(). Reported-by: Max Filippov Tested-by: Max Filippov Signed-off-by: Emilio G. Cota --- accel/tcg/cpu-exec.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c index 55e0ca41c4..fefd955d66 100644 --- a/accel/tcg/cpu-exec.c +++ b/accel/tcg/cpu-exec.c @@ -266,6 +266,9 @@ void cpu_exec_step_atomic(CPUState *cpu) #ifndef CONFIG_SOFTMMU tcg_debug_assert(!have_mmap_lock()); #endif + if (qemu_mutex_iothread_locked()) { + qemu_mutex_unlock_iothread(); + } assert_no_pages_locked(); }