From nobody Sat May 4 16:28:43 2024 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=1617265355; cv=none; d=zohomail.com; s=zohoarc; b=dCNENRIUThsb8KeQKTCdw1MEuyzWV3lzkce474yDCecBwLCZcZPRKmXEOTYFYh2gJbTtZyaRlZuw67VVe+MhYxAsziY/S+T9e7/yIS/JPmSPr1JJxiDvtOK6mzGSPgj+byD7gvbF6ZVLrpA2fWz6DTvgSu/mFenYrOMGbOxUEIQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1617265355; 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=a01xe9MumM+Fdd6N2RIUQfgMKWdtHuXJfDPAJfJB2uY=; b=JHak2hMVDwjKape/ToNhG8epM0f6DegSSr8O3bDFw6D2BdFarohGdKDQd667C/0jkcj2PxMRbCHTOm/IG7H+C1EZX11H1iTNPNYUXC3JJsSDhQbZELxbL+4KW2zio+yNOz8tt6sJO9OykWo/rm4S7KMa+rOyHPHcUKHLc7s4C8Q= 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 1617265355255628.4211797941698; Thu, 1 Apr 2021 01:22:35 -0700 (PDT) Received: from localhost ([::1]:35886 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lRsb3-0001Ia-V5 for importer@patchew.org; Thu, 01 Apr 2021 04:22:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36650) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lRsYf-000774-Ki for qemu-devel@nongnu.org; Thu, 01 Apr 2021 04:20:07 -0400 Received: from mail.ispras.ru ([83.149.199.84]:52406) by eggs.gnu.org with esmtps (TLS1.2:DHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lRsYc-0003Ch-9D for qemu-devel@nongnu.org; Thu, 01 Apr 2021 04:20:05 -0400 Received: from [127.0.1.1] (unknown [62.118.151.149]) by mail.ispras.ru (Postfix) with ESMTPSA id D4E3E407624A; Thu, 1 Apr 2021 08:19:51 +0000 (UTC) Subject: [PATCH v3] replay: notify CPU on event From: Pavel Dovgalyuk To: qemu-devel@nongnu.org Date: Thu, 01 Apr 2021 11:19:51 +0300 Message-ID: <161726519158.1476949.7614181684462079836.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: alex.bennee@linaro.org, pbonzini@redhat.com, pavel.dovgalyuk@ispras.ru Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" This patch enables vCPU notification to wake it up when new async event comes in replay mode. The motivation of this patch is the following. Consider recorded block async event. It is saved into the log with one of the checkpoints. This checkpoint may be passed in vCPU loop. In replay mode when this async event is read from the log, and block thread task is not finished yet, vCPU thread goes to sleep. That is why this patch adds waking up the vCPU to process this finished event. Signed-off-by: Pavel Dovgalyuk --- replay/replay-events.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/replay/replay-events.c b/replay/replay-events.c index a1c6bb934e..15983dd250 100644 --- a/replay/replay-events.c +++ b/replay/replay-events.c @@ -15,6 +15,7 @@ #include "replay-internal.h" #include "block/aio.h" #include "ui/input.h" +#include "hw/core/cpu.h" =20 typedef struct Event { ReplayAsyncEventKind event_kind; @@ -126,6 +127,7 @@ void replay_add_event(ReplayAsyncEventKind event_kind, =20 g_assert(replay_mutex_locked()); QTAILQ_INSERT_TAIL(&events_list, event, events); + qemu_cpu_kick(first_cpu); } =20 void replay_bh_schedule_event(QEMUBH *bh)