From nobody Wed Apr 16 13:34:38 2025 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=1695930191; cv=none; d=zohomail.com; s=zohoarc; b=Hwk2mzflVYTO+2EGxPxkD4OO4RD0YmkSxqgS7TgKG2Ye1Xl8m8+7apm/JkCwsGADPgY3X5qG7yUyk+rNKFylAZLsxWjq+Jl1DEDhqHn33+but33+iHdGbgvYmoRjo+kgL7FquhhDjc7eH2okFp2fHiDx5NSh4LjFdvO+oM3Z2HM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1695930191; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=t5+OWaefyNNMkLVduE/VRJ4ajnCIurTsfMfEZxbDqbs=; b=FQ6V0yxhYQo7rmdpT77p1q30lNS5idbKQRPTEyVdrpcJa/8C+gdUXk8dHUGDH4KiRaVxmNiIXHMvFVilOJ7qgJvTp62y2MpcFPFjJfO+MmDVsmjPchFG7ECpx5VCwZ3Lj1Az0yOcdJEtvPIq1J8VMQC6VRemS1z8SV9WcCsaUnI= 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 169593019120565.07089630882729; Thu, 28 Sep 2023 12:43:11 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qlwtj-0007y4-LO; Thu, 28 Sep 2023 15:42:07 -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 1qlwti-0007vs-4j for qemu-devel@nongnu.org; Thu, 28 Sep 2023 15:42:06 -0400 Received: from mail-pl1-x62b.google.com ([2607:f8b0:4864:20::62b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qlwtf-0007xn-JL for qemu-devel@nongnu.org; Thu, 28 Sep 2023 15:42:05 -0400 Received: by mail-pl1-x62b.google.com with SMTP id d9443c01a7336-1c724577e1fso34557915ad.0 for ; Thu, 28 Sep 2023 12:42:03 -0700 (PDT) Received: from stoup.. ([71.212.131.115]) by smtp.gmail.com with ESMTPSA id x23-20020a170902821700b001b80d399730sm15273450pln.242.2023.09.28.12.42.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Sep 2023 12:42:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1695930122; x=1696534922; 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=t5+OWaefyNNMkLVduE/VRJ4ajnCIurTsfMfEZxbDqbs=; b=MIr6p1nzHUqHrWCyQaevbx0xjJ5ps6OCYkxetj6rqwDRETUNqGcJ6jpAG2m5f+9u7t 8I9kLr1GhTquXWFDv29jK4CivzsrZbzTGTh9RBE+8wqvZG3jGt576LZpFXNUIw7SwO5u 6oWUB0bJI4zfXEWebjEDFl6epmLdpmCJ3YsSNOgLxza2Cn9JIM+tzirtwoGCOUNwungM 1r1MeqLs/gD7xJH+tDk+0dwZpH4yMkHgIk02WFPcbOejxtRAOmQ9sIS7a2EKRWGmmWLe UbAxDWsfcM5862YmO9HheFbc+Xamh53HEFgHvnJJ2bPP+UPKA/MxxlwbKAoWWsy/Q8sW ulJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695930122; x=1696534922; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=t5+OWaefyNNMkLVduE/VRJ4ajnCIurTsfMfEZxbDqbs=; b=OXIlW9m9QhXNpGIHLoxjjHBgi7OkS3uu1pTN0y51SCQ1VW1tvS33p3CEQgTmyOw7J9 QbsyvZUZpeNWkb4yXr9slMug2aFSkxgkIiQcCtRg/07N0zAaAQx6YizN0+wMLUkkScyQ r6FnmThTruaLgeyt2kfFYqvfGHsursekXEXTAYkNKjb2dxcJH0Or0/UDZNDCNXBz7I6Q vQ3Y2NIExNmh+ythB7SNvnjzSpJSoWHJggrk/ymSeuXtMlVHA0u+Jh4HUuGEXiNHR4LC 8+xWrsuUMmQfGwMeJURnL1x08Hok5tfrkjXVr3w19qe9rcuBGh6MYekZNz51eeZ1sC3g ldWg== X-Gm-Message-State: AOJu0YwCYNVG0LJ5/uWb3e0/g67MFmzfnPwoDxvyZXOH0Gc8s/vRDsdk gZWZ+Ak3swut1DwZ9dY5pPZi/PpqT3E6K9q2RXk= X-Google-Smtp-Source: AGHT+IE2cL82n53So+MqOZG6b5UrFbc9Z4gcZ7JqjB0DhfNCfeZL5HEHzq5De/pi8X33c2hY1rKMtQ== X-Received: by 2002:a17:903:22cd:b0:1c6:2dbb:e5f4 with SMTP id y13-20020a17090322cd00b001c62dbbe5f4mr1974648plg.26.1695930121905; Thu, 28 Sep 2023 12:42:01 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PULL 4/6] accel/tcg: Improve setting of can_do_io at start of TB Date: Thu, 28 Sep 2023 12:41:54 -0700 Message-Id: <20230928194156.237351-5-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230928194156.237351-1-richard.henderson@linaro.org> References: <20230928194156.237351-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::62b; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62b.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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1695930191590100001 Initialize can_do_io to true if this the TB has CF_LAST_IO and will consist of a single instruction. This avoids a set to 0 followed immediately by a set to 1. Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Richard Henderson --- accel/tcg/translator.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/accel/tcg/translator.c b/accel/tcg/translator.c index 850d82e26f..dd507cd471 100644 --- a/accel/tcg/translator.c +++ b/accel/tcg/translator.c @@ -87,12 +87,12 @@ static TCGOp *gen_tb_start(DisasContextBase *db, uint32= _t cflags) offsetof(ArchCPU, neg.icount_decr.u16.low) - offsetof(ArchCPU, env)); /* - * cpu->can_do_io is cleared automatically here at the beginning of + * cpu->can_do_io is set automatically here at the beginning of * each translation block. The cost is minimal and only paid for * -icount, plus it would be very easy to forget doing it in the * translator. */ - set_can_do_io(db, false); + set_can_do_io(db, db->max_insns =3D=3D 1 && (cflags & CF_LAST_IO)); } =20 return icount_start_insn; --=20 2.34.1