From patchwork Mon May 6 12:37:08 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: 795006 Delivered-To: patch@linaro.org Received: by 2002:adf:a453:0:b0:34e:ceec:bfcd with SMTP id e19csp901575wra; Mon, 6 May 2024 05:39:48 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWwfkoQSLS3LRgctBNPEi4bL9JRXBemtdqSVTO1ydBgAMBluPPs5Sd44NB3lRbtHYVMyK4q9v0FkbwQSeDA0M+h X-Google-Smtp-Source: AGHT+IGosURUIKwIxPlZ51CyF48AfQfaoW6DCn5hetiEzWG/vSPgOt0nfhfuvy5Mfi7Nz+7Rmstz X-Received: by 2002:a05:6830:2b20:b0:6f0:2a66:3391 with SMTP id l32-20020a0568302b2000b006f02a663391mr7267751otv.11.1714999188579; Mon, 06 May 2024 05:39:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1714999188; cv=none; d=google.com; s=arc-20160816; b=vd/uuLLJ1fFfVuNlnreuKXtjS6Eer8k9Af25QEW3izZsdrXvN1B74LErROzdk7IQoo TeHTmROC5LrZvFzDbTrJwscPw/YFBxgNr3Jm8jDxWb6DwoZ2M2CcUTZjCoNUkNasAXTq KkOR+mwQfLAYfwSR2QrIKmZdOlnuZkFUwt5ML3QpZr4IIvlVpKPaT0lzN+fGWQ7UOfEj RFgCE0uh+QNc6Qao22mmD1YclEUqiRst2CsxxDgmoVslgfJVIXbQth0PvjFdSC8Ca6Pn AYv9mHYmTcg8ZfCubpsZ5ipQOSQ6LA+P5IAXa7YiKsYMcjSLNgk4NETonIaLKnaOmJkL /SFg== 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=JRaulFrVbkjbtSZtw7OLq918oPDYvf4Hs2z9z8eLBTc=; fh=qtn8prgQtzf5IzCNvLChUZDElvNECP6ej9YfjQeBz3I=; b=i0DWTftSB9QyRpMJNdWLkS1moBVQKtlsYuQrylh+WrwsOHm/chjRYmYnkJfZMJROPw iSMj5gMxaMTRKjkraT2DLFjK380q5gcAnMENNRSXJaoQ19vIRDEsGe1eCTQvEQybJ4/B S7Ud1K02WPe4GJNGmN/GqTZFKSyNGAfmvinsjtb8c7abqUZT/SXxpgSQKbEPnZMbsLFK RhXLRoYx9kaXXNAY4ldJhbxppaPIoamlaAXfYXLxoqNxK6Fy/oyqs3aIRGCemaQvBupr QOgcD2yCSHkQdJ8WqND+5f1jMP9yHG+xjVEnOx+BkGivJhYk51H+aeKO1nLbEl2fQHRf Z50w==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gzmMQyf8; 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 19-20020ac85753000000b0043adac956cfsi8943792qtx.88.2024.05.06.05.39.48 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 06 May 2024 05:39:48 -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=gzmMQyf8; 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 1s3xcY-0002ii-Tk; Mon, 06 May 2024 08:39:06 -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 1s3xc6-0001l7-1I for qemu-devel@nongnu.org; Mon, 06 May 2024 08:38:42 -0400 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s3xc4-00021p-Ey for qemu-devel@nongnu.org; Mon, 06 May 2024 08:38:37 -0400 Received: by mail-wr1-x42d.google.com with SMTP id ffacd0b85a97d-34f0e55787aso822513f8f.2 for ; Mon, 06 May 2024 05:38:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1714999113; x=1715603913; 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=JRaulFrVbkjbtSZtw7OLq918oPDYvf4Hs2z9z8eLBTc=; b=gzmMQyf8Bi7+T1ssq1FFZpGVmwXjQ1SyOVcFtj44J9XMJ+lPD92ipdMRvjoh2dJq/E JqKatqH62UrNSivCLLeeuRRMKbEsDc/SYyGFuqyL5iybyUVQsnYgAcWn/1sMUdfHjCpP dxLZR/mX2rDS+61NzXaAfLUm/qsMhFP0QFJjXX1KmtphAgC8AOj2bAke3Zvt2F3fdltE iS3ck5A5Ud57MJXybtilKqnCyfz4Y2pQXqvMbxcbSXRqX1Lb6+k1q6in0GNEH/r2uMv+ sIyw+il1TdJxQCvs4GUlhuCBMXXjM0+ezFJ4Af1M9ebd8F/cQbDlG3ub7xAhwvhwMbTQ bmsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714999113; x=1715603913; 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=JRaulFrVbkjbtSZtw7OLq918oPDYvf4Hs2z9z8eLBTc=; b=D1rA7ev9YHMgdiix5plVHYyuZ39KUyjw92hG9olvANWU6MFiIv9QWC2dCOhBUZJYGC Z2HxT6LPetRyhT4ij+SEE8ZLRMUltp5tCDr5q7hIgvEYzRaUuZI1IV+5J5I4VmZek25D yh2nkhyR4RYcYaTdXZza4S9XE+OLZzmXF2pgugpS7BZs8oynpkHgBiUipSkdJheXCdZd 28wWDwMDqHKA3+e3Kd2IHzRxOMVkBEnIJ5qJDg0ZkBePA92WKdc9y1fO/qwlH1m5x415 R9mrXxwPdNTrSWSIvacmkAqe9iFhNOVs0qsIuzbStXsnY4pNmgn0nX4/J3VfDYfcFkIM TvZg== X-Gm-Message-State: AOJu0Yzs9t8+k7j858anM/h3EQ5Af//RitesmnAbw+0PNe6wWxGPxiKP YzegMukD3motPJT0nnvakgpknI7hq+NIvshizBcexssKkn3zpXdpeuSAB3q0dPGQCWEnKmgzvke n X-Received: by 2002:a5d:678b:0:b0:348:b435:273b with SMTP id v11-20020a5d678b000000b00348b435273bmr7293332wru.54.1714999113584; Mon, 06 May 2024 05:38:33 -0700 (PDT) Received: from m1x-phil.lan ([176.187.211.4]) by smtp.gmail.com with ESMTPSA id g4-20020a5d5404000000b0034ca136f0e9sm10605321wrv.88.2024.05.06.05.38.32 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 06 May 2024 05:38:33 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson Subject: [PULL 08/28] accel/tcg: Move user definition of cpu_interrupt() to user-exec.c Date: Mon, 6 May 2024 14:37:08 +0200 Message-ID: <20240506123728.65278-9-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240506123728.65278-1-philmd@linaro.org> References: <20240506123728.65278-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42d; envelope-from=philmd@linaro.org; helo=mail-wr1-x42d.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 Message-Id: <20240428221450.26460-4-philmd@linaro.org> --- 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 d34313a612..80d24540ed 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. */