From patchwork Fri May 3 09:16:52 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: 794364 Delivered-To: patch@linaro.org Received: by 2002:adf:a153:0:b0:34d:5089:5a9e with SMTP id r19csp642395wrr; Fri, 3 May 2024 02:18:15 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWmA1lH6P+oAlTd5WfrXK31qCBqUHbsUSxjMKKP0gxPSuSnIsQ5zWcSL5dkE52fOy736lHTzPzfjCCBgi9OVBGg X-Google-Smtp-Source: AGHT+IEaRN43eYKTD7MpR/aapFaf9hLnul4DfBDUSwHCAKQq/CSDiB6Q+1PQrbX5UUR6am4nSzVA X-Received: by 2002:a05:6808:1492:b0:3c8:533d:3e9c with SMTP id e18-20020a056808149200b003c8533d3e9cmr2974410oiw.13.1714727894762; Fri, 03 May 2024 02:18:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1714727894; cv=none; d=google.com; s=arc-20160816; b=vnWUllvrX/hCyjFrquP1Tt3nby/yPANL1ufH1ooWaV4bfJ8rlCGWuokYZysg9/wYU7 ptXoc1qXZ8sqtadxx8/uLyWo1HGeTrEfM5lRE3usTqXExsvRMOopQVe3bvCUOarxEg5e s+P8XEdfaD5GJMZdjcqBmTbb6aSKi6hPPwL3qCK/nAos7YgIyxvsVW5Li53q28xQsYq8 o+hf6JisO+ySVNljSomlpdu17XPykblZQsZYxMRl+MqwkYig8ncdmgpCQyVqsZsS0Unr kvHJHyG4JAho4cHmdqu4/kjagzGp4A7LiWOb8MJVOqjEeax7ud+G7ScrJ+cUa3Yvn8Y7 R8Dg== 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=yl6x5TNVIiFHXaloR61Gq9ATfnGpsXhp0BH5/fRaU48=; fh=Gs+dtyQ6RoMdiOX4oOfsCzT2ito4ezjqjs2WJre+W34=; b=kgdmKDDpVytbtJuugTOR2i236fKWxNpLhum8C+QyDFDSMKCg2+Y+A1ulpZoqicmD5r IieDjrRdO4d0IyC6Q7+eJaSlS7PglShq/7ySAiQR64kWfJuJhSl/79DY5g2iWOshLVIf odoAu4ywYneNzeCAS61X2K2Woex6Jp2fwiLHApqtKLLhDgIwuUyzgZixbSwjGgCnWzHW kj0Lm54aoPkv8QiGgkjEfWzBHIFTa5tokez7xDF3c7rrcQReG9ZFCx5P6GqxEHDgpIzr 5Vsjf7QvQOvmgvKhEDyLctAb/sl057jWD/qWuJSg+cALhBVfhjDUs4SNs3mKUn38xjVN 2WVw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="ySw+uFL/"; 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 pe10-20020a05620a850a00b0078efd19f31bsi2613966qkn.645.2024.05.03.02.18.14 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 03 May 2024 02:18:14 -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="ySw+uFL/"; 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 1s2p2U-0001gB-Ta; Fri, 03 May 2024 05:17:11 -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 1s2p2O-0001fK-Ho for qemu-devel@nongnu.org; Fri, 03 May 2024 05:17:06 -0400 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s2p2M-0003U6-Ny for qemu-devel@nongnu.org; Fri, 03 May 2024 05:17:04 -0400 Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-41bab13ca4eso47912495e9.1 for ; Fri, 03 May 2024 02:17:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1714727820; x=1715332620; 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=yl6x5TNVIiFHXaloR61Gq9ATfnGpsXhp0BH5/fRaU48=; b=ySw+uFL/SFgH3WL1/+/frh5YKBL3v0+EDAcsoLUAK0ilWUCXBq5RCseZyZ+tMGfhVl uTFV9jl+COZSG964DwT6XPyrVW1VLvuCsan8W+MwHfjccGSQ1nVH8HEwad9Kc8n/MYyj zYyTAceXLZs3kSnJGk32A9jpIQpcRqllMpOqMsdUFVGJTsFvj19cm0KGUWHokMFLpcw2 i5PkEnmJs+4/rXOSGOjkbH74IFCjjLL0f/Wz68hMXEYt++KxPJPGZ/dM1Pk73i+3cQu8 JkbwKTfiOsrG0yxeWPCJxU4lZTXJgonJ+Q0gZigYnT1LNjqEEZHFzZvirKRNThU3Kp8p IP0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714727820; x=1715332620; 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=yl6x5TNVIiFHXaloR61Gq9ATfnGpsXhp0BH5/fRaU48=; b=mDtPcCwRJ3lsfb6/JdBSX0NIcA+9gNXgvG8EAEJgT5tvLs1IMkjJ7992/PY/XHDVrt iD7HJan5yj7Jsh0qevIWS9QF8NF8uQ2V1hUp9BOTihSwWRNxL+DH6KxP1CxCKgnd225n IZb/zcmFCe/QkKFiK5ix40bNntEUi3vtm5fIoocrVAWS0oyza6aZKP5oESXrOPcf9L1K CFx21mNrScDH4v2x7JjcNNuvVnVmIqFwWWPUz7F49jbPf1afgGnfBDbKrszc5ajMtyYM +nzOUkvtg2b7vSg/KjKYIVByfsrw8bmL40QcCwVw/+/rrmnVQeqWIr3F1V0t6f50I4SP IJIA== X-Gm-Message-State: AOJu0YwOwFtd3VqVvJ16TJjbc9WfS6jMtUyPdsh0ifYZeKLSP1XEjRCu pQ6krD2CyZJQj/E/q6eu2TqUaRYHn+d9rniS+5QAtkfyQR8qzwcjN2UQM2b3qxP8YIQu/8q/I+B G X-Received: by 2002:a05:600c:3b8c:b0:41c:13f6:206a with SMTP id n12-20020a05600c3b8c00b0041c13f6206amr1873965wms.7.1714727820376; Fri, 03 May 2024 02:17:00 -0700 (PDT) Received: from m1x-phil.lan ([176.176.179.187]) by smtp.gmail.com with ESMTPSA id z5-20020a05600c0a0500b0041bd85cd3f2sm4911131wmp.19.2024.05.03.02.16.59 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 03 May 2024 02:16:59 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Warner Losh , Paolo Bonzini , Laurent Vivier , Riku Voipio , Kyle Evans , Ilya Leoshkevich , Richard Henderson , Philippe =?unknown-8bit?q?Mathieu-Daud=C3=A9?= Subject: [PATCH 0/5] accel/tcg: Call tcg_flush_jmp_cache() again when creating user-mode cpu Date: Fri, 3 May 2024 11:16:52 +0200 Message-ID: <20240503091657.26468-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::32e; envelope-from=philmd@linaro.org; helo=mail-wm1-x32e.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 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: Simplify meson.build using subdir_done() 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 | 30 +++++++------------ accel/tcg/sysemu/meson.build | 11 +++++++ 17 files changed, 39 insertions(+), 33 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