From patchwork Sun Apr 28 22:14:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 792919 Delivered-To: patch@linaro.org Received: by 2002:adf:cc13:0:b0:346:15ad:a2a with SMTP id x19csp1423433wrh; Sun, 28 Apr 2024 15:15:53 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUuYuuwwULuMXFURXPeX4GgGMvDvQrL0zLF3fGL/nF2RvlCuBgas0orwEHi4UWGOt1fH+e7jBv7Khxz5BNhcyJJ X-Google-Smtp-Source: AGHT+IFFqDmiAKb+ptSyOmuwd1iiAubDbt39X+uMoJfLk9Q0XLLmtV09sX8vSK9BCnqop2EIrEQo X-Received: by 2002:a05:6358:2c83:b0:186:249a:c8de with SMTP id l3-20020a0563582c8300b00186249ac8demr9831932rwm.5.1714342552788; Sun, 28 Apr 2024 15:15:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1714342552; cv=none; d=google.com; s=arc-20160816; b=vZhYghnZ9JmQeejNfFcU03sQBtw0dKcBewBkukalKnSzj54vcV7fMdpkazQnk1ydRo roYaXkd6Sdm8P6lZEcgQUoK6AQCOxQd0RrigEMPwrR7GJYV5BaoY/UvMJfMuDmEkBqDL IB51O+PzjN8KS9X/z/KsFE+8f0m7HarWxIYYexvfwzWpISOFDTkDkc+ujoQDKzgrkah6 evv+an3dLIlGTOVpiwzIzZhWaXAG6pWRRjkHj98FOLTTQppOuLES79MRkf5rHegGUuT/ BHhdSz2X844q6MLhNzy5vqukaqTIxPrDp7asUS6jLv6KPydt493zmpoz4TCXsOw/AuhF kEeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=EC394qSuW4mbz7HKeTozfqIySzPWTIg+XxWvBDEtDQ0=; fh=+kTJNlX4d/Ktp/5WO5d77IkVGYcQ7tiev+NqB54rN/Q=; b=D9oHek6HAXX1oz0T213GBpdc3Y3yXK5QEaRZFcD9DWh+4UOhKP17NSMEWIQG66GXHd 3l6N3FGi5AADhU4YErsdbfyygeMw+7neAaO+BgfDQG+47xpTTZSd8/ZgYkAgvq5AIQ5g Xg0mhwHKvMj+PV4iqIvKk2N5QQ/j75DEFc0LbGbJxwIbAD/3pYUB800k0MMzsLjCb7IH +qxz6Tz6jIbCmFfo/K03LgDA1IZDrpmk+A/cx3Imyxl6Xb+jMZIb1YvDXy4IFF4SDmZp Rvfll4Eu0HCRlVVWYuzXwcRmha0N9fIkC1lYK/xzCfTHeex8WlQBAKJlUwZOl0u+E2hx 8A+g==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=TGhJZcce; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id fv27-20020a05622a4a1b00b00439755df2d0si21378831qtb.620.2024.04.28.15.15.52 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 28 Apr 2024 15:15:52 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=TGhJZcce; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s1Cnm-0005ug-Qt; Sun, 28 Apr 2024 18:15:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s1Cni-0005tf-GY for qemu-devel@nongnu.org; Sun, 28 Apr 2024 18:15:15 -0400 Received: from mail-lf1-x12c.google.com ([2a00:1450:4864:20::12c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s1Cng-0005Ul-Mj for qemu-devel@nongnu.org; Sun, 28 Apr 2024 18:15:14 -0400 Received: by mail-lf1-x12c.google.com with SMTP id 2adb3069b0e04-516d4d80d00so4881409e87.0 for ; Sun, 28 Apr 2024 15:15:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1714342509; x=1714947309; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=EC394qSuW4mbz7HKeTozfqIySzPWTIg+XxWvBDEtDQ0=; b=TGhJZcceXRQ6GrFka5EFRsFF3/gwKlkQPugCLG/NT/cXvmFwBI6J3VVjwFti5PU/t2 lSfSDSC1+WOUcIfZId5NtwSrMin1a20CmX6sahHVR//wNWmpNJpChDjUebFLrVrJmHmv e4QNw99KXpZb8IqID65aRgmFu4r+zZfOzYJuOIGyqGdVcnJXo9mfB8NOc2DaR6Ioyc32 AkwQr1hxLTod22KShMY3N1Iaux6YtH22vDUwFknUo1uC/MwwRGQJJ+8OeXkItNcTN6Wm 1XdVkGafy1n/BrPHlsdsy72LOkgw9AVt7Am/a3p/5agP1NUAZSDKv/lwRYLGjcymPgJi WMaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714342509; x=1714947309; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=EC394qSuW4mbz7HKeTozfqIySzPWTIg+XxWvBDEtDQ0=; b=flVICcaZh36qiICKarBAI2shQwpkSiA2H//QkZISW0TnYsiTUaTCpCW2Fx/QaQ5C3G Bwf0F4nk2JohMrpdQlYD1mJJ5ZcSRVKBqRCl1y78zSn5hYRpFzXB6FnGlTanPh8jKI35 XCEGnh6pPmPksCejEUoyV5Qpfv4UjxzfTJtdEKjOwpQxBBgaUaF9yg3jWZX09elUoDkh OWZPkpXLiw4BisRo3h0XgPN02FQU2VxHQwvA9SsadhzdXFNjtsfiH+SXxrlHX/Ki2yCX 9BS3/JayEh+xGimcJLtzKcjwYO0Z7vw3BoCpYIGqpSiGSwL3eauP22iK+c6p3o3Zetra d8TQ== X-Gm-Message-State: AOJu0YyzFDZ84iszfSHfaQLTNAWNyHfEI/zZWyrtFTndBAgfe5Yc6fUy +CUCNtylsjzlRXuLbRFF6/kpAYxbOYKbBnYA0kxV4b9NHkymBt9rRRJ1YUDJ0IQUKd47pv3msAY 6 X-Received: by 2002:a05:6512:3983:b0:518:d5c5:7276 with SMTP id j3-20020a056512398300b00518d5c57276mr6961240lfu.58.1714342509485; Sun, 28 Apr 2024 15:15:09 -0700 (PDT) Received: from m1x-phil.lan ([176.176.142.130]) by smtp.gmail.com with ESMTPSA id i21-20020a170906091500b00a5216df5d25sm13117569ejd.3.2024.04.28.15.15.08 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sun, 28 Apr 2024 15:15:09 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Anton Johansson , Richard Henderson , =?utf-8?q?Philippe_Mathie?= =?utf-8?q?u-Daud=C3=A9?= Subject: [PATCH 03/24] accel/tcg: Move user definition of cpu_interrupt() to user-exec.c Date: Mon, 29 Apr 2024 00:14:29 +0200 Message-ID: <20240428221450.26460-4-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240428221450.26460-1-philmd@linaro.org> References: <20240428221450.26460-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::12c; envelope-from=philmd@linaro.org; helo=mail-lf1-x12c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- accel/tcg/translate-all.c | 9 --------- accel/tcg/user-exec.c | 8 ++++++++ 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c index 83cc14fbde..fdf6d8ac19 100644 --- a/accel/tcg/translate-all.c +++ b/accel/tcg/translate-all.c @@ -644,15 +644,6 @@ void cpu_io_recompile(CPUState *cpu, uintptr_t retaddr) cpu_loop_exit_noexc(cpu); } -#else /* CONFIG_USER_ONLY */ - -void cpu_interrupt(CPUState *cpu, int mask) -{ - g_assert(bql_locked()); - cpu->interrupt_request |= mask; - qatomic_set(&cpu->neg.icount_decr.u16.high, -1); -} - #endif /* CONFIG_USER_ONLY */ /* diff --git a/accel/tcg/user-exec.c b/accel/tcg/user-exec.c index ca27746fe4..f49435df9d 100644 --- a/accel/tcg/user-exec.c +++ b/accel/tcg/user-exec.c @@ -24,6 +24,7 @@ #include "qemu/bitops.h" #include "qemu/rcu.h" #include "exec/cpu_ldst.h" +#include "qemu/main-loop.h" #include "exec/translate-all.h" #include "exec/page-protection.h" #include "exec/helper-proto.h" @@ -38,6 +39,13 @@ __thread uintptr_t helper_retaddr; //#define DEBUG_SIGNAL +void cpu_interrupt(CPUState *cpu, int mask) +{ + g_assert(bql_locked()); + cpu->interrupt_request |= mask; + qatomic_set(&cpu->neg.icount_decr.u16.high, -1); +} + /* * Adjust the pc to pass to cpu_restore_state; return the memop type. */