From patchwork Fri May 3 12:34:51 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: 794374 Delivered-To: patch@linaro.org Received: by 2002:adf:a153:0:b0:34d:5089:5a9e with SMTP id r19csp711372wrr; Fri, 3 May 2024 05:35:22 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCV8KV1VSMTE6Ku9YmT0bYXnl7QsruL9UHnNgFgyrEUz3KyM6lWi1JVWsHk+Ikq43X6E/Fh/ns1roPREp6dd35oV X-Google-Smtp-Source: AGHT+IHh75VD51bxHYg+wz7EZ7tYe5TaUZGs1CkHWOwGOyRpD5OrO3JgC/bFMXLVTzY6TTg5tBno X-Received: by 2002:a05:6870:72c8:b0:23c:b686:cf7 with SMTP id o8-20020a05687072c800b0023cb6860cf7mr2696988oak.18.1714739722352; Fri, 03 May 2024 05:35:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1714739722; cv=none; d=google.com; s=arc-20160816; b=wWOegY5AxJxvqLDuU3ln2E1r4iSh5fMOFzG3//uGLnOYfqMfB+U+nFbBod4Ef5TDJ8 YplLJzi7+c/eSWKh+th3TbQyZaA69//l2oQHBwCpYagILWwiyQvjUBwMUa15LO7t8hGE G3+F70HRn4sd94OuPd9FaqyljVj23dnjp7+KSu57jKls47ArZDnz3vAiFTRTx7H/uyXp XiROgfi9U8HEO1qGJp9LbEm5f42AH5UMPSDTLF0b6gBCJfqbQlBRF/J19zP8JvCjzunp CH8t5GSHvLXCgnUmlEslwHA1++VDkTos5vbu7Mj9Qewb5UbGom3nL0CEhIjJdMWXZ0Mq e2HA== 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=qqRJ8eeBmJ9DTjfEd9O3LsfL/F2mnryvwkwenTeFSg8=; fh=1LOks1+a2pbmhjpmYkjDmYZeNap11K9+ATBKJvLS2aE=; b=KS0GuL/2C+UScqwrygvhoTi8MSadjdn88kS0889zriRIkwL0ZQovA4tWsLOPfCH13/ ydgNAZS/A+zAAVZrhw9TOuvggxj7iX0+/FSDUDAgCEemwn+iWI2TTPPBy1Gb8xpCPnHO Xt0tCTiV2dxVT4K4AzXph/OZFaoWHn/9e0j6caweM8lpelkztH1PoB3xVIsU5eyQq5kr 37a1MzbdzAxAt5OYa732ndsrX+zx+nhZ0rj66p0SAlSmqhpuEmO4TUxwdh5H2HC8nTCo V29vYweowx0y4X9iYlziws13WIOXK/CHtCBxbLdhpVz2uiytQ1HmG6tNzeztRBfWHkoq yJ1g==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=AEfjwRUL; 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 wm20-20020a05620a581400b0078d5fd6acf3si3092786qkn.403.2024.05.03.05.35.22 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 03 May 2024 05:35:22 -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=AEfjwRUL; 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 1s2s82-0007Br-SM; Fri, 03 May 2024 08:35: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 1s2s80-0007BY-Q2 for qemu-devel@nongnu.org; Fri, 03 May 2024 08:35:05 -0400 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s2s7x-0002mu-Ux for qemu-devel@nongnu.org; Fri, 03 May 2024 08:35:03 -0400 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-41b4ff362a8so84755055e9.0 for ; Fri, 03 May 2024 05:35:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1714739700; x=1715344500; 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=qqRJ8eeBmJ9DTjfEd9O3LsfL/F2mnryvwkwenTeFSg8=; b=AEfjwRULGyoT68QBorfmftXvVDXt8jM0fdkjXoSCOhAhEt2D7tN7NHptZ93gxSNTAZ IQxwdFwZiyFXCTFOQ61VJqwevz9+zGM+Up8D7isAFXt5RpyTHQFQtD/g7uIgoPw7SfUa C4b295SBm5y2HUzrf2rGjYKC+TZjbvCDvyT7sFE0yTmF8X6dAYkAOdXTLAf31G7HWW9F 27DMob88CSVKagr1/H0fIpxGunD4rg6WmTNdSLfsyVIHmO8FGSnEmRYateD7Ju+Iszau hDvJw2KbA3bJCa9A3Q5MoSE2a6HMPQYB7XjO70zXwUkZ0R/tqwkE60qqQ5SfhRqViVGg ZOhg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714739700; x=1715344500; 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=qqRJ8eeBmJ9DTjfEd9O3LsfL/F2mnryvwkwenTeFSg8=; b=RgC2xHDRR5Y3qoraVWzXgz97aNoQi7yUv6BI4fRgTG+gVUJWf1Ju78nZgPkhjGi7ij JPzrlFQfNaRUJIPPSEftJl/noVR0JMJt8NmhrhEqoVy91bHsDsPKwSKFnUYh0Y8bewj/ S6atZwnO4FE+f80zlFkEXV6NTKmWh4MsNUEYwYyVAR4if4Twoyd8lnM6J8LL7a1gPU7i R71jO42uZzsHT6lDjkGNGprAMxoDaekZMuOmVj97mjIzJq4Kee0kbf0VbhwyajAD/N22 FAX118QNGaNFQRBJjLzgLpzzdKFm3KOPlmL/apCiFNeRiR34lK2KRRJNuVmWuQQv546c HKow== X-Gm-Message-State: AOJu0YyP83NFiDacGCaksosThSN7MsheyLAJfpMLA/4Cr7zuyw2YHB3t 8yk1hRmxmEJC+lHXIRiPvd/6Ql9G/IkArwdIOl/5rLvb0bsX2hieGgcoZXu//GGWDxggW5lr9sC 7 X-Received: by 2002:a05:600c:3846:b0:41b:f116:8868 with SMTP id s6-20020a05600c384600b0041bf1168868mr2670578wmr.12.1714739699702; Fri, 03 May 2024 05:34:59 -0700 (PDT) Received: from m1x-phil.lan ([176.176.179.187]) by smtp.gmail.com with ESMTPSA id n20-20020a05600c501400b0041aa79f27a0sm5502229wmr.38.2024.05.03.05.34.58 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 03 May 2024 05:34:59 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Paolo Bonzini , Warner Losh , Richard Henderson , Kyle Evans , Ilya Leoshkevich , Riku Voipio , Laurent Vivier , Philippe =?unknown-8bit?q?Mathieu-Daud=C3=A9?= Subject: [PATCH v3 0/5] accel/tcg: Call tcg_flush_jmp_cache() again when creating user-mode cpu Date: Fri, 3 May 2024 14:34:51 +0200 Message-ID: <20240503123456.28866-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::32a; envelope-from=philmd@linaro.org; helo=mail-wm1-x32a.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 v2: - Introduce softmmu_specific_ss[] - Fix broken rebased meson in patch 2 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é (5): accel/tcg: Move SoftMMU specific units to softmmu_specific_ss[] 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 | 17 ++++------------- accel/tcg/sysemu/meson.build | 11 +++++++++++ 17 files changed, 32 insertions(+), 27 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