From nobody Mon Feb 9 19:43:05 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1770373709; cv=none; d=zohomail.com; s=zohoarc; b=lmw8Bb/CgfxcnBEY/D+Kik/pzKqmRpgyAHdR9pgfUbOkZ27AroRbJAZvPLgozyR60grJZ68poTxuadtK38/Dtvbr9gquz/oi1HtSEvK/l9/FPhzKpNswPrylA0DRtQeI3zSZlZyGaJeRZAr2evMKfUl5qzWsph6wWRjoaee9Iec= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1770373709; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=fla6h4jLdKMGrrPAOvpc4PjnowUXEERvnLV1L7DC1cc=; b=KpBMPmdHK7mC3tfxuBuyi07Yx1i8VLvKP0jAIbx12Ft84ZgD7FatYWZ/T34EWVBmvmy7kQ9x772XZI3O/8hMUNKkXoUZTA0xwDMa6rTnjm2FqFLEWcw6iHSaU7TyugNcrYrzwwrC6qEhhC3sd/7u5cH3H8nHJSLHEWYto5j+o7Q= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1770373709337731.9419306281487; Fri, 6 Feb 2026 02:28:29 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1voJ3K-0001Qp-1Q; Fri, 06 Feb 2026 05:27:06 -0500 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 1voJ3I-0001QC-8d for qemu-devel@nongnu.org; Fri, 06 Feb 2026 05:27:04 -0500 Received: from mail-pf1-x444.google.com ([2607:f8b0:4864:20::444]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1voJ3G-0007Rr-Pm for qemu-devel@nongnu.org; Fri, 06 Feb 2026 05:27:04 -0500 Received: by mail-pf1-x444.google.com with SMTP id d2e1a72fcca58-81f47610542so1400965b3a.0 for ; Fri, 06 Feb 2026 02:27:02 -0800 (PST) Received: from stoup.. (bg30dhzpdc341w7g29yn.ip6.superloop.au. [2401:d002:dc0f:2100:1ced:e57b:71bf:567a]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-354b1f49191sm2113723a91.7.2026.02.06.02.26.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Feb 2026 02:27:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1770373621; x=1770978421; 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=fla6h4jLdKMGrrPAOvpc4PjnowUXEERvnLV1L7DC1cc=; b=j9Oj0ZGf7AvnUZXuEOeaVwcrcCZqpkckZDHDn6XiJAJvqzCvZ6rIkZKgg9abkXge1N BOaUsRyPr0+W/0kJ5AfET6LCVPsTvDhy3/nL/cRpps/tQPXEsTLghXCs4vGTK3QEEEwW XyWot2+PEeaF94O+XmGTTrsYmfbnzYXmDg+jEOkgOpDDju3fJH4kM8y0ppJ/bcA1UZvp JI9iUwUL6vAyxlL5Dxb+IBTLd1XeRAadKF3JQV1r5Ws5Wgtrvc+I7FV9vCBfEM1Q/JEg x/CLMQhEMhVg9hCn4M0JME/qqHSY+ume42/4zI2JOxsrh7i1nMUcwMLbA9YsjSlk2PSm a2nA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770373621; x=1770978421; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=fla6h4jLdKMGrrPAOvpc4PjnowUXEERvnLV1L7DC1cc=; b=jNqc+AT6GONhT5j+ENg3zgQQTGH4g5gFimBiNb5jVL8BsXshX3QSm6fpTWzfqpNTl7 7bE6Zo+mMk2rlRYx8IOooYDe4qiUpBI2jpJGAyHnOLNGzyZmr8golN6OzxeOi8IkkBv1 +97BNZ/q6Go7t9mO9+Zpc93E5t7hbedvI66326AT6ASGP+CEerppTN0NgP1dKpFqQLx7 XLZcXw/1orRH4A36nqNXlJpjq3CPhyIVKgY0YjWNpW+1nyqJFxKWr0lJCj3XHkslwC1e u1LvvxShCM7gRXdl8Gf5QpoRGRniwo7Po8zSQvcVup8+zKc/UIPv+DbhgHuGNL1FmGKc aHNw== X-Gm-Message-State: AOJu0YyYrNYdr9dvxqqG5IxAPzxCu8a7ds1hktntWP1MITPG+RXw7XxV EQNdzLpKKU/Z/GfRU0Z0+r3axUXEeKk5u1FuAO1gPWt+4ZfNV50e4pQcVwCy9FCuC7B2EVzzuWk /CUgwL/QLYBCi X-Gm-Gg: AZuq6aIglIjzgev3Zd/2heFWoqoV1qVKBvnB0EVo6xbl1gX26vaWDpSHrPWCP6wOxCO 5k1IyXt5mxVnUzIJgeYv3idn7dKZuXCm/Un43K3yH4mLOtvsuxSt6w7GhNjR7MAZ2XiuEG7bDtL 0LZ5Hnmw+KU+kNQYmrOSuTCbCTimh3UdyXwPllGG3CutkKp6THMiAGlE3MCMGkEamn855W2Xv6h tsJQ0+eBaE31vUYkk54BS821/5Tcp+VGoX2B3MMa3ds5qdvx5Reb1NjknQ61LiHO5wHcv7V64OW ql8djSOD4rkYy0bHlWS01R0bemjF0d21Lct84bdQAp7Pi4S2/f8ecdlHVSIl2YCOlETZ9+TO1XX sK4qQIGgReE30eEpzb2JZJ5MOV7oCA/e9cm9/B0317OmPCfNBbd2xGPiD2DcDkycZB/zw2zR2zu aj0OdeyMUMS/pCCwjE2Wkah9aiFMjczO/gDwiZRMJ1owi7X4AGD8UeankzmPu6Fx8= X-Received: by 2002:a05:6a20:cf8b:b0:341:9db0:61f1 with SMTP id adf61e73a8af0-393aeea9e25mr1994654637.16.1770373621174; Fri, 06 Feb 2026 02:27:01 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PULL 1/5] accel/tcg: Don't pass NULL to get_page_addr_code_hostp Date: Fri, 6 Feb 2026 20:26:48 +1000 Message-ID: <20260206102652.164018-2-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260206102652.164018-1-richard.henderson@linaro.org> References: <20260206102652.164018-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::444; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x444.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: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1770373711405154100 Pass a dummy variable instead to let the value be discarded, in preparation for making the argument mandatory. Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Richard Henderson --- accel/tcg/internal-common.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/accel/tcg/internal-common.h b/accel/tcg/internal-common.h index 6adfeefe13..0ca13750f9 100644 --- a/accel/tcg/internal-common.h +++ b/accel/tcg/internal-common.h @@ -105,7 +105,8 @@ tb_page_addr_t get_page_addr_code_hostp(CPUArchState *e= nv, vaddr addr, static inline tb_page_addr_t get_page_addr_code(CPUArchState *env, vaddr addr) { - return get_page_addr_code_hostp(env, addr, NULL); + void *discard; + return get_page_addr_code_hostp(env, addr, &discard); } =20 /* --=20 2.43.0 From nobody Mon Feb 9 19:43:05 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1770373703; cv=none; d=zohomail.com; s=zohoarc; b=UNckGvoBwe/1M6OgVAiWSYxSdCIpUfv9CDAxNtJSMF6bIW0Kgl1ss6f0iFWwqjOvD5szfnJDNKDOsjapYh6/tq6tWkOWCGR71fGfYyYxYhWWf1ONZ/0J65vaZibBDYO7b+yzv6Eyyn6EDX+rlkt8QX7ntgrz1lgQNrRTPbfMJ70= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1770373703; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=w5B1mc9lktFkVX/c3UPr0j4SoEehm7jwPppWo5HwW/0=; b=blptRyhwZvs5DVgYoNgDJNFtBNW90fwMmNBXHNgA13rU37jc5miJpTAlL961Js3zxc/t/Al8ZrE5LCFudKy3W0zr+f1KmAZh6aoEI6nrAodggZp/yZMQrel1wLYLfCjpEZ3roUo33wChSHr5lK9IJmRRRreMVKStWWBOo1uQGs0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1770373703481830.4326965187461; Fri, 6 Feb 2026 02:28:23 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1voJ3N-0001RC-UZ; Fri, 06 Feb 2026 05:27:10 -0500 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 1voJ3K-0001Qw-Mi for qemu-devel@nongnu.org; Fri, 06 Feb 2026 05:27:06 -0500 Received: from mail-pf1-x430.google.com ([2607:f8b0:4864:20::430]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1voJ3J-0007S7-56 for qemu-devel@nongnu.org; Fri, 06 Feb 2026 05:27:06 -0500 Received: by mail-pf1-x430.google.com with SMTP id d2e1a72fcca58-8217f2ad01eso1716662b3a.2 for ; Fri, 06 Feb 2026 02:27:04 -0800 (PST) Received: from stoup.. (bg30dhzpdc341w7g29yn.ip6.superloop.au. [2401:d002:dc0f:2100:1ced:e57b:71bf:567a]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-354b1f49191sm2113723a91.7.2026.02.06.02.27.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Feb 2026 02:27:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1770373624; x=1770978424; 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=w5B1mc9lktFkVX/c3UPr0j4SoEehm7jwPppWo5HwW/0=; b=GWHt9I51S41EAx4Zr4FJoDX2R2Ruxx+QQI87VJxbaF3186wDJNcLJI6OlBZrTwK7ui jAODJgJwRsgajisKM54DR41jdY1L4rSBiWaXzgsDyU3yuiw7Spk6J90Vn2Qw9CrcSqr5 0JFilg7EsNkns6+BgIcW8nEuxuq7KGOS7dgqkfYDnuTsYBOzGQd6ZlzQlQTJ/9oKEiuN KsYBN3PQbLGwSqqN0LnIUXwlMxQ6wDdH4Mb2xn/IepHoLsXOrZGXz18qXU3+i0N4n9Qk 9uQWyUb1+NPaKGxO/kczJ21OhRJQRK2uyABaxwnI4biOX+zfb0JlkZM9wY64aeukm1S/ WErQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770373624; x=1770978424; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=w5B1mc9lktFkVX/c3UPr0j4SoEehm7jwPppWo5HwW/0=; b=vkEBtOA1gFUrcmhY+ipXaY325a+eyede8vE/dVK4FJULalj0/A7jvss5lI43Dpi7bl oOfXVzdagiriKX3KbJcp1WgIKwngmMXKN6183+nmqDKEdQJCoZvAKlTDJLQFTfutqc9f t/LxCQrezWgZ9dDwy45MPVd8giIgKPfreJz8uFclCGh80C2pWUc+4WqGBrpGuLRk1pGp XL2XrRQnSn9OkSaqJEp94xOCrcQJ1v5xN7/2aKej2VtLhVpHJ8qEIQ27qukPWM+B1oJ6 y8YwD6O1fXuBwSinb7p3pDDvTvoXPjcS8yBTr0DikT3ypiQpkcpwp1xR1loz2oJMYJ60 ld7w== X-Gm-Message-State: AOJu0YyblNtKKQl03mBEJIIv31TfXTNwSguzRNWnPaImDyrZKUAEpGc1 ZJyOLxi4dGPAfNewYxmZuE3uInD8vE8bBUWt0xgcy+QUGtSo1vQxyHa3URLD/IUoSx2nRu9YwCw zLLNT4Wl0lg== X-Gm-Gg: AZuq6aKE0XpXQ/9zo+FZ6b1XZqE19TMnLQog+/6P8vmxxwGOBHtPTVZwEv+CsG+cfAT +HRGmtNk1wrn2Xo1QOzm+MPpMv8vSK/hI3xHeuSqidV8wCcs6PCX/haB0PCzyWKDaN74tCNecnc nMpbCIm6n/5YCCsy70Hv0TNnqZQQNpVmo5eCcOM59WhGG9nRMKPF8guAnczZWF6d6XGTqfjg5rG B/cSaCJEu5Equ/RPwygahznIWItiNKPNyDbxzdSd0UaGq36xxIkP2eAktUx3Q2dq6DQ/7wM4y+o cldTLF9lmbH2EhF1U9ZHkMr0xcDtZGAZIBPV1dnbms+Gcwy2fFRCpsQSOn3OpnjsygsHbI1DIEJ yOmfqWhjwnnTsZMLQiuXBPstHkS0XuA286RW3cH2kuKkNALUstD/d37Foq2N2YvfRSuuIxTDXTQ Qt51zLz7pRAe/g02rNfpZFiQayN8xUXC5jLq/oNvwHjYvxwUSJpayyLPDZRjmH5rI= X-Received: by 2002:a05:6a20:d80d:b0:363:cb5a:61 with SMTP id adf61e73a8af0-393ad01c843mr2550569637.27.1770373623613; Fri, 06 Feb 2026 02:27:03 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Panda Jiang <3160104094@zju.edu.cn>, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PULL 2/5] accel/tcg: Fix uninitialized hostp in get_page_addr_code_hostp Date: Fri, 6 Feb 2026 20:26:49 +1000 Message-ID: <20260206102652.164018-3-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260206102652.164018-1-richard.henderson@linaro.org> References: <20260206102652.164018-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::430; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x430.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: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1770373705612154100 This uninitialized value violates the contract in the documentation comment, and may lead to a SEGV during translaton with -d in_asm. Change the documentation to disallow hostp NULL. Pass hostp to probe_access_internal directly. Reported-by: Panda Jiang <3160104094@zju.edu.cn> Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Richard Henderson --- accel/tcg/internal-common.h | 2 +- accel/tcg/cputlb.c | 8 ++++---- accel/tcg/user-exec.c | 4 +--- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/accel/tcg/internal-common.h b/accel/tcg/internal-common.h index 0ca13750f9..9e7be2d78d 100644 --- a/accel/tcg/internal-common.h +++ b/accel/tcg/internal-common.h @@ -82,7 +82,7 @@ void tb_check_watchpoint(CPUState *cpu, uintptr_t retaddr= ); * See get_page_addr_code() (full-system version) for documentation on the * return value. * - * Sets *@hostp (when @hostp is non-NULL) as follows. + * Sets *@hostp as follows. * If the return value is -1, sets *@hostp to NULL. Otherwise, sets *@hostp * to the host address where @addr's content is kept. * diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c index 76546c6651..3d75abbe68 100644 --- a/accel/tcg/cputlb.c +++ b/accel/tcg/cputlb.c @@ -1545,18 +1545,18 @@ tb_page_addr_t get_page_addr_code_hostp(CPUArchStat= e *env, vaddr addr, =20 (void)probe_access_internal(env_cpu(env), addr, 1, MMU_INST_FETCH, cpu_mmu_index(env_cpu(env), true), false, - &p, &full, 0, false); + hostp, &full, 0, false); + + p =3D *hostp; if (p =3D=3D NULL) { return -1; } =20 if (full->lg_page_size < TARGET_PAGE_BITS) { + *hostp =3D NULL; return -1; } =20 - if (hostp) { - *hostp =3D p; - } return qemu_ram_addr_from_host_nofail(p); } =20 diff --git a/accel/tcg/user-exec.c b/accel/tcg/user-exec.c index ddbdc0432d..f8b4a26711 100644 --- a/accel/tcg/user-exec.c +++ b/accel/tcg/user-exec.c @@ -822,9 +822,7 @@ tb_page_addr_t get_page_addr_code_hostp(CPUArchState *e= nv, vaddr addr, flags =3D probe_access_internal(env, addr, 1, MMU_INST_FETCH, false, 0= ); g_assert(flags =3D=3D 0); =20 - if (hostp) { - *hostp =3D g2h_untagged(addr); - } + *hostp =3D g2h_untagged(addr); return addr; } =20 --=20 2.43.0 From nobody Mon Feb 9 19:43:05 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1770373666; cv=none; d=zohomail.com; s=zohoarc; b=Nzstc8Rp1zRyEkpVwRLRSmkCyhbT4glTkxCBCZOZQQI3tr5sMQ+fyrIqxNdjUyHbbJzYx6ep700+kXvKt0hsENvcNt5irxsN/WDNY5SbrZretzpC/jnrODL6ZuFyTIUFCSeECRAfyjPhbgAYspJ7qE634HYmH8T5JPo25YEds2M= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1770373666; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=RH3cLAMiAOc5SS6FZ+P7B8pmgCY7JMOLIwxKd4xRODc=; b=bah3S0J0XrbKalt1KTc5Crt8rBTXW+ZEheYsRxrFVntQQIJqNI8tXmLjP6AfPyJUWVSnvkdDlnWAGNmLSR8sxQESY5RkiOkGaBhcfRsrpGYfNm854GvA4nJOvGn4Y6CkSSehTEsAR/+lY1Tu8jE1/NZYLjL/zfmUsqwz0hjq3DU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1770373666491320.19724952195384; Fri, 6 Feb 2026 02:27:46 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1voJ3U-0001SC-R7; Fri, 06 Feb 2026 05:27:18 -0500 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 1voJ3N-0001RG-0x for qemu-devel@nongnu.org; Fri, 06 Feb 2026 05:27:09 -0500 Received: from mail-pj1-x102d.google.com ([2607:f8b0:4864:20::102d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1voJ3L-0007SG-Aq for qemu-devel@nongnu.org; Fri, 06 Feb 2026 05:27:08 -0500 Received: by mail-pj1-x102d.google.com with SMTP id 98e67ed59e1d1-3532aa9a77eso898665a91.0 for ; Fri, 06 Feb 2026 02:27:06 -0800 (PST) Received: from stoup.. (bg30dhzpdc341w7g29yn.ip6.superloop.au. [2401:d002:dc0f:2100:1ced:e57b:71bf:567a]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-354b1f49191sm2113723a91.7.2026.02.06.02.27.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Feb 2026 02:27:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1770373626; x=1770978426; 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=RH3cLAMiAOc5SS6FZ+P7B8pmgCY7JMOLIwxKd4xRODc=; b=NwdYRRjIObIftKSdhT++7uLFB+SyQ0jwCiP8xxAsxeJr8XlcyJeAmq1RwTmhDXM/mY wZ+FjJJUfXzIbTZ0qRlOw2IHGzi5jsRB+A1RJrFiWmV3tJkuzLzXaxl8b/JLX0csTyt0 xMSDtvA6NEkT3dSwXpKzqNdKrLFgZk1zWzKBEeop0LbNLIntvCeSyfo7YBaodR/kqTZt ej2sfXPq7qa4wu4K9H74i+rKSUaf7S6Z+hjXRc5l3cidQCXjQFmsGPu0gK2gDaI6p+mb +7of82J0zAp7yQZz3w+nsDXqP14Ttv+lq3wp6njLKi3y035MAzSNXtgClLuOMhs4l3BB FhQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770373626; x=1770978426; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=RH3cLAMiAOc5SS6FZ+P7B8pmgCY7JMOLIwxKd4xRODc=; b=vmQzyT3kEgMvOwECsAcP8MmUu1oBgnAOsls2DDhn9m12XBb0Xo5wKKmn2QlglxejsW OZ0tSHN6m6EcnRioZl1W9kJzCqv/wBu8UeqKTWKBDrcmaDZOghGvHCdD5oPjvwGf0g+o 1cdbgt56tGv4TBHuCoNmRVOoHfdPSokq/iBoY3VWWmP66Vjfr8ABtqRRSEHjOHKH24Po ddIe6Mkx92fWDfal6ZiJAnySYnogMSCVgMXIeknWJBoUjlsSxzl24H8iLOAYyxRfHBNp ozSzxVXBvU3R+HWxichxJXF0UrZr84g6nN7z/UcZXnHEQZZ8uMnzGdFXhfuIXLolsa5Z mYVw== X-Gm-Message-State: AOJu0YyFxOGJKqUkec3ZF27w6hN8FliBOPOXaBYKOL3Z7p2I9OEZ5E5O tN2zeTthfy04Y25i+1wI2Oi2iceGoI4Oo6+gJjxyze1oEGr8VGwTST7pVEkCM4YQp/KqKHeIl6H jAvDyBehYtg== X-Gm-Gg: AZuq6aL5agtbEckois7v4t+pNOpynqybWU3JrdLrfS8G4Bhr8DneKeJPVSLC1OyiGP5 nM1h9xsp2RnVxqn8pczLI4AdxQ2g+r0c8GwsAj7Ry30dgwlWo8cjYfqNsXqKw34GBf4/gEpQMM6 GGolRnFSSwaPCPeRBfAdBdU5LzTvgQgLEbYz76NEeFv2a9UwSySSABBIY9af8pPFHF0FJ0PUR3i XOjA2giOVKP3t3w72Opg2fW+Z2CumxWTQs+JXXz3+gVV9Rf0ZhmZb8tWSxDYfEUZh0wQg1dVSz+ jrkfXpMbRiUjQkPhSbmIEemEr1fnBMGBzx1Us/h9BAIl3LYmOv7lWrIcv536YRCEEm5dQa8Y6/F dsgP468d2oGS3f4mYFy58MMTSmqfHfis7SQwztDEwW8c3WC48mm9/vPbF8zzSjGal6KZI6dqiQH 6IECZX9t7Ruu6otmZAWG9wn0kvBqfb14q1DLFBnHoycqDnhdmlE2pwaTs7ftDc2tE= X-Received: by 2002:a17:90a:d607:b0:32e:7340:a7f7 with SMTP id 98e67ed59e1d1-354b3c52d79mr1857077a91.2.1770373625890; Fri, 06 Feb 2026 02:27:05 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Aleksandr Sergeev Subject: [PULL 3/5] linux-user/syscall.c: Prevent acquiring clone_lock while fork() Date: Fri, 6 Feb 2026 20:26:50 +1000 Message-ID: <20260206102652.164018-4-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260206102652.164018-1-richard.henderson@linaro.org> References: <20260206102652.164018-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::102d; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x102d.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: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1770373668995154100 Content-Type: text/plain; charset="utf-8" From: Aleksandr Sergeev By the spec, fork() copies only the thread which executes it. So it may happen, what while one thread is doing a fork, another thread is holding `clone_lock` mutex (e.g. doing a `fork()` or `exit()`). So the child process is born with the mutex being held, and there are nobody to release it. As the thread executing do_syscall() is not considered running, start_exclusive() does not protect us from the case. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/3226 Signed-off-by: Aleksandr Sergeev Reviewed-by: Richard Henderson Signed-off-by: Richard Henderson Message-ID: <20260126151612.2176451-1-sergeev0xef@gmail.com> --- linux-user/user-internals.h | 2 ++ linux-user/main.c | 2 ++ linux-user/syscall.c | 14 ++++++++++++++ 3 files changed, 18 insertions(+) diff --git a/linux-user/user-internals.h b/linux-user/user-internals.h index 067c02bb93..24d35998f0 100644 --- a/linux-user/user-internals.h +++ b/linux-user/user-internals.h @@ -69,6 +69,8 @@ abi_long get_errno(abi_long ret); const char *target_strerror(int err); int get_osversion(void); void init_qemu_uname_release(void); +void clone_fork_start(void); +void clone_fork_end(bool child); void fork_start(void); void fork_end(pid_t pid); =20 diff --git a/linux-user/main.c b/linux-user/main.c index db751c0757..c49d1e91d2 100644 --- a/linux-user/main.c +++ b/linux-user/main.c @@ -145,6 +145,7 @@ unsigned long guest_stack_size =3D TARGET_DEFAULT_STACK= _SIZE; void fork_start(void) { start_exclusive(); + clone_fork_start(); mmap_fork_start(); cpu_list_lock(); qemu_plugin_user_prefork_lock(); @@ -174,6 +175,7 @@ void fork_end(pid_t pid) cpu_list_unlock(); } gdbserver_fork_end(thread_cpu, pid); + clone_fork_end(child); /* * qemu_init_cpu_list() reinitialized the child exclusive state, but we * also need to keep current_cpu consistent, so call end_exclusive() f= or diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 3e6a56aa0f..d466d0e32f 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -6856,6 +6856,20 @@ static void *clone_func(void *arg) return NULL; } =20 +void clone_fork_start(void) +{ + pthread_mutex_lock(&clone_lock); +} + +void clone_fork_end(bool child) +{ + if (child) { + pthread_mutex_init(&clone_lock, NULL); + } else { + pthread_mutex_unlock(&clone_lock); + } +} + /* do_fork() Must return host values and target errnos (unlike most do_*() functions). */ static int do_fork(CPUArchState *env, unsigned int flags, abi_ulong newsp, --=20 2.43.0 From nobody Mon Feb 9 19:43:05 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1770373684; cv=none; d=zohomail.com; s=zohoarc; b=EJaHAcjDvK2qYGwa9X9CsYiLjVvhjxHr3JNJ+wfRpao9MAb3mOYoE9m8v7+x7aSKUC4T/blCH2tE0xjwIIBQV9vul99F2SYUfGz3ci220PXFLetN8NqvWAWmzyAGfiBhjelM/XtsoVpck6ckd5OeKfsD29qqvk00iAQ7GE1fW9U= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1770373684; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=lOoNS+A0pRm92QNLedN5+q4NoV4t+NHh2EAOES94IVE=; b=c0TDCkBVdrJl1hRlgZZwpBqsd7Ca3ha9Sx1kGvh/gkSB6xngZvx0sZYESNl8Tz5h4yb/aO2VOuPKtha2WSLwzXUxX7Ba5Rjuz5rkcex+iS9CrNSEejIL4OWbINJFGn1L7RoTZ6YfSceJPn/dqaMNEBWOj6LI6Oz/1mpidjI0QUE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1770373684442616.7462633454033; Fri, 6 Feb 2026 02:28:04 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1voJ3e-0001TE-0X; Fri, 06 Feb 2026 05:27:26 -0500 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 1voJ3P-0001Rp-Qw for qemu-devel@nongnu.org; Fri, 06 Feb 2026 05:27:12 -0500 Received: from mail-pl1-x631.google.com ([2607:f8b0:4864:20::631]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1voJ3O-0007Sg-2T for qemu-devel@nongnu.org; Fri, 06 Feb 2026 05:27:11 -0500 Received: by mail-pl1-x631.google.com with SMTP id d9443c01a7336-2a7a9b8ed69so20865825ad.2 for ; Fri, 06 Feb 2026 02:27:09 -0800 (PST) Received: from stoup.. (bg30dhzpdc341w7g29yn.ip6.superloop.au. [2401:d002:dc0f:2100:1ced:e57b:71bf:567a]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-354b1f49191sm2113723a91.7.2026.02.06.02.27.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Feb 2026 02:27:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1770373629; x=1770978429; 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=lOoNS+A0pRm92QNLedN5+q4NoV4t+NHh2EAOES94IVE=; b=tetvgEYTvtc41GU00ZOEZoLCsz9gBG2xfYsUXj1Za51ul8OsrzatFFL6McA3ETZTy4 5U8DtGT+vCqEnCLKy5kzvqtP27t5eAhyQHvqkxbbDkCoNFGeWkUREo3ciJponyJI50G0 cI6ore0xE9U3cJoozkbK7EK6nf2viyg+XlMwJBpBWaNtQ75mw0woNzlAZVW8dcZFZ3im g2dm2zjYSYpC4P2RR4dmxot+zKD4ruJRgjZ+2GwI+Ui5zjdauEAOtru6WaKSA9H6vaQf K59gmCs9oDFmD27GJsqxrluCuvaNoumPo7HV5rfe44DSkS1L9QbB/SQLpM91QsDC1+Yg fJpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770373629; x=1770978429; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=lOoNS+A0pRm92QNLedN5+q4NoV4t+NHh2EAOES94IVE=; b=CWT7R89kTJBN8cbiTLj+v+lXIUjVrJDVbrOVTEaiUECBP2SWPl2XfSo9uBSKwTE8iW 58tWFXfNixtG5nyo00wVok8k25b1zkBCBNycISgtj3RWUoRjjbj8TYOk8z957re3iF3A XMskda2Fzt5OIxniA3qOXGud6zUBP9mGx5paSi3/Z4B9UaXZE6R1lCwDiOfUQ0JxClI3 G37G8mpR4hJU9rTxYKQJacnuIJKH3EffGjIrigUgz8YzJ3P6JNPKwkqMTEQVhqcUrsGU GqNVdICYclv33pb1CWQYJ8uFweX0f/P676i+qhnyG6qfIWdQEX/AkC0Plc1sh+D+1t+A VroQ== X-Gm-Message-State: AOJu0YyR8xkFen/gVGCnp/5BfjPdLNzT5s9sFumxbYk4Nd8V1fcXEX0n +c1k6VtnRwaRHtsozq75Lpg0FFfy+yl3/aQm+UD8eNcR/uaMa2DH/Oj/D31eVv9ORAn8udmqNBn L+XrJnSiBGQ== X-Gm-Gg: AZuq6aJyMGEzoG7rE0TvQ+LY8fBNTE58/Hn+36uyZx+ZoNkztgj6cdUsm6rnZZdOCxd +TXT/9VEFx8EreoBdyDe7uHXS1JdHU9a/e9lU7jZbCkkBszLuAncK1tHsH6JaHDGY3o9zWtp2nB n++5tlNywStzIMK1c5MvckHyk7BSHk4GaFtTrFb3vekoDC8Jx3ICNDI1mR3kYxIUIetobRg0fgG Hr/PtTKHdCP2u0zt1/S3Xd6W5oUHRPPUM2FhFpXwYGrfZT5ntWVl0G7h9RGhB8AoV1OGrmeMuy+ /vHzEP6REAxVQM4LOAbaaZjZjSSWp785hWHqMKldLPbVpmRNn89fCm/KHVroKQ8Ei1Zk9GVdTgo 22vWlXzJSWpn5ujNX2zj36dMqhcaKkqQrvdbg494pKb4JJrHHcG/jUVKoAk9EEYA2qellvEv8W5 2dTpcLdDd33f7vQ9q/GLl3i8A78syi928SGWWoepsz0D0wRLucUU2aiJ2RwvyiVwY= X-Received: by 2002:a17:90a:f947:b0:34c:fe57:2793 with SMTP id 98e67ed59e1d1-354b3e264e3mr1930895a91.20.1770373628647; Fri, 06 Feb 2026 02:27:08 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Paolo Bonzini , Andreas Schwab Subject: [PULL 4/5] Revert "tcg/user: do not set exit_request gratuitously" Date: Fri, 6 Feb 2026 20:26:51 +1000 Message-ID: <20260206102652.164018-5-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260206102652.164018-1-richard.henderson@linaro.org> References: <20260206102652.164018-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::631; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x631.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: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1770373687033154100 Content-Type: text/plain; charset="utf-8" From: Paolo Bonzini This reverts commit b422a7bff64eaf55b8250225533ca1df42c3777e. The reporter says "The commit breaks go; if you run go build in a loop, it eventually hangs uninterruptible (except -9) with a couple of zombie children left over". Reported-by: Andreas Schwab Signed-off-by: Paolo Bonzini Reviewed-by: Richard Henderson Signed-off-by: Richard Henderson Message-ID: <20260202091753.28459-1-pbonzini@redhat.com> --- accel/tcg/cpu-exec.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c index 7c20d9db12..ad94f96b25 100644 --- a/accel/tcg/cpu-exec.c +++ b/accel/tcg/cpu-exec.c @@ -751,7 +751,6 @@ static inline bool cpu_handle_exception(CPUState *cpu, = int *ret) =20 void tcg_kick_vcpu_thread(CPUState *cpu) { -#ifndef CONFIG_USER_ONLY /* * Ensure cpu_exec will see the reason why the exit request was set. * FIXME: this is not always needed. Other accelerators instead @@ -759,7 +758,6 @@ void tcg_kick_vcpu_thread(CPUState *cpu) * CPU thread; see kvm_arch_pre_run() for example. */ qatomic_store_release(&cpu->exit_request, true); -#endif =20 /* Ensure cpu_exec will see the exit request after TCG has exited. */ qatomic_store_release(&cpu->neg.icount_decr.u16.high, -1); --=20 2.43.0 From nobody Mon Feb 9 19:43:05 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1770373670; cv=none; d=zohomail.com; s=zohoarc; b=MSo2K72qEbiG0x5iGQUKk9vIb5Likv9WV5+ywdMuLukjsx/rDAW1QrxtPgwIt/+YPd3sBNBrSjULIh7BUjlSAt5V4EG0sQBwFwlmAniierSWjqGX5tTmaKZ5GORTETSkc4/0yeZN4s7AQiZMCj31vW/4jrBxshG2Dc1RFUlMEzI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1770373670; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=tiiSvKf90gSVLdk8ZbuglWutyjV/XckwzYPcdDLKSsA=; b=OMMVvzfTNdwnjUhqGSCm9xeaZwHAtofFEjx/+NDa5nSZpJZt3IKqxENUB+IoGyLJKwAECn9VY/UNlfjjFGob7wZu1uKGbQLdCBjWYBGakOK6jn1Q5C54sdkyiHwlKfRmWnMdrLSzKfp+P08/dmvuueP+EFb78gMteNGMWdlqI08= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1770373670559689.3816444595344; Fri, 6 Feb 2026 02:27:50 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1voJ3e-0001TF-0m; Fri, 06 Feb 2026 05:27:26 -0500 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 1voJ3T-0001SJ-10 for qemu-devel@nongnu.org; Fri, 06 Feb 2026 05:27:15 -0500 Received: from mail-pj1-x1032.google.com ([2607:f8b0:4864:20::1032]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1voJ3R-0007TU-8G for qemu-devel@nongnu.org; Fri, 06 Feb 2026 05:27:14 -0500 Received: by mail-pj1-x1032.google.com with SMTP id 98e67ed59e1d1-34c868b197eso1461725a91.2 for ; Fri, 06 Feb 2026 02:27:12 -0800 (PST) Received: from stoup.. (bg30dhzpdc341w7g29yn.ip6.superloop.au. [2401:d002:dc0f:2100:1ced:e57b:71bf:567a]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-354b1f49191sm2113723a91.7.2026.02.06.02.27.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Feb 2026 02:27:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1770373632; x=1770978432; 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=tiiSvKf90gSVLdk8ZbuglWutyjV/XckwzYPcdDLKSsA=; b=et3eyf4TwYT2CqPMcY/0lsSlUDvAZSofU9Usiq1+g1bqbK2Pi5LaM0C2z+BYYLkGLC /2PrP+Tt9yJn7O3N2ADJ6E/gyEsDUkw9H47eYSX6mQl7EdZ2kqFrz6mPLcjLhdSQjAnY usA6LZ5S6XrgNBsLd7QtQb5ZGtqGjBygALwAQxuzsIfqgjzi2wnS34IIxOO6SRGi+M05 lQz5ZKtTI0An40sEu2AigoRVfpJHEs20ptPMVjDFR8Gvcs0pF6hTDvTmdf1okFu6A17l bgKrn6hpha9KUt+KZB0oPNI5RSliAgxtcRXQMTAb1K38wYqSaDxHrYlmoc1vEBibHXBy n4DQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770373632; x=1770978432; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=tiiSvKf90gSVLdk8ZbuglWutyjV/XckwzYPcdDLKSsA=; b=iPACBjLFQsDEIkrgLbJ6wirjnh3yT5vezeGASvZD6RRRYVQJN3wF1yOMtEmYdjPvfi Dik8j8i9l6p6CBF9A5m70j9Jzqq42b4lShy9jpui8Gd3zcphSG/CVoSQczBY8ZoLEesP ZX3zFLw3bYnRfZaYmT8+4nxa0fvp0k37cI62mMDu2Q/v5X2uTE0/wGSs5ylQMJdTlzcO SJMsV6R6PZ9TxiwyD9IQ+Nb15w4VITFq1QmQefsPLZwW7lxGr9cPswJiXUtzE+29LPts zOZH983J+YQnMOaIkyhQG9hMbis9aklcRJNexTAJICnHXWGmjNkih1yutBwMjPwenx3Q pwTA== X-Gm-Message-State: AOJu0YxpjOcUVvgdKGzUPSSd4A4V1vJEwMy4/gbHk++vye48pBOf6EZd RconfNXBahGVMmNPefq+FtUTo6mD4VDOhwVhZ+qjHMoE2smsHMdsNHUZaV034OhDFkD5BEq/Efi GBnDDZnNOpA== X-Gm-Gg: AZuq6aKdSRawxE3WKD2jEE+dKFS+ZYrsZkbiXt+b/Gx56VOBKWW7y5ND5+CUpcK7j3D F1KHqL9ezXscaTkqfMcIEzWsJVNSEKZB3FPv/Qme2RiAbjyGmW5tznfqhuLI51x34qqd19f5rbX VZhmjCHP+xVlInfhx1PecuZS62yI68ts+0G0TZceIbdJCBpbXB2zWIux6YopSiKwNSKcWMCEfdF +iQzcBEfADgnFr7y5DdkC8gf3fhrMXiQg0uCNPWYbbu5ZISPBL0uL1lW1ohcoZK8pYCSJbZNoPr ZIOI2xoGDOt2DvXDm/lBFXpzKFBYNNvgTq4FQYYyikayeIFcgODTjMhrD1bIFAOV/kgh++VPxAV HsUe05gPHd9Mf5oyylHDPIvW6Is4RoxKn1rS32Ax/OCQXcUNX1Ae64D/I65C7Z8RpyWAIUGyLfO Ns32HP5bCfnJyxIzT/H88AUXcb4j3xHL63AdOcNAZqrKSDsMBef+Ay5LEY8R92DlU= X-Received: by 2002:a17:90b:2d8b:b0:340:ff7d:c26 with SMTP id 98e67ed59e1d1-354b3be0b36mr1976306a91.16.1770373631516; Fri, 06 Feb 2026 02:27:11 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Jim Shu , Gustavo Romero , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PULL 5/5] accel/tcg: Remove a redundant argument attrs in io_prepare() Date: Fri, 6 Feb 2026 20:26:52 +1000 Message-ID: <20260206102652.164018-6-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260206102652.164018-1-richard.henderson@linaro.org> References: <20260206102652.164018-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::1032; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1032.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: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1770373672849158500 From: Jim Shu attrs is already in CPUTLBEntryFull, so this argument is redundant. Just remove it. Clean up commit 94c6e9cf04409e38563080348d6136879f91ffee Signed-off-by: Jim Shu Reviewed-by: Gustavo Romero Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Signed-off-by: Richard Henderson Message-ID: <20260203142737.2164763-1-jim.shu@sifive.com> --- accel/tcg/cputlb.c | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c index 3d75abbe68..d6115bbb0a 100644 --- a/accel/tcg/cputlb.c +++ b/accel/tcg/cputlb.c @@ -1271,7 +1271,7 @@ static inline void cpu_unaligned_access(CPUState *cpu= , vaddr addr, =20 static MemoryRegionSection * io_prepare(hwaddr *out_offset, CPUState *cpu, CPUTLBEntryFull *full, - MemTxAttrs attrs, vaddr addr, uintptr_t retaddr) + vaddr addr, uintptr_t retaddr) { MemoryRegionSection *section; hwaddr mr_offset; @@ -1974,12 +1974,10 @@ static uint64_t do_ld_mmio_beN(CPUState *cpu, CPUTL= BEntryFull *full, MemoryRegionSection *section; MemoryRegion *mr; hwaddr mr_offset; - MemTxAttrs attrs; =20 tcg_debug_assert(size > 0 && size <=3D 8); =20 - attrs =3D full->attrs; - section =3D io_prepare(&mr_offset, cpu, full, attrs, addr, ra); + section =3D io_prepare(&mr_offset, cpu, full, addr, ra); mr =3D section->mr; =20 BQL_LOCK_GUARD(); @@ -1994,13 +1992,11 @@ static Int128 do_ld16_mmio_beN(CPUState *cpu, CPUTL= BEntryFull *full, MemoryRegionSection *section; MemoryRegion *mr; hwaddr mr_offset; - MemTxAttrs attrs; uint64_t a, b; =20 tcg_debug_assert(size > 8 && size <=3D 16); =20 - attrs =3D full->attrs; - section =3D io_prepare(&mr_offset, cpu, full, attrs, addr, ra); + section =3D io_prepare(&mr_offset, cpu, full, addr, ra); mr =3D section->mr; =20 BQL_LOCK_GUARD(); @@ -2492,12 +2488,10 @@ static uint64_t do_st_mmio_leN(CPUState *cpu, CPUTL= BEntryFull *full, MemoryRegionSection *section; hwaddr mr_offset; MemoryRegion *mr; - MemTxAttrs attrs; =20 tcg_debug_assert(size > 0 && size <=3D 8); =20 - attrs =3D full->attrs; - section =3D io_prepare(&mr_offset, cpu, full, attrs, addr, ra); + section =3D io_prepare(&mr_offset, cpu, full, addr, ra); mr =3D section->mr; =20 BQL_LOCK_GUARD(); @@ -2512,12 +2506,10 @@ static uint64_t do_st16_mmio_leN(CPUState *cpu, CPU= TLBEntryFull *full, MemoryRegionSection *section; MemoryRegion *mr; hwaddr mr_offset; - MemTxAttrs attrs; =20 tcg_debug_assert(size > 8 && size <=3D 16); =20 - attrs =3D full->attrs; - section =3D io_prepare(&mr_offset, cpu, full, attrs, addr, ra); + section =3D io_prepare(&mr_offset, cpu, full, addr, ra); mr =3D section->mr; =20 BQL_LOCK_GUARD(); --=20 2.43.0