From nobody Tue Feb 10 07:40:44 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.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 (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1539912893529223.07792699262916; Thu, 18 Oct 2018 18:34:53 -0700 (PDT) Received: from localhost ([::1]:46027 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gDJgi-0004Me-94 for importer@patchew.org; Thu, 18 Oct 2018 21:34:52 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59636) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gDJGJ-0005MW-1E for qemu-devel@nongnu.org; Thu, 18 Oct 2018 21:07:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gDJG8-0003kn-A4 for qemu-devel@nongnu.org; Thu, 18 Oct 2018 21:07:27 -0400 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:57149) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gDJFs-00031T-9d; Thu, 18 Oct 2018 21:07:09 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id BAB2F2292C; Thu, 18 Oct 2018 21:06:32 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Thu, 18 Oct 2018 21:06:32 -0400 Received: from localhost (flamenco.cs.columbia.edu [128.59.20.216]) by mail.messagingengine.com (Postfix) with ESMTPA id 326C9102E2; Thu, 18 Oct 2018 21:06:32 -0400 (EDT) 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=PTWHollnOpCy3S7RQrHt3R2+4fi5XVnfoaRDFl3+oYE=; b=T6IlZ Jq17Ktrl2NLc5dgPcjbEfWYB7mqZnDyrZcQbMAlmZRxmD085tjTySxTTfyFDQ/lU VjWYQLKzz08w9Ejqbv5OBQucsRtU8shhpBXuD4ZIhWQXFsBR0KGFgVOJgaruPID0 Vx/YSsnpqovdDXbcJCBTRUi5cAcqN9J452bPII= 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=PTWHollnOpCy3S7RQrHt3R2+4fi5X VnfoaRDFl3+oYE=; b=XMnMfsLLa/1WWIz0DX4gX2l02k0i48tymyePhPMMboBhX ECTgmXSAEBIQYNIwkVyr+s+4MAKDQAdCHXbEkjNaW0i760KStVSDdfIBoYpDgLnK mcsL34iKCy1WT8gxwFfZc0jI3Y+iCW7BinFozBEJA812veTo1zMMAYUI4Km3dBuN UHyqlnFCeYCWFiUARB+M39HxTu/yUWxUHXaXHHrSeKir+onz9bWo9vmN7XXhs7Es 1EuQUTpekEd+S4jZ79qxNrbb2Pjq9O/+9fNj6Xl964WSFzPxNbUO2cRa96njYkDp 2BRg3nIwP/xahM57hKx+AnSmMUuoVmnuX9IV9Lv+g== X-ME-Sender: X-ME-Proxy: From: "Emilio G. Cota" To: qemu-devel@nongnu.org Date: Thu, 18 Oct 2018 21:05:58 -0400 Message-Id: <20181019010625.25294-30-cota@braap.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181019010625.25294-1-cota@braap.org> References: <20181019010625.25294-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] [RFC v3 29/56] arm: convert to cpu_interrupt_request 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 , qemu-arm@nongnu.org, Peter Maydell 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" Cc: Peter Maydell Cc: qemu-arm@nongnu.org Signed-off-by: Emilio G. Cota --- target/arm/cpu.c | 2 +- target/arm/helper.c | 13 ++++++------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/target/arm/cpu.c b/target/arm/cpu.c index 9c5cda8eb7..7330c2dae1 100644 --- a/target/arm/cpu.c +++ b/target/arm/cpu.c @@ -49,7 +49,7 @@ static bool arm_cpu_has_work(CPUState *cs) ARMCPU *cpu =3D ARM_CPU(cs); =20 return (cpu->power_state !=3D PSCI_OFF) - && cs->interrupt_request & + && cpu_interrupt_request(cs) & (CPU_INTERRUPT_FIQ | CPU_INTERRUPT_HARD | CPU_INTERRUPT_VFIQ | CPU_INTERRUPT_VIRQ | CPU_INTERRUPT_EXITTB); diff --git a/target/arm/helper.c b/target/arm/helper.c index c83f7c1109..85e0b9645e 100644 --- a/target/arm/helper.c +++ b/target/arm/helper.c @@ -1295,12 +1295,14 @@ static uint64_t isr_read(CPUARMState *env, const AR= MCPRegInfo *ri) CPUState *cs =3D ENV_GET_CPU(env); uint64_t ret =3D 0; =20 - if (cs->interrupt_request & CPU_INTERRUPT_HARD) { + cpu_mutex_lock(cs); + if (cpu_interrupt_request(cs) & CPU_INTERRUPT_HARD) { ret |=3D CPSR_I; } - if (cs->interrupt_request & CPU_INTERRUPT_FIQ) { + if (cpu_interrupt_request(cs) & CPU_INTERRUPT_FIQ) { ret |=3D CPSR_F; } + cpu_mutex_unlock(cs); /* External aborts are not possible in QEMU so A bit is always clear */ return ret; } @@ -8579,10 +8581,7 @@ void arm_cpu_do_interrupt(CPUState *cs) return; } =20 - /* Hooks may change global state so BQL should be held, also the - * BQL needs to be held for any modification of - * cs->interrupt_request. - */ + /* Hooks may change global state so BQL should be held */ g_assert(qemu_mutex_iothread_locked()); =20 arm_call_pre_el_change_hook(cpu); @@ -8597,7 +8596,7 @@ void arm_cpu_do_interrupt(CPUState *cs) arm_call_el_change_hook(cpu); =20 if (!kvm_enabled()) { - cs->interrupt_request |=3D CPU_INTERRUPT_EXITTB; + cpu_interrupt_request_or(cs, CPU_INTERRUPT_EXITTB); } } =20 --=20 2.17.1