From nobody Wed Nov 5 20:14:39 2025 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.zohomail.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 (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 1537203115558377.4547292139805; Mon, 17 Sep 2018 09:51:55 -0700 (PDT) Received: from localhost ([::1]:36551 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g1wkS-0006V6-16 for importer@patchew.org; Mon, 17 Sep 2018 12:51:44 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41321) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g1wR0-0006bP-F7 for qemu-devel@nongnu.org; Mon, 17 Sep 2018 12:31:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g1wQv-0002dM-UB for qemu-devel@nongnu.org; Mon, 17 Sep 2018 12:31:37 -0400 Received: from wout2-smtp.messagingengine.com ([64.147.123.25]:50613) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1g1wQv-00027z-Li for qemu-devel@nongnu.org; Mon, 17 Sep 2018 12:31:33 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 268813B6; Mon, 17 Sep 2018 12:31:12 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Mon, 17 Sep 2018 12:31:12 -0400 Received: from localhost (flamenco.cs.columbia.edu [128.59.20.216]) by mail.messagingengine.com (Postfix) with ESMTPA id 6BE02E4626; Mon, 17 Sep 2018 12:31:11 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=braap.org; h=cc :date:from:in-reply-to:message-id:references:subject:to :x-me-sender:x-me-sender:x-sasl-enc; s=mesmtp; bh=h6wPpCmKIfuPoD kgP/9maLzHowZnSqbjbqyRHUmI+ew=; b=14jA0BbjPQo8tyTq08R7/9vVeS7W2m jMhfQzfZA30+zNqzlwLh0LKsCTw25XF1ElNMPS/QYaHBjrlcsA6Imvd7oA+5SLFA if9I3AwDrTRSfp8dODVqHHxmkyanowPAM859VfuTOHefDPMr7Fmg4w35Y/lSuOGq jDiwjbCWYpzGA= 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-sender:x-me-sender:x-sasl-enc; s= fm3; bh=h6wPpCmKIfuPoDkgP/9maLzHowZnSqbjbqyRHUmI+ew=; b=Oo9dE8ue NkFvXWIQHKr26uqzQhkuRh0orpyS9HGjVQigxYAIfoymjV2eBRmJxvUKaMyectMS L3dajq956Pf3n0KGBQmMmcWtJ+lYhGpgj0P1bk+kIgOeOkggM4e196dXkW1bSqZC IJx+yijyuUakjcZ94pesP/W3kYfhPDEtHAmDtqhh8cC+QEPJAYeFVw5aGH1hBBio O+8AsOH8fxoss+8moRVw8bRr0XmqjrEZU3TineNxy2GuSnIUE1BBXxJRhaaPE25z bo2fW1S+6r5M5XNr/gInogZvOSgH3Q680lv0rxoKMqemwFYlqKrM8KoaqjjCDKuv lHTXMsDIm5sANA== X-ME-Proxy: X-ME-Sender: From: "Emilio G. Cota" To: qemu-devel@nongnu.org Date: Mon, 17 Sep 2018 12:30:57 -0400 Message-Id: <20180917163103.6113-30-cota@braap.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180917163103.6113-1-cota@braap.org> References: <20180917163103.6113-1-cota@braap.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 64.147.123.25 Subject: [Qemu-devel] [PATCH 29/35] exec: drop BQL from cpu_reset_interrupt 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 , Peter Crosthwaite Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Paolo Bonzini Now that cpu->interrupt_request is accessed with atomics, we can drop the BQL around cpu_reset_interrupt, which is a step towards not taking the BQL mandatorily in cpu_exec_interrupt. Cc: Peter Crosthwaite Cc: Richard Henderson Signed-off-by: Paolo Bonzini Signed-off-by: Emilio G. Cota --- qom/cpu.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/qom/cpu.c b/qom/cpu.c index e2dfbde7c4..6afe428069 100644 --- a/qom/cpu.c +++ b/qom/cpu.c @@ -94,19 +94,9 @@ static void cpu_common_get_memory_mapping(CPUState *cpu, error_setg(errp, "Obtaining memory mappings is unsupported on this CPU= ."); } =20 -/* Resetting the IRQ comes from across the code base so we take the - * BQL here if we need to. cpu_interrupt assumes it is held.*/ void cpu_reset_interrupt(CPUState *cpu, int mask) { - bool need_lock =3D !qemu_mutex_iothread_locked(); - - if (need_lock) { - qemu_mutex_lock_iothread(); - } atomic_and(&cpu->interrupt_request, ~mask); - if (need_lock) { - qemu_mutex_unlock_iothread(); - } } =20 void cpu_exit(CPUState *cpu) --=20 2.17.1