From nobody Thu Nov 6 08:26:16 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=gmail.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1539764859373478.2640500908236; Wed, 17 Oct 2018 01:27:39 -0700 (PDT) Received: from localhost ([::1]:34492 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gChB0-0007xy-61 for importer@patchew.org; Wed, 17 Oct 2018 04:27:34 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50636) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gCh9G-00073S-US for qemu-devel@nongnu.org; Wed, 17 Oct 2018 04:25:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gCh9D-0008Gm-Nx for qemu-devel@nongnu.org; Wed, 17 Oct 2018 04:25:46 -0400 Received: from mail-lj1-x242.google.com ([2a00:1450:4864:20::242]:33692) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gCh9D-0008GD-F6 for qemu-devel@nongnu.org; Wed, 17 Oct 2018 04:25:43 -0400 Received: by mail-lj1-x242.google.com with SMTP id z21-v6so23507341ljz.0 for ; Wed, 17 Oct 2018 01:25:43 -0700 (PDT) Received: from localhost.localdomain ([77.221.221.49]) by smtp.gmail.com with ESMTPSA id h77-v6sm3897735ljf.59.2018.10.17.01.25.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 17 Oct 2018 01:25:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=6s46CLkP3WBKP3BFUmSls4Dh8c0Fi5LlejOEvPYz+to=; b=uyr5Jxb+uKfJQvdGTsb0rFQaIbz5cqu1Ar3SSZmJscDPqyMaRcEvU5WDIqLPdJEWuU HG/g6z4Uhn5kE6GW9aOq4WmsxmQVgfculssv5WoRhEveJ7pX8t+DdkwvczYMrPIKGf1K jE7u9MQ/P5Ut/GFxyurHEnbhbG/6LTk1Mkbe1yUA8uylVNNpI8mhmo4czcETA56AiFEh iQB8fgfzIMapJ6A94UqPYR3WUOhP6KaDQwFKjH+Y+kU8IBJ/tg7wcX7XWudVwv3gHVoB DqIYNpr2WcFDs3kfZiaNRA6EyTLc+EQhRcQm904s8j/ODzFS8DnL4rbM/7L+fliLhu8V 9iYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=6s46CLkP3WBKP3BFUmSls4Dh8c0Fi5LlejOEvPYz+to=; b=m1ILMOtLItU6jTBOd05O6emQjZVGNmrj237wR1Y+tCXzCSgv/1/rHkKDYxRSzMlGcB AyJmQYdl+X02SaW4h+4S+s8tnF7plcD8JNXXDwtfuDNMBrZ0jteMKDxm7wUdk7Q2inWt 6GPbztySABsp5OjTrF7eyK51eozAYEk70BZw935ldXkwh45H3daGoZzhMa1ujYrqtzBq VXyZg8a2CeooJgMAWkR6O6LANbLQTuLNM0Ys83wedtKq1cGX8IZuLMntESL13Dn96/Zc 19dWwcL1KFnUaOGrrKcvomyFk4chYp6zo3YP41IGEUU4JWQD1fWp79OQ2EWFyeT3iyir 7T0A== X-Gm-Message-State: ABuFfojn0VHq6c2nEcY5oUXAGSrpwVE5SWq01JeZmwW7ZyPZ91eTJJ4s CYNxJBvqcTR9HbzNQ/1Z74GbzCrjoio= X-Google-Smtp-Source: ACcGV60k2D9L8aThxVm680gcI/Yyuf43Em9PJVR1eFv4yTokoB6BIror9u8ZjZqOw4Ld62Ggiof6VA== X-Received: by 2002:a2e:7217:: with SMTP id n23-v6mr11842029ljc.71.1539764741576; Wed, 17 Oct 2018 01:25:41 -0700 (PDT) From: Artem Pisarenko To: qemu-devel@nongnu.org Date: Wed, 17 Oct 2018 14:24:18 +0600 Message-Id: <18b1e7c8f155fe26976f91be06bde98eef6f8751.1539764043.git.artem.k.pisarenko@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: References: In-Reply-To: References: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::242 Subject: [Qemu-devel] [PATCH v2 1/4] Revert some patches from recent [PATCH v6] "Fixing record/replay and adding reverse debugging" 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: Jan Kiszka , Gerd Hoffmann , Pavel Dovgalyuk , Samuel Thibault , Paolo Bonzini , Artem Pisarenko Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDMRC_1 RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" That patch series introduced new virtual clock type for use in external sub= systems. It breaks desired behavior in non-record/replay usage scenarios. This reverts commit 87f4fe7653baf55b5c2f2753fe6003f473c07342. This reverts commit 775a412bf83f6bc0c5c02091ee06cf649b34c593. This reverts commit 9888091404a702d7ec79d51b088d994b9fc121bd. Signed-off-by: Artem Pisarenko --- include/qemu/timer.h | 9 --------- slirp/ip6_icmp.c | 7 +++---- ui/input.c | 8 ++++---- util/qemu-timer.c | 2 -- 4 files changed, 7 insertions(+), 19 deletions(-) diff --git a/include/qemu/timer.h b/include/qemu/timer.h index a005ed2..39ea907 100644 --- a/include/qemu/timer.h +++ b/include/qemu/timer.h @@ -42,14 +42,6 @@ * In icount mode, this clock counts nanoseconds while the virtual * machine is running. It is used to increase @QEMU_CLOCK_VIRTUAL * while the CPUs are sleeping and thus not executing instructions. - * - * @QEMU_CLOCK_VIRTUAL_EXT: virtual clock for external subsystems - * - * The virtual clock only runs during the emulation. It stops - * when the virtual machine is stopped. The timers for this clock - * do not recorded in rr mode, therefore this clock could be used - * for the subsystems that operate outside the guest core. - * */ =20 typedef enum { @@ -57,7 +49,6 @@ typedef enum { QEMU_CLOCK_VIRTUAL =3D 1, QEMU_CLOCK_HOST =3D 2, QEMU_CLOCK_VIRTUAL_RT =3D 3, - QEMU_CLOCK_VIRTUAL_EXT =3D 4, QEMU_CLOCK_MAX } QEMUClockType; =20 diff --git a/slirp/ip6_icmp.c b/slirp/ip6_icmp.c index 3f41187..ee333d0 100644 --- a/slirp/ip6_icmp.c +++ b/slirp/ip6_icmp.c @@ -17,7 +17,7 @@ static void ra_timer_handler(void *opaque) { Slirp *slirp =3D opaque; timer_mod(slirp->ra_timer, - qemu_clock_get_ms(QEMU_CLOCK_VIRTUAL_EXT) + NDP_Interval); + qemu_clock_get_ms(QEMU_CLOCK_VIRTUAL) + NDP_Interval); ndp_send_ra(slirp); } =20 @@ -27,10 +27,9 @@ void icmp6_init(Slirp *slirp) return; } =20 - slirp->ra_timer =3D timer_new_ms(QEMU_CLOCK_VIRTUAL_EXT, - ra_timer_handler, slirp); + slirp->ra_timer =3D timer_new_ms(QEMU_CLOCK_VIRTUAL, ra_timer_handler,= slirp); timer_mod(slirp->ra_timer, - qemu_clock_get_ms(QEMU_CLOCK_VIRTUAL_EXT) + NDP_Interval); + qemu_clock_get_ms(QEMU_CLOCK_VIRTUAL) + NDP_Interval); } =20 void icmp6_cleanup(Slirp *slirp) diff --git a/ui/input.c b/ui/input.c index dd7f6d7..51b1019 100644 --- a/ui/input.c +++ b/ui/input.c @@ -271,7 +271,7 @@ static void qemu_input_queue_process(void *opaque) item =3D QTAILQ_FIRST(queue); switch (item->type) { case QEMU_INPUT_QUEUE_DELAY: - timer_mod(item->timer, qemu_clock_get_ms(QEMU_CLOCK_VIRTUAL_EX= T) + timer_mod(item->timer, qemu_clock_get_ms(QEMU_CLOCK_VIRTUAL) + item->delay_ms); return; case QEMU_INPUT_QUEUE_EVENT: @@ -301,7 +301,7 @@ static void qemu_input_queue_delay(struct QemuInputEven= tQueueHead *queue, queue_count++; =20 if (start_timer) { - timer_mod(item->timer, qemu_clock_get_ms(QEMU_CLOCK_VIRTUAL_EXT) + timer_mod(item->timer, qemu_clock_get_ms(QEMU_CLOCK_VIRTUAL) + item->delay_ms); } } @@ -448,8 +448,8 @@ void qemu_input_event_send_key_delay(uint32_t delay_ms) } =20 if (!kbd_timer) { - kbd_timer =3D timer_new_ms(QEMU_CLOCK_VIRTUAL_EXT, - qemu_input_queue_process, &kbd_queue); + kbd_timer =3D timer_new_ms(QEMU_CLOCK_VIRTUAL, qemu_input_queue_pr= ocess, + &kbd_queue); } if (queue_count < queue_limit) { qemu_input_queue_delay(&kbd_queue, kbd_timer, diff --git a/util/qemu-timer.c b/util/qemu-timer.c index eb60d8f..86bfe84 100644 --- a/util/qemu-timer.c +++ b/util/qemu-timer.c @@ -496,7 +496,6 @@ bool timerlist_run_timers(QEMUTimerList *timer_list) =20 switch (timer_list->clock->type) { case QEMU_CLOCK_REALTIME: - case QEMU_CLOCK_VIRTUAL_EXT: break; default: case QEMU_CLOCK_VIRTUAL: @@ -598,7 +597,6 @@ int64_t qemu_clock_get_ns(QEMUClockType type) return get_clock(); default: case QEMU_CLOCK_VIRTUAL: - case QEMU_CLOCK_VIRTUAL_EXT: if (use_icount) { return cpu_get_icount(); } else { --=20 2.7.4