From nobody Tue Feb 10 15:45:06 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.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; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1566285564; cv=none; d=zoho.com; s=zohoarc; b=haj/eoT5SZhP2R7QZODLYAGOqrqgxtbul7Uwb8RUCBRuW8Ey/Vh1wcIx9siUNB7m8FXDN+0y5SzG71OfqIZ1ZEQ0PfNAUxU+my01jDbHzF1Sb2lyBA0XFfXMIMq5WgL/wQRi4hVRS8OKkDD1eUcy7QUjCuTTPuQNJglMEflCDZM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1566285564; h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=nMbSmWZxwxWoLkT9WnnpX4a6uiJ7JryBtkWh/rLWxl8=; b=gPKDR/EnBjx1IObV9pGCq0HOsS+25jCc1VHwhsNsN8XEIghE3ByRcayfj+msfypzomCNmj1ono+qA9lXHinbwz3hrxu4brRHQJbZRB31XMfOYOPawKI2vyetUTS0JoeEVDNpFWtjNLT4biKl9IMUPvJ3fHKFGDsg04agFGfNdxg= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1566285564274299.67444928428336; Tue, 20 Aug 2019 00:19:24 -0700 (PDT) Received: from localhost ([::1]:33980 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1hzyQM-0001vE-TD for importer@patchew.org; Tue, 20 Aug 2019 03:19:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42733) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1hzy8h-0005mk-R1 for qemu-devel@nongnu.org; Tue, 20 Aug 2019 03:01:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hzy8d-0003VB-Cr for qemu-devel@nongnu.org; Tue, 20 Aug 2019 03:01:05 -0400 Received: from mx1.redhat.com ([209.132.183.28]:37164) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hzy8c-0003RG-Rh for qemu-devel@nongnu.org; Tue, 20 Aug 2019 03:01:03 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9C6A630BB370; Tue, 20 Aug 2019 07:01:00 +0000 (UTC) Received: from 640k.localdomain.com (ovpn-112-20.ams2.redhat.com [10.36.112.20]) by smtp.corp.redhat.com (Postfix) with ESMTP id 97CB660F88; Tue, 20 Aug 2019 07:00:59 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Tue, 20 Aug 2019 08:59:43 +0200 Message-Id: <1566284395-30287-25-git-send-email-pbonzini@redhat.com> In-Reply-To: <1566284395-30287-1-git-send-email-pbonzini@redhat.com> References: <1566284395-30287-1-git-send-email-pbonzini@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.49]); Tue, 20 Aug 2019 07:01:00 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 24/36] replay: fix replay shutdown X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 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" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Pavel Dovgalyuk This patch fixes shutdown of the replay process, which is terminated with the assert when shutdown event is read from the log. replay_finish_event reads new data_kind and therefore the value of data_kind should be preserved to be valid at qemu_system_shutdown_request call. Signed-off-by: Pavel Dovgalyuk Message-Id: <156404427238.18669.12378772823692338069.stgit@pasha-Precision-= 3630-Tower> Signed-off-by: Paolo Bonzini --- replay/replay.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/replay/replay.c b/replay/replay.c index 8b172b2..8d77a4c 100644 --- a/replay/replay.c +++ b/replay/replay.c @@ -45,14 +45,14 @@ bool replay_next_event_is(int event) } =20 while (true) { - if (event =3D=3D replay_state.data_kind) { + unsigned int data_kind =3D replay_state.data_kind; + if (event =3D=3D data_kind) { res =3D true; } - switch (replay_state.data_kind) { + switch (data_kind) { case EVENT_SHUTDOWN ... EVENT_SHUTDOWN_LAST: replay_finish_event(); - qemu_system_shutdown_request(replay_state.data_kind - - EVENT_SHUTDOWN); + qemu_system_shutdown_request(data_kind - EVENT_SHUTDOWN); break; default: /* clock, time_t, checkpoint and other events */ --=20 1.8.3.1