From patchwork Sun Oct 14 14:55:07 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Artem Pisarenko X-Patchwork-Id: 10640669 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B514E112B for ; Sun, 14 Oct 2018 14:57:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A0F3F25223 for ; Sun, 14 Oct 2018 14:57:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 925B328E8F; Sun, 14 Oct 2018 14:57:59 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.7 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 178E525223 for ; Sun, 14 Oct 2018 14:57:59 +0000 (UTC) Received: from localhost ([::1]:48641 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gBhqA-0000yq-99 for patchwork-qemu-devel@patchwork.kernel.org; Sun, 14 Oct 2018 10:57:58 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56652) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gBhox-0008LX-8h for qemu-devel@nongnu.org; Sun, 14 Oct 2018 10:56:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gBhot-0002MU-4m for qemu-devel@nongnu.org; Sun, 14 Oct 2018 10:56:43 -0400 Received: from mail-lj1-x243.google.com ([2a00:1450:4864:20::243]:43530) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gBhos-0002BB-RD for qemu-devel@nongnu.org; Sun, 14 Oct 2018 10:56:39 -0400 Received: by mail-lj1-x243.google.com with SMTP id r8-v6so15208521ljc.10 for ; Sun, 14 Oct 2018 07:56:38 -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=MQMAve9qAuvPsobeD1xmEjXP2Dp+ucvJJIwHuZAMQB8=; b=VQpRVALN8VbiEN2ZD36KhAtJ2FCmw7v9pMymEGCnHvFLFrWk7DbsDvUoyw7OYEN90m jdWJyt/HmbG4PguR7RkVovf8C+xC7rjWtiQJXkzYOk8x9+guErhhSQFmog6B8XUGwsin WPjNLj5OmdrvTCGO86ZGGOLm0Qd+r6+RTBAo1y7AALpMyuLA70gooME6IvO8YI/8MtFp 6D81TuALslEvjx2RJYwCW50ae8DcKCyDi3pHeK6CBS41nqQEonrg3QbeK/DROIN7vqbL hKi5PyWviCAgjAfFjxRvzDT8xojxyyRq966bizNwQcc2RzWMPcO6y2QASKOTImt4lJc6 kk+g== 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=MQMAve9qAuvPsobeD1xmEjXP2Dp+ucvJJIwHuZAMQB8=; b=HQ1SV4Op5bR7rgVo+BxctMSw8LhVgHFSVUjqLjg0DSLOARLf2vj6qJyk2R/fjJ21U9 T6ihSjRmXUw1B5JgazBMSlN/9G92ssPXbRoena8CY5hBKkEUP2ZcqqXuBknbnWJODdUa yEe0aLc8g+bUW/6ofYii8rTFFmBGprkHKqo5Kx5ZOutjIsPsLSSyjwW3Zkc0VVfUIGAC Iye4bm4GXs+xkE5rgXCxmEjTiqeJeC9qLCv/xCqWUwIHlJ9vkDZLVT57QRmrIusTvier 3bO9U8CcFPHfdfvoLQVyH/605UANoNVfGfC48uIdv5qKR58Vzh19OkDaL5gJBB6ussLx kjaQ== X-Gm-Message-State: ABuFfoh2+KiHlVjs6NO19YKhktDw/vafT3kG3EQkQN9AsLQxgtC8FB6+ 48SRSvlt6i95PyzvOT+/wEuG4dD6rQY= X-Google-Smtp-Source: ACcGV63u29A5fKlCV3azybC+r+94omu1AeDPMnDnVpkatulit80wLWPqIjp8e33juxDi5SII//rnMg== X-Received: by 2002:a2e:20f:: with SMTP id 15-v6mr8467692ljc.141.1539528996811; Sun, 14 Oct 2018 07:56:36 -0700 (PDT) Received: from localhost.localdomain ([77.221.221.49]) by smtp.gmail.com with ESMTPSA id b29-v6sm1516654lfj.81.2018.10.14.07.56.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 14 Oct 2018 07:56:36 -0700 (PDT) From: Artem Pisarenko To: qemu-devel@nongnu.org Date: Sun, 14 Oct 2018 20:55:07 +0600 Message-Id: <9b0f2ac8f5579c34806276315e32c465c06c5c8e.1539528213.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::243 Subject: [Qemu-devel] [PATCH 1/3] Revert some patches from recent series [PATCH v6] "Fixing record/replay and adding reverse debugging", which introduced new virtual clock type for use in external subsystems. These changes breaks desired behavior in non-record/replay usage scenarios. 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+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP 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. - * */ typedef enum { @@ -57,7 +49,6 @@ typedef enum { QEMU_CLOCK_VIRTUAL = 1, QEMU_CLOCK_HOST = 2, QEMU_CLOCK_VIRTUAL_RT = 3, - QEMU_CLOCK_VIRTUAL_EXT = 4, QEMU_CLOCK_MAX } QEMUClockType; 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 = 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); } @@ -27,10 +27,9 @@ void icmp6_init(Slirp *slirp) return; } - slirp->ra_timer = timer_new_ms(QEMU_CLOCK_VIRTUAL_EXT, - ra_timer_handler, slirp); + slirp->ra_timer = 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); } 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 = QTAILQ_FIRST(queue); switch (item->type) { case QEMU_INPUT_QUEUE_DELAY: - 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); return; case QEMU_INPUT_QUEUE_EVENT: @@ -301,7 +301,7 @@ static void qemu_input_queue_delay(struct QemuInputEventQueueHead *queue, queue_count++; 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) } if (!kbd_timer) { - kbd_timer = timer_new_ms(QEMU_CLOCK_VIRTUAL_EXT, - qemu_input_queue_process, &kbd_queue); + kbd_timer = timer_new_ms(QEMU_CLOCK_VIRTUAL, qemu_input_queue_process, + &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) 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 {