From nobody Tue Feb 10 01:22:33 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; 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=fail(p=none dis=none) header.from=ispras.ru ARC-Seal: i=1; a=rsa-sha256; t=1615371879; cv=none; d=zohomail.com; s=zohoarc; b=VPdcgEXRw1AOZaCg0ft9ZVVUCsT7OwI2RjNUQLBZczbgubzExJGpNH+bIx1H8rrghW+JqQiV+ySISKfBnmJoBt+6yQMNKhBAi1KzCD7ztFYBvrppejZS2NiMkhTyX+mHd7ZO4WIAvYvGNZCQiOVi8RVxKrn9K8c+93ZCw9ztXV4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1615371879; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=zZxh24PMo95t7kRj+q/0FRc+/2ctvRakaQ+yeQwwOfk=; b=OGbOi5ulMh28x5UAtZgL68WMWNW6Dof2UcTXHQSfeweQVLfi/XLi01HKrwSGZqHe0ll1HDUXP1m1ayaBq/K1+acewBv+8LJHe//OxsFw7g/6Z1LAViOrGdDondF6ivns0s04/AcTfy3YKikVIjO2LGwWpYoFHAJX5VvBcaaXNpI= ARC-Authentication-Results: i=1; mx.zohomail.com; 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=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 1615371879608875.5119584878937; Wed, 10 Mar 2021 02:24:39 -0800 (PST) Received: from localhost ([::1]:44054 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lJw18-00047N-Go for importer@patchew.org; Wed, 10 Mar 2021 05:24:38 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:35796) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lJvyX-0001AM-W4 for qemu-devel@nongnu.org; Wed, 10 Mar 2021 05:21:58 -0500 Received: from mail.ispras.ru ([83.149.199.84]:53406) by eggs.gnu.org with esmtps (TLS1.2:DHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lJvyS-00045Y-19 for qemu-devel@nongnu.org; Wed, 10 Mar 2021 05:21:57 -0500 Received: from [127.0.1.1] (unknown [85.142.117.224]) by mail.ispras.ru (Postfix) with ESMTPSA id 3806C40D403D; Wed, 10 Mar 2021 10:21:40 +0000 (UTC) Subject: [PATCH] hw/i8254: fix vmstate load From: Pavel Dovgalyuk To: qemu-devel@nongnu.org Date: Wed, 10 Mar 2021 13:21:40 +0300 Message-ID: <161537170060.6654.9430112746749476215.stgit@pasha-ThinkPad-X280> User-Agent: StGit/0.23 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=83.149.199.84; envelope-from=pavel.dovgalyuk@ispras.ru; helo=mail.ispras.ru X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, 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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: pbonzini@redhat.com, pavel.dovgalyuk@ispras.ru, mst@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" QEMU timer of channel 0 in i8254 is used to raise irq at the specified moment of time. This irq can be disabled with irq_disabled flag. But when vmstate of the pit is loaded, timer may be rearmed despite the disabled interrupts. This patch adds irq_disabled flag check to fix that. Signed-off-by: Pavel Dovgalyuk --- hw/timer/i8254.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/timer/i8254.c b/hw/timer/i8254.c index c01ee2c72a..c8388ea432 100644 --- a/hw/timer/i8254.c +++ b/hw/timer/i8254.c @@ -324,7 +324,7 @@ static void pit_post_load(PITCommonState *s) { PITChannelState *sc =3D &s->channels[0]; =20 - if (sc->next_transition_time !=3D -1) { + if (sc->next_transition_time !=3D -1 && !sc->irq_disabled) { timer_mod(sc->irq_timer, sc->next_transition_time); } else { timer_del(sc->irq_timer);