From nobody Wed Nov 5 08:16:05 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 1533024288187511.4681391033321; Tue, 31 Jul 2018 01:04:48 -0700 (PDT) Received: from localhost ([::1]:57451 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fkPe6-0008Ea-1E for importer@patchew.org; Tue, 31 Jul 2018 04:04:42 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59041) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fkPca-0007az-E6 for qemu-devel@nongnu.org; Tue, 31 Jul 2018 04:03:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fkPcY-00019m-Fp for qemu-devel@nongnu.org; Tue, 31 Jul 2018 04:03:08 -0400 Received: from mail-wm0-x22e.google.com ([2a00:1450:400c:c09::22e]:37316) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fkPcY-00019T-8e for qemu-devel@nongnu.org; Tue, 31 Jul 2018 04:03:06 -0400 Received: by mail-wm0-x22e.google.com with SMTP id n11-v6so2064522wmc.2 for ; Tue, 31 Jul 2018 01:03:06 -0700 (PDT) Received: from donizetti.redhat.com (94-36-184-250.adsl-ull.clienti.tiscali.it. [94.36.184.250]) by smtp.gmail.com with ESMTPSA id j8-v6sm21748565wru.41.2018.07.31.01.03.04 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 31 Jul 2018 01:03:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=mVGG8CfF6Kshx44JW65lQ4owKbknGmlxrebPh8h7YGU=; b=vVbbKVyyrh2rQU/95P1y9KLYwVv6lO2FbfbTrLRhGBjUu71hJ6C3j3A3Lny47J7eNi Yk6JYakRIoC6LtCqnj0C2RRYENjxB4NZ6vd7vKcH/B4Y5mVCf0f4rYRsjsAhSZQ3bHlJ Z0KtzrkwXBxhEuPq0LeNbQ0a9zrJiC5cTl7MEbHtS8Uvo+R/bhzHsaXJEsCyzIE68GpM UDJkbeuu2uG/odahUHGKGDkJZv+mAEt2NxRP3JBCMH+Aj8LAK0N96RVgj5YqGUkmniVV GdZJbIti7y4s/qVlDIyOhpSpDlErC7Qs1UEYPHUDIryTgvBO3COgybGLpSG39CX03SSD lapw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=mVGG8CfF6Kshx44JW65lQ4owKbknGmlxrebPh8h7YGU=; b=HOke9zjs3M5lRfB71DtDm3UN8z4rqtn23wj0EHxWD1HcgoYlv6YemypzJBc7mFlNN3 Zw/gkUXZvsbuu1bdQJZPc0shrb4m2xsunYN2WP/yBQZXh2EDNMN3ikad4/H5S/XmCU9Z SBUs+RGRoSBrY0+rFOYpe/RtU72MrBXr+QmcZGuA06g5+QYFoTh8f0QBiZZ0KuUDtrJn p17d28fxVMWT1eKSbVzLjY3rnDjGEW28/PHvXoLua7mh3eevgjZis2XUJyFcY8IfaBGJ aSIo1gb8xsPSW1ErxNkwWXR9zFbXjwVz9KhAQBdSbYoiCn7vFx4kFIMwSPNNCF1rWeo8 dQrA== X-Gm-Message-State: AOUpUlFfEeTY8Gs4tmhmKHZpukCZPM0ANPe+H6elE63Dm0rvVdPwIDHp oa+Ymyyf7OEn4SUD0iIZUVruOgqH X-Google-Smtp-Source: AAOMgpdetnYWbDluZFFTlkbtXvd3syi6D+fQVTn881siOHVefdB0zzzEmKlpsUtRLhAXjKoeyj1Csw== X-Received: by 2002:a1c:7908:: with SMTP id l8-v6mr1485253wme.80.1533024184901; Tue, 31 Jul 2018 01:03:04 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Tue, 31 Jul 2018 10:02:58 +0200 Message-Id: <20180731080259.15934-4-pbonzini@redhat.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180731080259.15934-1-pbonzini@redhat.com> References: <20180731080259.15934-1-pbonzini@redhat.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c09::22e Subject: [Qemu-devel] [PULL 3/4] timer: remove replay clock probe in deadline calculation X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Pavel Dovgalyuk Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Pavel Dovgalyuk Ciro Santilli reported that commit a5ed352596a8b7eb2f9acce34371b944ac3056c4 breaks the execution replay. It happens due to the probing the clock for the new instances of iothread. However, this probing was made in replay mode for the timer lists that are empty. This patch removes clock probing in replay mode. It is an artifact of the old version with another thread model. Signed-off-by: Pavel Dovgalyuk Message-Id: <20180725121526.12867.17866.stgit@pasha-VirtualBox> Signed-off-by: Paolo Bonzini --- util/qemu-timer.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/util/qemu-timer.c b/util/qemu-timer.c index 2ed1bf2..86bfe84 100644 --- a/util/qemu-timer.c +++ b/util/qemu-timer.c @@ -578,17 +578,10 @@ int64_t timerlistgroup_deadline_ns(QEMUTimerListGroup= *tlg) { int64_t deadline =3D -1; QEMUClockType type; - bool play =3D replay_mode =3D=3D REPLAY_MODE_PLAY; for (type =3D 0; type < QEMU_CLOCK_MAX; type++) { if (qemu_clock_use_for_deadline(type)) { - if (!play || type =3D=3D QEMU_CLOCK_REALTIME) { - deadline =3D qemu_soonest_timeout(deadline, - timerlist_deadline_ns(tlg-= >tl[type])); - } else { - /* Read clock from the replay file and - do not calculate the deadline, based on virtual clock. = */ - qemu_clock_get_ns(type); - } + deadline =3D qemu_soonest_timeout(deadline, + timerlist_deadline_ns(tlg->tl[= type])); } } return deadline; --=20 1.8.3.1