From nobody Mon Nov 23 04:34:22 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=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1793884603; cv=none; d=zohomail.com; s=zohoarc; b=fMBrjFDFtNB/KUUdIH96afCgZ6MJ2ojZFaww0kAcsRRfJz4zdtBJkJphXAQfdOLgImPzXczDYkfZtBofLN9ctw7/WNAtzTff2DIslbN+EVuqLyWtJjXaEH0cpTsrjuQiEsqPZTDLbOCfRBiWhtnK3zSI/XRDRBFDud0ifM+5rJQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1793884603; 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:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=e3N0JhSByvS1H/l+iwrRf2rrkc1z+/JxeWNW4NRNi7s=; b=bxkpiixxT7oadFnG24KenJnLsNA/nimktrPe3iJg2DTLKKFUuI+sroxsT0CZPvMC6Lqx1sSZ8oM3G2pJx4iTIQFEBctMWvtqZmspoguqWQCtRSSe7T/0XVGlXFycSmYDnFebZNDqiXVZwgBTRXSCkcbEvc8PeyTv50wObir2pok= 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 lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1793884602826488.8985087242643; Thu, 5 Nov 2026 05:16:42 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xOxKQ-0000ER-6q; Thu, 05 Nov 2026 08:16:31 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xOxK8-0000Cu-Dp for qemu-devel@nongnu.org; Thu, 05 Nov 2026 08:16:12 -0500 Received: from mx0b-0031df01.pphosted.com ([205.220.180.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xOxK6-0001KF-Pw for qemu-devel@nongnu.org; Thu, 05 Nov 2026 08:16:12 -0500 Received: from pps.filterd (m0279872.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 6A59tiMF3532116 for ; Thu, 5 Nov 2026 13:16:09 GMT Received: from mail-qk1-f199.google.com (mail-qk1-f199.google.com [209.85.222.199]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hrksq9t3y-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Thu, 05 Nov 2026 13:16:09 +0000 (GMT) Received: by mail-qk1-f199.google.com with SMTP id af79cd13be357-934963b2bc0so358205785a.3 for ; Thu, 05 Nov 2026 05:16:09 -0800 (PST) Received: from localhost.localdomain (104.171.88.92.rev.sfr.net. [92.88.171.104]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-c4d0e48d3acsm168785266b.71.2026.11.05.05.16.04 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 05 Nov 2026 05:16:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= e3N0JhSByvS1H/l+iwrRf2rrkc1z+/JxeWNW4NRNi7s=; b=mFJTKzorjw1j4FVo 0x6wf+9c5WVQ0ICRNFMXvEhgQu+Bm9Fu2670U6YS8eKodssViHes9zHZxDRbQC8W RCiPMywEp8/UgFv4vgP77Cwu9hLwPPQeNK34v+dkiXPWGPMrNX7p6a+RMXymQ+s1 M74cc4R94Z5/RSNdLuwUOrCCCbHHU+Nbp/CORhYCBxRJeQ1ft5M9WZjVJ7vaFxUM sKGdUrCvkWHUgCHFKHN+qTIag3Pkn5/OuGJOftLCHnEEAYjvJfiH4IuKY6RUuETM 5vxxgAMRdPOY7EIZ2THxrv9wJHt/1q9oN7PmFAYWWX5vK1mHvxNcaFA48wEry5dB ifen5g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1793884568; x=1794489368; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to:content-type; bh=e3N0JhSByvS1H/l+iwrRf2rrkc1z+/JxeWNW4NRNi7s=; b=RkB16uy66+Ak5+wddvobeMt1St9ihhz3TcKis1MPpp2kjatJz331iNy1/T8RzBpVQE 4F/aZhSGoBXuNC5iGaHJD3tf0mlQLWkaRNT77boxQ9AHED74IGeyePo6x4MijhhhhJ51 U8yld0bIK2OrIqbHYEDNTyCM1Hls8NjpqEtddPtlsxrAfEf97mG9TCT8I4srIjt9zP8c W4XPpe1+DlQ3/HmCKxhSt7nrQr/DkyiKUMR0RtmKIS5oNRQ42h2NzxCf4T63Vp4f/XEd 5bmV+t/L96TIWlDRV/TdWuwgvJECcETpspSII7Yap2TZ83tajFgzSTdDVp8krcloLYWr 5wnw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1793884568; x=1794489368; h=content-transfer-encoding:content-type: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 :content-type; bh=e3N0JhSByvS1H/l+iwrRf2rrkc1z+/JxeWNW4NRNi7s=; b=b0i8oiX6WKD62urwaH0VWAh9PudFn+VB9wOj8hbyhy0VRNep9Z6DKJcmSWZFiq7Yk7 GaZ9p14R9GjUz4S/RT/U7DuXKgmQib0+9sAmnXkTIsx+pst+r5eq8GZYPJ5HWREfQfcE PTAGzNoo5UxB+IsDhabOR6px+eoz4qaO+p2PjAXctJB62J/NyjkFOrI8MdxgYFDYr+IY 1En7cVVeaYTo/QO+fyqoYZfxW+cJE/VutojrTsxGvofO43Bl+NWAbdpJjx6KnN8qocjN PZH+X8FAzCnnjye0CjEf8+qty0nqGXUsqzGm48pgSaOuRlRxba6anGZt3tehmFau5W9C gz7w== X-Gm-Message-State: APuU4Z8XZdfm+wfnVWFvxN+lzZ7QkTZZZzAVh13uqs5eduzHjMaA7ZRN B/hN/XNqOaZ0ysQaHsJ0d4n5eM4Q5AhkP+xnG1ZCwgeL3R9PTGntNZD5gX5M492YIca4Pjm4XUA hGU8WL7OddkjCKE90Ub0DbNhqZ2h/QXpNZWL9NgLmNquB+BP00UU+07xFxCQ/iwlZpg== X-Gm-Gg: AYBFou1ukNE+5ED9if8bcIxqWpaLd+hYCsbgZRki5y3GvUncmkJ7oGVido2vR4KhglV RqBX+5HydkhmsmEr9ZltaAPR4Ssu6pKIa8hQh+M4HnC/NK2Ahlpg/vDQeCwFXC84r0mObo2/hlv pRsUwf0wRhjzo9BmZogaa/DCHg2iYkIyeu+x+LaZDC8/NCxLtCFahITxGEsQdpK39PjXPHe2VwH 17VvbzcLOznZSYNArWJj8PYX7fnjLYtqaOm29hI1KgHatgFDIxPwe++g76VEhPjHInFXzwg5BQX K4bLQba9s175o408Ef5zLScmzUZb42hQOtdZijIeithKQTYKE0pGR7cHj3zL4JZnFhklgt6EBPE cRDoVzn5059m8IxMPUPbJB0+Q95jrUYw169LRYuHx9O0IgmYeEAsz8p4T/JMpVBEXLWPn+9yIx3 tJdXTkltMYb+XUb41VWYMrVI5L X-Received: by 2002:a05:620a:470f:b0:93f:5ac:14a3 with SMTP id af79cd13be357-944217217c0mr3280733285a.73.1793884568508; Thu, 05 Nov 2026 05:16:08 -0800 (PST) X-Received: by 2002:a05:620a:470f:b0:93f:5ac:14a3 with SMTP id af79cd13be357-944217217c0mr3280730285a.73.1793884567946; Thu, 05 Nov 2026 05:16:07 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Alex=20Benn=C3=A9e?= , Markus Armbruster , Richard Henderson , Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 1/2] replay: Explicitly require round-robin TCG Date: Thu, 5 Nov 2026 14:15:48 +0100 Message-ID: <20261105131549.42175-2-philmd@oss.qualcomm.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261105131549.42175-1-philmd@oss.qualcomm.com> References: <20261105131549.42175-1-philmd@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMTA1MDA1MiBTYWx0ZWRfXwUs7mwAn7TeF Vr/lmWzotaozQSi4MIZwirF1XRghQEBAARmiDtfeV0wUP1N1xZ/OMWTKijs8HjcwblifPBHXExN TYgF4z/b/p5DpNpb7ZPzLWcHPQBqFo95P0mYVtFrvfhYG+uUbHaDf7L4F2F2fh9p+GZWTL/uBFp UJgVQ3gru1HjxKlhrcdLBq5TkUNNYYNXcmOJtjM+XPv6IIWZt1eTHThV0hGOcrM2S40eEcoRURx lj5g921G2q7afPLzhWeQRKGtSdOpvthyNCRrD/ydhLrK+CYzPhdfeiSdrwe++NAH6OduKh7qEE2 NTq1yggZSyXAYCzWG+Kr81ElbjAilyoJ/S/KuziqK2Je0Q4d4BGjurquy4bnBQ+D/GW+LokWPfQ /kr9DCDCPhWWnPwxGk0E3A5Td9Lf877yqmTC+5Z5PGtm9S931uasbW4aDHpki+NjUyKXNvxwTvL SroTGnNh4COX4TW2TrQ== X-Proofpoint-ORIG-GUID: _qLqK3_XBuhhaCC60NrRYq0_KJz01aNx X-Proofpoint-Spam-Info: AW1haW4tMjYxMTA1MDA1MiBTYWx0ZWRfXyH6kLhPG3UCR QpHlxFtvIgv/xWPUDiw4op+2ScfLtkfts+DNgZwnZfwWU+2VJR0M1JfgTCEaeFoSEjcvhRvZlEP X9LzmKRruBLa97qz7Gnb3/iVM+4S1BI= X-Authority-Analysis: v=2.4 cv=CIe/zhrD c=1 sm=1 tr=0 ts=6aec8199 cx=c_pps a=HLyN3IcIa5EE8TELMZ618Q==:117 a=pBdeej1U2jlWEHTh2vTwjw==:17 a=IkcTkHD0fZMA:10 a=zJRp6_cAMcgA:10 a=M51BFTxLslgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=yx91gb_oNiZeI1HMLzn7:22 a=EUspDBNiAAAA:8 a=rK-1C3BBwVyWgTyOwNcA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=bTQJ7kPSJx9SKPbeHEYW:22 X-Proofpoint-GUID: _qLqK3_XBuhhaCC60NrRYq0_KJz01aNx X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-11-05_03,2026-11-04_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 priorityscore=1501 bulkscore=0 suspectscore=0 adultscore=0 lowpriorityscore=0 phishscore=0 impostorscore=0 malwarescore=0 clxscore=1015 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610300000 definitions=main-2611050052 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=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.180.131; envelope-from=philmd@oss.qualcomm.com; helo=mx0b-0031df01.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_LOW=-0.7, 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 @qualcomm.com) X-ZM-MESSAGEID: 1793884604393158500 Record/replay needs a single deterministic instruction stream, which only round-robin TCG provides. This was enforced only implicitly, through icount being incompatible with MTTCG. Reject thread=3Dmulti in tcg_set_thread() and tcg_init_machine() when record/replay is active, with a message mentioning record/replay, never auto-select MTTCG then, and add a final check in replay_start(). Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- accel/tcg/tcg-all.c | 13 +++++++++++-- replay/replay.c | 6 ++++++ 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/accel/tcg/tcg-all.c b/accel/tcg/tcg-all.c index bbc733a7070b..6ffe04649072 100644 --- a/accel/tcg/tcg-all.c +++ b/accel/tcg/tcg-all.c @@ -125,7 +125,8 @@ static int tcg_init_machine(AccelState *as, MachineStat= e *ms) * there is one remaining limitation to check: * - The guest can't be oversized (e.g. 64 bit guest on 32 bit h= ost) */ - if (mttcg_supported && !icount_enabled()) { + if (mttcg_supported && !icount_enabled() + && replay_mode =3D=3D REPLAY_MODE_NONE) { s->mttcg_enabled =3D ON_OFF_AUTO_ON; max_threads =3D ms->smp.max_cpus; } else { @@ -133,6 +134,11 @@ static int tcg_init_machine(AccelState *as, MachineSta= te *ms) } break; case ON_OFF_AUTO_ON: + if (replay_mode !=3D REPLAY_MODE_NONE) { + error_report("MTTCG is not supported with record/replay, " + "use round-robin TCG (thread=3Dsingle)"); + return -1; + } if (!mttcg_supported) { warn_report("Guest not yet converted to MTTCG - " "you may get unexpected results"); @@ -195,7 +201,10 @@ static void tcg_set_thread(Object *obj, const char *va= lue, Error **errp) TCGState *s =3D TCG_STATE(obj); =20 if (strcmp(value, "multi") =3D=3D 0) { - if (icount_enabled()) { + if (replay_mode !=3D REPLAY_MODE_NONE) { + error_setg(errp, "No MTTCG with record/replay, " + "use round-robin TCG (thread=3Dsingle)"); + } else if (icount_enabled()) { error_setg(errp, "No MTTCG when icount is enabled"); } else { s->mttcg_enabled =3D ON_OFF_AUTO_ON; diff --git a/replay/replay.c b/replay/replay.c index 14437b32566b..d7d5ddc5a326 100644 --- a/replay/replay.c +++ b/replay/replay.c @@ -14,6 +14,7 @@ #include "exec/icount.h" #include "system/replay.h" #include "system/runstate.h" +#include "system/tcg.h" #include "replay-internal.h" #include "qemu/main-loop.h" #include "qemu/option.h" @@ -447,6 +448,11 @@ void replay_start(void) error_report("Please enable icount to use record/replay"); exit(1); } + if (tcg_enabled() && qemu_tcg_mttcg_enabled()) { + error_report("Record/replay requires round-robin TCG, " + "not MTTCG"); + exit(1); + } =20 /* Timer for snapshotting will be set up here. */ =20 --=20 2.55.0 From nobody Mon Nov 23 04:34:22 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=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1793884618; cv=none; d=zohomail.com; s=zohoarc; b=VyA06150eIFTLGdHL4UYBL52tnRzJrE4REdixgFp6qOUEfBpQTcUzikj6ITZEwL13f4YqQ2ch3ePLeLbj+yEnYT6cmvibUGIGxGwy0MEHoQNCIxczV3HeJl19/h2erkZoBsYaBG+kSNoxafrt60+g2KTcm5XVQoa26vTwJSnl30= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1793884618; 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:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=VxGhDKBUZw/fjWbMcbRQ8WPMBRm2i366rvQWlpcf/y4=; b=GiI4xHBM5vvghtg1RETtBGh8fp3vduEe8xUAtLSJ8JKU90/9alNLQyFMqlTps3GDADmO6YOnk8XpQuatBN/hy8QpEDjB8IphQOnQjk12NDjCxj5UZlkYwvo50gjD/Sskw9pX2GTxn4vwP7mXj+EnX6dKoKAqW2rP0vaneRqvxDg= 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 lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 179388461892240.361622630710826; Thu, 5 Nov 2026 05:16:58 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xOxKU-0000Fa-8I; Thu, 05 Nov 2026 08:16:34 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xOxKI-0000E0-Oa for qemu-devel@nongnu.org; Thu, 05 Nov 2026 08:16:24 -0500 Received: from mx0b-0031df01.pphosted.com ([205.220.180.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xOxKG-0001MN-So for qemu-devel@nongnu.org; Thu, 05 Nov 2026 08:16:22 -0500 Received: from pps.filterd (m0279870.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 6A59tEBO444508 for ; Thu, 5 Nov 2026 13:16:19 GMT Received: from mail-qk1-f197.google.com (mail-qk1-f197.google.com [209.85.222.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hrpaah5vp-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Thu, 05 Nov 2026 13:16:19 +0000 (GMT) Received: by mail-qk1-f197.google.com with SMTP id af79cd13be357-9308eafb465so518658885a.2 for ; Thu, 05 Nov 2026 05:16:19 -0800 (PST) Received: from localhost.localdomain (104.171.88.92.rev.sfr.net. [92.88.171.104]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-6b55abd5569sm1858934a12.5.2026.11.05.05.16.15 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 05 Nov 2026 05:16:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= VxGhDKBUZw/fjWbMcbRQ8WPMBRm2i366rvQWlpcf/y4=; b=nSDcbS1tj1cOknW+ kpJStpWSEzn0UVTst8RBWrF/tMet2oeEGcef+Ss/RPF8UnAaIbKzFv33lVDasSIQ /W1XN6yPs9CvzRlRORz0rm9BPHB/ctGnnykNe3hq9PmElUVS/K2eHKGgqHnsj4/D yhLulTpgLqElJ2iIrNUDfV2YyFDu6xYOljs9+oY7+jZ4mDoJg/E+eefrl+f2feEA qndR8P4bsfY+YxZiq8ux+oRWLfRAmTCX3XoQO+FSL2ZkKc793IGk7eZEikQVWxSI jDhCryzPCn0bIYAm2zKITNv63Q77x6CXNqIHKcGlcwhpRGhA7h1EX1nM3d9Y1IHR VnXYlQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1793884579; x=1794489379; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to:content-type; bh=VxGhDKBUZw/fjWbMcbRQ8WPMBRm2i366rvQWlpcf/y4=; b=kI1B6B4RGoSdZAdYa0Oh4ep7vp4Ac4qQqjl/jdBlJ5JaFKQYclLWWBq7h2/Ly5tl7u /AnGn4KmAPhsjpJCNV+itytyi468APj6JR8WZhrayPk82LhBesK/t3jofZysTU/NFDgN uXGNyiZFK/L1FVP8r2yHYnQdd1TnjJjgb+BOkWUtHmig8rvNnbAZaN4ytubGTAkdISow y7GTs0DUvo25zmN5ddTsHKSvKo5Zbiuz58I1HKcag0QrHKFLlWb/GBw9dVltsHbVW13q y+l/97nfyk4b8Xe8P/Dx5grtuvWIdWLSrSx/7HNoKt9UMZ7DJs/aED6tJL5QZTNbW1VM cSMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1793884579; x=1794489379; h=content-transfer-encoding:content-type: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 :content-type; bh=VxGhDKBUZw/fjWbMcbRQ8WPMBRm2i366rvQWlpcf/y4=; b=i8G6zIS0DRkUtBuYiydi+WM+KQHUpxou8jeLAOa921heIxvYeiWLp0q1D5vIJrXXmJ vmFV3YO/Ml9amXaE1CggVuJIHidSyTxpH7JViPQqRtz1RNj/3GMXz6HrKsAwZQhZf+Pf X7bp23HIZONxpeDA0M+7yPVAmVGf2OGidvlR/CFtDlvrGQo7y9lLlj/sJ4BfbpT0Oogf 0/rZHxN94J0fp3iB6PTv1aj0JEWP0flZj9wHeQF7JhYNm2I0aE8AvRBeHaa/srhsy5mt qqsacaflKVXW/qfZafIO/5c6WxDzCNN+WtInJw4Ur0Sv8mjBYi8y4tdL+1prxnoFxpop cGKQ== X-Gm-Message-State: APuU4Z8VB2UJ9MjTbGBZNk9EHYAm8de8F+g0Re7JTIYrXgC/OXaYJKWh 9pTUQJXG6m8OwjrjhwOtsg4g0B8Kl4HXimNCrbUQm4d5iXsWE4I01tS1DF0VVB2kzrWe0eBZshY O8Xdqd/LGTIFICSfJzuVEOD4ZVnu1OsrQ4pYqTTkBZE3z4oJVxPy9BsTG9+4BYABdcw== X-Gm-Gg: AYBFou2/tF5xksFYCZy2Pyi1KSYnt0LMxSe3k9FRjmGofzLo8sxR5X7fcNprrjwu7jI sy+oGLki6frC7kKVdr56qrFIA+KuvWcOBIRzWWQDTZDYuX83KK985F8TsUEFhQ8NJEYHlKRZU9W RDrrBoLUIx37Y5JGd6FDmZoIR+naZLGmAXZJwUGf/Hj4LpDXNlghYhtSFA5Js5Wyu0NLvKQS/7U FsreaMdtxDTqHLy2Mq7N70TFq92/akkpc+5kbJ08szm9HLZ6yDhWzF06PLCnAC/296YJBvrumLZ /sUChyIDU4g0+MNQnSp48kxxS+UvGT59PpS1C6Ls5Tnas2i2INj4pYhnqBdpXkuE+eQNZbVhEoJ i/UKcC3ehDaLJlsQLLZFDY7gM7O7akZbe+6T04a8y3uXyA+DADzYN3w8To/KbAtVXTfJ8D1ykX0 IXH4xJxS8p+hjRk03s1KJsnqy2 X-Received: by 2002:a05:620a:370b:b0:93f:1af1:7951 with SMTP id af79cd13be357-94421729826mr3177159485a.66.1793884578775; Thu, 05 Nov 2026 05:16:18 -0800 (PST) X-Received: by 2002:a05:620a:370b:b0:93f:1af1:7951 with SMTP id af79cd13be357-94421729826mr3177153985a.66.1793884578223; Thu, 05 Nov 2026 05:16:18 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Alex=20Benn=C3=A9e?= , Markus Armbruster , Richard Henderson , Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 2/2] accel/tcg/icount: Fix shift=auto incompatibility checks Date: Thu, 5 Nov 2026 14:15:49 +0100 Message-ID: <20261105131549.42175-3-philmd@oss.qualcomm.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261105131549.42175-1-philmd@oss.qualcomm.com> References: <20261105131549.42175-1-philmd@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMTA1MDA1MiBTYWx0ZWRfX8kPPVTwLxixh eTyT0gp1Lxp6fTGNZr60JGTtl+/ulpppKYnvHraJoLkqsaym5Jgc55MGF8DcTpoPaFRNOOvi63k ySdiH0RXAnuKQAN6Qq6+yx+B4mg4AMc+9jp3nphma0oPeFUsFbDUu9YwDUIZQizjkcrWhCaUeJ5 lxhTc4Z1sV17U7COaEWYCMF/jw0hqrYu4x5RgMDJvekYiD0XMzbWTNsyeYa+QfwJY07FGfCnhov YfmF65ABja0CbUSoq49pHU49x4WMQcqMLjD9u194f0h8Kba+sDydqdDGTF9bzW22tHCaZvNDK6J ykKb/ezbJ6XtCpSmsEifHKqP+aIhBa/ZbnuW3Dd4qHZjothG+scgqs3Zy0CriNyBW5QXFikN639 o64R91nbXArnAjrdMcZfNcRoARs1TozcWS9CDEp0VV6wSoWDhm7Yvkqh7Fx8NKEu1RkoLr/u4fV lWKQWiq0Nv07Tvcnk4g== X-Proofpoint-GUID: 7vO02RW783CquL81bfDvx0Q7YhEQqgVD X-Proofpoint-Spam-Info: AW1haW4tMjYxMTA1MDA1MiBTYWx0ZWRfX7gOYkPk4sQ9j GMzNUsr5oHf9I3V0Zj1R7pPR1mVss8x578Chi7W3AIkru+q5BCNPcvQ2fs5fda/ma0vDkmb6TT4 44RytlBjz/EwGc6kk/SzIdAkVqIOYlY= X-Proofpoint-ORIG-GUID: 7vO02RW783CquL81bfDvx0Q7YhEQqgVD X-Authority-Analysis: v=2.4 cv=WOXqzXsR c=1 sm=1 tr=0 ts=6aec81a3 cx=c_pps a=50t2pK5VMbmlHzFWWp8p/g==:117 a=pBdeej1U2jlWEHTh2vTwjw==:17 a=IkcTkHD0fZMA:10 a=zJRp6_cAMcgA:10 a=M51BFTxLslgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=gowsoOTTUOVcmtlkKump:22 a=EUspDBNiAAAA:8 a=z13N04a_aYECidN-mk8A:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=IoWCM6iH3mJn3m4BftBB:22 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-11-05_03,2026-11-04_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 clxscore=1015 spamscore=0 phishscore=0 suspectscore=0 impostorscore=0 adultscore=0 priorityscore=1501 malwarescore=0 lowpriorityscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610300000 definitions=main-2611050052 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=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.180.131; envelope-from=philmd@oss.qualcomm.com; helo=mx0b-0031df01.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_LOW=-0.7, 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 @qualcomm.com) X-ZM-MESSAGEID: 1793884620501158500 icount_configure() rejects "shift=3Dauto" combined with "align=3Don" or "sleep=3Doff", but the checks read the file-scope variables icount_align_option and icount_sleep. Those are only assigned from the parsed options after the checks, so at that point they still hold their defaults (false and true). Neither check can trigger, and both invalid combinations were silently accepted: $ qemu-system-aarch64 -M virt -icount shift=3Dauto,sleep=3Doff $ qemu-system-aarch64 -M virt -icount shift=3Dauto,align=3Don Test the values just parsed from the command line instead. Both commands now fail with: qemu-system-aarch64: -icount shift=3Dauto,sleep=3Doff: shift=3Dauto and s= leep=3Doff are incompatible qemu-system-aarch64: -icount shift=3Dauto,align=3Don: shift=3Dauto and al= ign=3Don are incompatible Valid combinations still accepted: - shift=3Dauto - shift=3D3,sleep=3Doff - shift=3D3,align=3Don Fixes: abc9bf69a66a ("cpus: Fix configure_icount() error API violation") Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- accel/tcg/icount-common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/accel/tcg/icount-common.c b/accel/tcg/icount-common.c index b1b6c005fe71..840ac418e658 100644 --- a/accel/tcg/icount-common.c +++ b/accel/tcg/icount-common.c @@ -441,10 +441,10 @@ bool icount_configure(QemuOpts *opts, Error **errp) error_setg(errp, "icount: Invalid shift value"); return false; } - } else if (icount_align_option) { + } else if (align) { error_setg(errp, "shift=3Dauto and align=3Don are incompatible"); return false; - } else if (!icount_sleep) { + } else if (!sleep) { error_setg(errp, "shift=3Dauto and sleep=3Doff are incompatible"); return false; } --=20 2.55.0