From patchwork Wed Jan 30 00:47:06 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Emilio Cota X-Patchwork-Id: 10787387 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 C017F159A for ; Wed, 30 Jan 2019 00:50:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B17EF2D17B for ; Wed, 30 Jan 2019 00:50:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A61E42D19C; Wed, 30 Jan 2019 00:50:07 +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 52D0E2D17B for ; Wed, 30 Jan 2019 00:50:07 +0000 (UTC) Received: from localhost ([127.0.0.1]:57774 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1goe4s-000181-IC for patchwork-qemu-devel@patchwork.kernel.org; Tue, 29 Jan 2019 19:50:06 -0500 Received: from eggs.gnu.org ([209.51.188.92]:35073) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1goe36-0007t6-U4 for qemu-devel@nongnu.org; Tue, 29 Jan 2019 19:48:17 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1goe35-0000eX-LB for qemu-devel@nongnu.org; Tue, 29 Jan 2019 19:48:16 -0500 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:33061) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1goe35-0000e6-GX for qemu-devel@nongnu.org; Tue, 29 Jan 2019 19:48:15 -0500 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 1DC4321FED; Tue, 29 Jan 2019 19:48:15 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Tue, 29 Jan 2019 19:48:15 -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=oRkODhzwwYFaQfEOdmmHeNoUMgxydjK6hxWjudFdnjM=; b=16mig OOZABpo9jTsM2mdXNZF9bRXIyS/o8gTdMUVn86YHxx+BnwZWxmoxE8x6wd0OUTMb MAMSD8wV1R7PD6G9W3Yd4Iw+7acZPzfKeBmhDsd/ZfayKRzf+jOl+3LhDfb9k2L1 KI8agScjkFgJyZVoSG55IROX2+wHRKsVAzeRMU= 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=oRkODhzwwYFaQfEOdmmHeNoUMgxyd jK6hxWjudFdnjM=; b=yzLHNW5i5qpe9tGvTsokpzU5a9+Zj1RBkcf7QjNP/Vr6/ skAv+z8dSIW5YoanBnVzBC32/PUmZCCaNfHANC4lGlACe8GwTBiMliVitdIP9t4C m6xxmogwuLbHwxikz/YF0c53YHdATS5SY+QA2fhqjL/dGKMJEWkj+lefCTw4ZtnV G1twVlvigFUqXLJIMPCTggx6HlpJl0NEgnjOzJK+Hq/7EJkMsc4JSsXRIV/uqpSQ H7gewW3y/+i/LBcpchjSMw1pfv2Qu2HdUgnn4t3aqMpdebr+nKs90TZIgd3KXPt/ Kw9yXRotYtuS+7sd2EezDGw57jDNzdztVhsEho0UQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedtledrjeefgddvkecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfhuthenuceurghilhhouhhtmecufedt tdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufffkffojg hfsedttdertdertddtnecuhfhrohhmpedfgfhmihhlihhoucfirdcuvehothgrfdcuoegt ohhtrgessghrrggrphdrohhrgheqnecukfhppeduvdekrdehledrvddtrddvudeinecurf grrhgrmhepmhgrihhlfhhrohhmpegtohhtrgessghrrggrphdrohhrghenucevlhhushht vghrufhiiigvpedt X-ME-Proxy: Received: from localhost (flamenco.cs.columbia.edu [128.59.20.216]) by mail.messagingengine.com (Postfix) with ESMTPA id B5C57E4664; Tue, 29 Jan 2019 19:48:14 -0500 (EST) From: "Emilio G. Cota" To: qemu-devel@nongnu.org Date: Tue, 29 Jan 2019 19:47:06 -0500 Message-Id: <20190130004811.27372-9-cota@braap.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190130004811.27372-1-cota@braap.org> References: <20190130004811.27372-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.25 Subject: [Qemu-devel] [PATCH v6 08/73] tcg-runtime: define helper_cpu_halted_set 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 Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Reviewed-by: Richard Henderson Signed-off-by: Emilio G. Cota Reviewed-by: Alex Bennée --- accel/tcg/tcg-runtime.h | 2 ++ accel/tcg/tcg-runtime.c | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/accel/tcg/tcg-runtime.h b/accel/tcg/tcg-runtime.h index dfe325625c..46386bb564 100644 --- a/accel/tcg/tcg-runtime.h +++ b/accel/tcg/tcg-runtime.h @@ -28,6 +28,8 @@ DEF_HELPER_FLAGS_1(lookup_tb_ptr, TCG_CALL_NO_WG_SE, ptr, env) DEF_HELPER_FLAGS_1(exit_atomic, TCG_CALL_NO_WG, noreturn, env) +DEF_HELPER_FLAGS_2(cpu_halted_set, TCG_CALL_NO_RWG, void, env, i32) + #ifdef CONFIG_SOFTMMU DEF_HELPER_FLAGS_5(atomic_cmpxchgb, TCG_CALL_NO_WG, diff --git a/accel/tcg/tcg-runtime.c b/accel/tcg/tcg-runtime.c index d0d4484406..4aa038465f 100644 --- a/accel/tcg/tcg-runtime.c +++ b/accel/tcg/tcg-runtime.c @@ -167,3 +167,10 @@ void HELPER(exit_atomic)(CPUArchState *env) { cpu_loop_exit_atomic(ENV_GET_CPU(env), GETPC()); } + +void HELPER(cpu_halted_set)(CPUArchState *env, uint32_t val) +{ + CPUState *cpu = ENV_GET_CPU(env); + + cpu->halted = val; +}