From nobody Fri Nov 7 09:09:02 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 (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1537202215295403.3538572995841; Mon, 17 Sep 2018 09:36:55 -0700 (PDT) Received: from localhost ([::1]:36462 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g1wW5-00026V-Qn for importer@patchew.org; Mon, 17 Sep 2018 12:36:53 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40776) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g1wQd-0006Ex-KU for qemu-devel@nongnu.org; Mon, 17 Sep 2018 12:31:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g1wQZ-0001o3-Bu for qemu-devel@nongnu.org; Mon, 17 Sep 2018 12:31:15 -0400 Received: from wout2-smtp.messagingengine.com ([64.147.123.25]:40741) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1g1wQY-0001g1-Tu for qemu-devel@nongnu.org; Mon, 17 Sep 2018 12:31:11 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 93053512; Mon, 17 Sep 2018 12:31:06 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Mon, 17 Sep 2018 12:31:06 -0400 Received: from localhost (flamenco.cs.columbia.edu [128.59.20.216]) by mail.messagingengine.com (Postfix) with ESMTPA id B54A4E49EC; Mon, 17 Sep 2018 12:31:05 -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=JBabSxVHZo0sKW Mj0NXIaz0/iVZEj/FkHB5EHoz7idY=; b=YCg1vCdjxwbT0gFFpZY9dY2XoE1+YD F8LrjZ0ZXXlgTVqKE//MpuWL1etpiTCu5lPqhMUFZYxLUHAXgjH0drNwWUwL8pnP hCSS7AJf0FHaQ7BYCki404OzrQkl8KWfj5KVBLn1iAAIlJaMQ96uS5Ya4Ehe68v6 h6PTpCXTBJHS8= 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=JBabSxVHZo0sKWMj0NXIaz0/iVZEj/FkHB5EHoz7idY=; b=Jdd+RUKk HBBC3fC2ldG53oQkPkIpSlLo/4CTNhA1SLdUiR7MlLvrQq3mtAvJxZtAw3CVurh+ 3kOHBi/PVrs8VH4BdGkvY1vaxayqK1Lu8OZn+mEl5esmhh4SLjMiZJcCZlxJiInz c04+SAzP/V6VAJQ+GEvvomktkAG4soBNoaTja7VLn5/2v8Gth+JNojqJjJVn87lf lR/fgqHuLodey9Wi9jiS+HdEHK8yPOjNErvk+qQuW+k3oTVhQC7fTKrtA7O2wv+A 2kD80QKgtaDkS70JKtdD11ogpCL/jT3tsRe/YsSKNuRtB2blSffkRREvZ+OzIn84 GEftUOntOFn3hw== X-ME-Proxy: X-ME-Sender: From: "Emilio G. Cota" To: qemu-devel@nongnu.org Date: Mon, 17 Sep 2018 12:30:34 -0400 Message-Id: <20180917163103.6113-7-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 06/35] exec: use 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 It will be changed to an atomic operation soon. Cc: Peter Crosthwaite Cc: Richard Henderson Signed-off-by: Paolo Bonzini Signed-off-by: Emilio G. Cota --- accel/tcg/cpu-exec.c | 6 +++--- exec.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c index 6bcb6d99bd..7ca00725ec 100644 --- a/accel/tcg/cpu-exec.c +++ b/accel/tcg/cpu-exec.c @@ -533,7 +533,7 @@ static inline bool cpu_handle_interrupt(CPUState *cpu, interrupt_request &=3D ~CPU_INTERRUPT_SSTEP_MASK; } if (interrupt_request & CPU_INTERRUPT_DEBUG) { - cpu->interrupt_request &=3D ~CPU_INTERRUPT_DEBUG; + cpu_reset_interrupt(cpu, CPU_INTERRUPT_DEBUG); cpu->exception_index =3D EXCP_DEBUG; qemu_mutex_unlock_iothread(); return true; @@ -542,7 +542,7 @@ static inline bool cpu_handle_interrupt(CPUState *cpu, /* Do nothing */ } else if (interrupt_request & CPU_INTERRUPT_HALT) { replay_interrupt(); - cpu->interrupt_request &=3D ~CPU_INTERRUPT_HALT; + cpu_reset_interrupt(cpu, CPU_INTERRUPT_HALT); cpu->halted =3D 1; cpu->exception_index =3D EXCP_HLT; qemu_mutex_unlock_iothread(); @@ -582,7 +582,7 @@ static inline bool cpu_handle_interrupt(CPUState *cpu, interrupt_request =3D cpu->interrupt_request; } if (interrupt_request & CPU_INTERRUPT_EXITTB) { - cpu->interrupt_request &=3D ~CPU_INTERRUPT_EXITTB; + cpu_reset_interrupt(cpu, CPU_INTERRUPT_EXITTB); /* ensure that no TB jump will be modified as the program flow was changed */ *last_tb =3D NULL; diff --git a/exec.c b/exec.c index 6826c8337d..0b8e2420cf 100644 --- a/exec.c +++ b/exec.c @@ -776,7 +776,7 @@ static int cpu_common_post_load(void *opaque, int versi= on_id) =20 /* 0x01 was CPU_INTERRUPT_EXIT. This line can be removed when the version_id is increased. */ - cpu->interrupt_request &=3D ~0x01; + cpu_reset_interrupt(cpu, 0x01); tlb_flush(cpu); =20 /* loadvm has just updated the content of RAM, bypassing the --=20 2.17.1