From patchwork Fri May 3 12:25:22 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: 794371 Delivered-To: patch@linaro.org Received: by 2002:adf:a153:0:b0:34d:5089:5a9e with SMTP id r19csp707698wrr; Fri, 3 May 2024 05:26:41 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVccKI1T6J+LPOt+Dfm0YyLFYq7VrGreDrmr29cAX4VveFfSdvRLf8JXv4CZz+gkvDHjsh8Abni08/9TJxayaQE X-Google-Smtp-Source: AGHT+IET4tepd5bcncpo4OkTjQZVxYUyVPBj/6/xPQTNYyLHHwnaZhW70TM3bI0jXYZZtqLnMK6Z X-Received: by 2002:a05:620a:4689:b0:792:5b7a:ad58 with SMTP id bq9-20020a05620a468900b007925b7aad58mr3119936qkb.8.1714739201699; Fri, 03 May 2024 05:26:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1714739201; cv=none; d=google.com; s=arc-20160816; b=y6N+Vj6wRx5dwbL0OxwkCGZCWS/nej9UaI8fsw7VHHJ+8gyTJigVoFXZkauH7ZdBAo gIEEi0aGQOlTTXSRW6a4KHDAyuOt+bn/G7iwsul9kJLrWn6p1yEHYAxXJIjWBSNujtgX 5iqKuDrmZCa6S1NGXQEALAZEGuUR/xKMXh0+lwVFSTBjQL9d2ZleyORrJ4EgMau3ICDW mL7D8uoUDgbrXqfkdEl4eXcfrliLnY0DDIF+v43H6XYvj6nSSrJozNodfnbPqKmgQMvr MjNIAVT7M0/2H47KnCAxzG6sMEt9+EbeXhoyp5LKcIS0AH3O8aeTlfBwAw45xsQYJNn5 1Bcw== 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:message-id:date:subject:cc:to:from:dkim-signature; bh=+QGJqXeLI9zJ+dCJcjdAIgwiwSsVYyEzcO/p9kZSdPY=; fh=DZJlbf/fcs3mtFUrUulN1gktviBmxFwnIZKdtqXbJq8=; b=LydR9rCtScTF13cZUPjdKVglnG7i+qkR6UX/7UDBbjAuzMuWKyd/yg77SwgwVQ/1Tb VB4G3eIjlbfJQ8Y6K2NDD00UFCfwSWV5h0zFB4MnEJbuJKwNm1DUIA4yBS1/RBntkXKI 5dHT/1dnU8sqlZP12w7PBpLtnaSinB32hyetihNNOm78dLRprtxoDZTf6guadBdXVAm3 5J5EOjGN6Y2s/xkhNmgiHPXi95uGpf3a3UNX9Rm9SJ2PAXk5nmOOz/7skAIFekBVaoqB hTwTtzoiVh04d8Ow8gCgS/7uk45EYqe1lyFN4OT5IpxKdbFxBf9PmFsmNH1ApPeP1LVx eybQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ZnY588yn; 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 xy7-20020a05620a5dc700b00790f00be481si2953841qkn.551.2024.05.03.05.26.41 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 03 May 2024 05:26:41 -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=ZnY588yn; 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 1s2ryy-0006iq-De; Fri, 03 May 2024 08:25:45 -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 1s2ryp-0006hc-2T for qemu-devel@nongnu.org; Fri, 03 May 2024 08:25:35 -0400 Received: from mail-ed1-x529.google.com ([2a00:1450:4864:20::529]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s2rym-0000mj-1M for qemu-devel@nongnu.org; Fri, 03 May 2024 08:25:33 -0400 Received: by mail-ed1-x529.google.com with SMTP id 4fb4d7f45d1cf-5724e69780bso100319a12.0 for ; Fri, 03 May 2024 05:25:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1714739130; x=1715343930; darn=nongnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=+QGJqXeLI9zJ+dCJcjdAIgwiwSsVYyEzcO/p9kZSdPY=; b=ZnY588yneAvzsjAEzo9Se7UX8eP1pgTKMKjD2sInjC8uqw0zvB8fiCJYo6ta300Ozm ZiILfeSsG/ryBafOUNP1IWrCG+MvURXztBYVAdkJxhEdgWukyxlANfXOqx0FCKfb1VaN TY+8+ulY3PIVfnBUb0FUNoItDh/8Wy2kOAgadpVvbdAglqfvQX9a50fNleNbDwkJYl60 mO+jYbEk3Sx0IYULHCvDsbCGTWu5K9AdBn4FbF64crjjJbMkkfNGPEWVoFKjKRmJG+EJ wAzxlTzJscNHXAyZpTw/SdSboEQx0gHVXBHKzq0TUjgVQ/yeHVhNYOJ+Hi6MfN4lSbED 7HWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714739130; x=1715343930; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=+QGJqXeLI9zJ+dCJcjdAIgwiwSsVYyEzcO/p9kZSdPY=; b=K33iKH46s4CjDXKRuIt0G3RVP6fZexNA8Vq1eYasCOP6MAvwUnTtLETvTZjIh6iahX dDgsSo9FIhs6dohIsrWKaxfSixBGRDcCr7CwMJrPMsAGRGyDxfPBpM89LR5/pm7p029w DRC08l+YkfwORZAy6XMyyVoX+XYyBTrrV8TvLWhz3ZWe03QQb2JnRGD0yiMeM2IqkiLd Y+nyPpL3DoBrcDfABFTI6TUaqQwDct2ezmsDcNOPEaDi8Pqfj+HRqUUJM/S6Jp9Ql0ox nSOEBS8Qn9uZTITE0BhaZnzDjKUbLLUmX6Kyv5Mya+TMYiAGc6l3UcwfT1UHPInoN+1h 8z3Q== X-Gm-Message-State: AOJu0YyhXI8mVzlnNW3Uy4qJ2WYKbpYbJvw6ourWUMZO3W0qnkeTX4Es czNvau4x1lg+d1CNnCBPqpaSm/v3BRgxUbKZUtOSRiLRMbyFzwKFq6XaU2spiqYPQQEJGltl+R9 N X-Received: by 2002:a50:ab5e:0:b0:570:1de6:8a2d with SMTP id t30-20020a50ab5e000000b005701de68a2dmr1499368edc.10.1714739129513; Fri, 03 May 2024 05:25:29 -0700 (PDT) Received: from m1x-phil.lan ([176.176.179.187]) by smtp.gmail.com with ESMTPSA id t17-20020a05640203d100b00572c15aba54sm1615099edw.17.2024.05.03.05.25.28 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 03 May 2024 05:25:29 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Laurent Vivier , Richard Henderson , Kyle Evans , Ilya Leoshkevich , Warner Losh , Paolo Bonzini , Riku Voipio , Philippe =?unknown-8bit?q?Mathieu-Daud=C3?= =?unknown-8bit?q?=A9?= Subject: [PATCH v2 0/4] accel/tcg: Call tcg_flush_jmp_cache() again when creating user-mode cpu Date: Fri, 3 May 2024 14:25:22 +0200 Message-ID: <20240503122526.28312-1-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::529; envelope-from=philmd@linaro.org; helo=mail-ed1-x529.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 Since v1: - Dropped patch #1 (use meson subdir_done) Fix a bug introduced during a refactor in commit bb6cf6f016 ("accel/tcg: Factor tcg_cpu_reset_hold() out"), affecting user emulation. (cpu_reset is called during thread creation, after cpu_realize). This issue was noticed by Ilya when running WASM: https://lore.kernel.org/qemu-devel/20221027141856.w5umjgklawgu7pqv@heavy/ Philippe Mathieu-Daudé (4): accel/tcg: Move system emulation files under sysemu/ subdirectory accel/tcg: Do not define cpu_exec_reset_hold() as stub accel/tcg: Introduce common tcg_exec_cpu_reset_hold() method accel/tcg: Always call tcg_flush_jmp_cache() on reset accel/tcg/internal-common.h | 2 ++ accel/tcg/{ => sysemu}/tcg-accel-ops-icount.h | 0 accel/tcg/{ => sysemu}/tcg-accel-ops-mttcg.h | 0 accel/tcg/{ => sysemu}/tcg-accel-ops-rr.h | 0 accel/tcg/{ => sysemu}/tcg-accel-ops.h | 0 accel/tcg/cpu-exec.c | 6 ++++++ accel/tcg/{ => sysemu}/icount-common.c | 0 accel/tcg/{ => sysemu}/monitor.c | 4 ++-- accel/tcg/{ => sysemu}/tcg-accel-ops-icount.c | 0 accel/tcg/{ => sysemu}/tcg-accel-ops-mttcg.c | 0 accel/tcg/{ => sysemu}/tcg-accel-ops-rr.c | 0 accel/tcg/{ => sysemu}/tcg-accel-ops.c | 5 ++--- accel/tcg/translate-all.c | 5 ----- accel/tcg/user-exec-stub.c | 4 ---- accel/tcg/user-exec.c | 5 +++++ accel/tcg/meson.build | 14 ++------------ accel/tcg/sysemu/meson.build | 11 +++++++++++ 17 files changed, 30 insertions(+), 26 deletions(-) rename accel/tcg/{ => sysemu}/tcg-accel-ops-icount.h (100%) rename accel/tcg/{ => sysemu}/tcg-accel-ops-mttcg.h (100%) rename accel/tcg/{ => sysemu}/tcg-accel-ops-rr.h (100%) rename accel/tcg/{ => sysemu}/tcg-accel-ops.h (100%) rename accel/tcg/{ => sysemu}/icount-common.c (100%) rename accel/tcg/{ => sysemu}/monitor.c (99%) rename accel/tcg/{ => sysemu}/tcg-accel-ops-icount.c (100%) rename accel/tcg/{ => sysemu}/tcg-accel-ops-mttcg.c (100%) rename accel/tcg/{ => sysemu}/tcg-accel-ops-rr.c (100%) rename accel/tcg/{ => sysemu}/tcg-accel-ops.c (99%) create mode 100644 accel/tcg/sysemu/meson.build