From nobody Thu Nov 6 01:09:04 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 (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1538296774201979.3751818316344; Sun, 30 Sep 2018 01:39:34 -0700 (PDT) Received: from localhost ([::1]:54350 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g6XGC-0001UR-RY for importer@patchew.org; Sun, 30 Sep 2018 04:39:28 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41711) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g6Ws9-0002yg-3y for qemu-devel@nongnu.org; Sun, 30 Sep 2018 04:14:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g6Ws8-0001Dm-9v for qemu-devel@nongnu.org; Sun, 30 Sep 2018 04:14:37 -0400 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]:34300) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1g6Ws6-0001Bc-E7 for qemu-devel@nongnu.org; Sun, 30 Sep 2018 04:14:35 -0400 Received: by mail-wr1-x444.google.com with SMTP id z4-v6so9105380wrb.1 for ; Sun, 30 Sep 2018 01:14:33 -0700 (PDT) Received: from 640k.lan (94-36-187-248.adsl-ull.clienti.tiscali.it. [94.36.187.248]) by smtp.gmail.com with ESMTPSA id u76-v6sm11369194wmd.10.2018.09.30.01.14.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 30 Sep 2018 01:14:31 -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=u+Es7J0GBGSoFSiIko+xQeW+hHOI6WOj4TXAfVZvLOA=; b=qDO5x8RARpLhUfa/MXyMFzYeukgHJcuUZY1o/siI0vX/c3LPNIbCDu/SEKKn/V2Vnc 3cnw2z8wtGcbfx4J3++4Uzlrfb9hSBYXkjDpUGQ9UEyL2FIUT6XxSWczoiD14YhToNeo zN+5yrM7LVfCKaQa5oVWNNn1qEvs8KcadyZC5PoAx6rC57vNti7auLiiN+h7DD7rBGZV pSvWuCoUMN20ubkdJJWDyaYF20Bcy4z4CC9Qv07mvbExqAtWT3p0L/teHQfT1TTo5iMu iPJXQhMH55R8p+4Pfj7IHHnwPiOl7SIK3RI9XCtkmbb+ZovSlFBABUZz6BzDJJo13VZL 4b5Q== 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=u+Es7J0GBGSoFSiIko+xQeW+hHOI6WOj4TXAfVZvLOA=; b=aTHuP12FFagDQuDCPBM6Tt0NNxT5/lr/3PuoL3vq87UqBximyED+MpAkWojypsXNBi V+7gE4H28psQs0ctCXkxzuGX2rDPz+SCDhk6T/uZqMLhmJH3y+6OtaSa8ITlqbpssqY1 Hl0eMn91DwXvo3zRwMFPprAkS7ZsjHfb4VIRJqQ8MMN0N+OiJcH0DLJ5CEIxvPNmGigz UDaEcwPEJ0HjaxbWIeCpYpq9LfUK95r2dtrDnAupbq8VrdMsgOi1Cm5A0mjlTD9ifBFF suvW3emRJ8UhhjUdDtrIXYrVVJk6W6RcsClZ36ONcOdoBBVctLdMbJTas6uVfbBiye88 ZDKA== X-Gm-Message-State: ABuFfohMrm4v8i9qKNsKMOU2E01sgKU7ge1+9aoV+g68gc8BZHskhaEB 8IROv7RhgsUmQ9meQwFIR2Wd53SM X-Google-Smtp-Source: ACcGV61VAOxyxR3d3IgmWq3wjC6jcj2ZtGaMgufW7SAcTN44g6Gy5fDK2tmqJ+fxPmc3/eLtZTkgKA== X-Received: by 2002:adf:a144:: with SMTP id r4-v6mr3643840wrr.169.1538295272182; Sun, 30 Sep 2018 01:14:32 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Sun, 30 Sep 2018 10:13:08 +0200 Message-Id: <1538295197-23704-71-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1538295197-23704-1-git-send-email-pbonzini@redhat.com> References: <1538295197-23704-1-git-send-email-pbonzini@redhat.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::444 Subject: [Qemu-devel] [PULL 70/79] replay: replay BH for IDE trim operation 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: 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" From: Pavel Dovgalyuk This patch makes IDE trim BH deterministic, because it affects the device state. Therefore its invocation should be replayed instead of running at the random moment. Signed-off-by: Pavel Dovgalyuk Reviewed-by: Paolo Bonzini Message-Id: <20180912081950.3228.68987.stgit@pasha-VirtualBox> Acked-by: John Snow Signed-off-by: Paolo Bonzini --- hw/ide/core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/ide/core.c b/hw/ide/core.c index 2c62efc..04e22e7 100644 --- a/hw/ide/core.c +++ b/hw/ide/core.c @@ -35,6 +35,7 @@ #include "sysemu/block-backend.h" #include "qapi/error.h" #include "qemu/cutils.h" +#include "sysemu/replay.h" =20 #include "hw/ide/internal.h" #include "trace.h" @@ -479,7 +480,7 @@ static void ide_issue_trim_cb(void *opaque, int ret) done: iocb->aiocb =3D NULL; if (iocb->bh) { - qemu_bh_schedule(iocb->bh); + replay_bh_schedule_event(iocb->bh); } } =20 --=20 1.8.3.1