From nobody Tue Dec 24 13:32:02 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1734691461; cv=none; d=zohomail.com; s=zohoarc; b=EuMYExGs8sCA15CZ9G5pgI6H9oVIgpPbB71KBnR6iRIuXeI8wYTtEE+ywE/ChK0HzZH/hmZcZDjSOCv7hVGGWLg2tSsjVlG93C3R1oX81JcVqUGKn2smt+Wy7f7cmPXdAxIqGZuNZ2QOBiyFJFDSp2pGYrlzinTiCvL5pWPtDMk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1734691461; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=NtU2WBbloNvmM8bd+xiOwv1bzHXwrM/Uep66/BPP7j4=; b=cvAHfqRgE8Cr1nTvNdDW4t5E62OMKx5XokyHgHQjD21HNOuJqB28E4wGrybRigAvrrad1ptmYQRmIB9c6BQVLB90lmuDYIeEBqPTDoaIhAZUNRb5pvm3KzuE9me72JKWcneoYSEe9e6eNEhGNs6mUsCYrNDM7HIDHdO0Krouy7Y= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1734691460841739.756746876523; Fri, 20 Dec 2024 02:44:20 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tOaU2-0005fh-85; Fri, 20 Dec 2024 05:43:50 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tOaTz-0005S0-CG; Fri, 20 Dec 2024 05:43:47 -0500 Received: from mail-pl1-x636.google.com ([2607:f8b0:4864:20::636]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tOaTx-0005NN-P3; Fri, 20 Dec 2024 05:43:47 -0500 Received: by mail-pl1-x636.google.com with SMTP id d9443c01a7336-218c80a97caso15009905ad.0; Fri, 20 Dec 2024 02:43:45 -0800 (PST) Received: from wheely.local0.net (14-200-18-130.tpgi.com.au. [14.200.18.130]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2f2ee06dfd3sm5376942a91.32.2024.12.20.02.43.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Dec 2024 02:43:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734691424; x=1735296224; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=NtU2WBbloNvmM8bd+xiOwv1bzHXwrM/Uep66/BPP7j4=; b=Hq9XZFYIUC4FA33TgDU3u1itPYVFhmq+O84K1QmLo4infpJrmdOXv5TRl0ZkERFc+R bPAXRg94Y+CY5onocxXzUGeglmjSdoqHDfm01DTDwDGeI/2GnPY8Alq4D3ef9xDk1nyx nm0yFl3UOHiAKGJ0jFLkH5AUHVyDuZa3xzl5SGjHHEAXYIZsNI5fp9OYKtwvqRUQ2tRY 8qj4rORZur3WCMnZRTEsCZN6f266MxD6doz38ld1aXsYW4I6C1ZV4BHTmqRYCPcXuXk6 mCCS1AytPWdMXo2O+SYW/ftdPGRSXLUHRDdZupCRGwhzujMXa+VedA0ErMfYX2LJiCAt B4Dg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734691424; x=1735296224; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=NtU2WBbloNvmM8bd+xiOwv1bzHXwrM/Uep66/BPP7j4=; b=J9lWTnI9ZmN8/k/w7SwKKlMwlApMdiaOTe2C1x9zpNptBNb6me10X96PSw8B2Snr8o +S+aX8E8EIAGgdqAW8rmBkMtqxQx6x3LNCIW/bNPy/pKX63hqtsqF5QoORQgKhw3z505 bM9FVCyp2ZlpHccRdUKeO5Z30zfJBdsxExc0KZQjLdWHxY/ahkkpSdHS7DlRVKuIUBtE YbPTumFufw1fal2dqqqfd1Cx89ELF9z7PbKRERw/ciB5iMCkM/CPt49bdlt7u116vxsU SHJSlobzaTzZJjTendmKvROse6jQ0Mh1evEO/zvBCqx1Ur3jjC6BEkZ54nEkgtx3niAJ tpoA== X-Forwarded-Encrypted: i=1; AJvYcCUIPOrcfl6SSDNavs/947rO5OqTz8boCFabZfnyNOw84gcDsMeNMwCTegSWXy4CQ+GH3tUolASaKDw1@nongnu.org X-Gm-Message-State: AOJu0Yz5AZqXvKIDix1XkAiaTsWuQhZZJDoWIGWO28aXWndDP4MVZDQ9 7p1aH2R/NPBKA7LMN8mATvuVNbeX5ae2/mWoGEPkPehcKLr/KuawKX3fBA== X-Gm-Gg: ASbGncuqOjV+/1NXz7dikhuwbyHjDTP1NpdKt0gvRwADJ8zUXO/ndbi1tTLi+KcJnCb G+1IEZG0r0LCjU8aq89us0Xb4Fz98D7CRXbrFCfBpZPf20ITCUBBnotLEUt2dqD1G8aHmd9SWON 4UFOb4v9Umi4fWUsRl48zWf+yFMB+/JG27DGVVTFTtsi7U2XJ6qlmfq8SAhJtBMzDgfGDMUQC30 YUC1HZM5gaNLHkP8ILmeTlotZDVssGBJF/FuF76zPnLS4+6nzCeEe74UO6JkA8zRN+OGIaPXKef Kjn79C0p+A== X-Google-Smtp-Source: AGHT+IGIxTht2CABRku1kWFFweNlzAyHnUbbd/4JeiRH49/oGaO48MkU6bHK00GL5ZI2SpNsSCz/MA== X-Received: by 2002:a17:902:d587:b0:216:5af7:eb2a with SMTP id d9443c01a7336-219e6ebb70bmr37150545ad.33.1734691423848; Fri, 20 Dec 2024 02:43:43 -0800 (PST) From: Nicholas Piggin To: qemu-devel@nongnu.org Cc: Nicholas Piggin , qemu-block@nongnu.org, =?UTF-8?q?Alex=20Benn=C3=A9e?= , Kevin Wolf , Hanna Reitz , Pavel Dovgalyuk , Paolo Bonzini , Stefan Hajnoczi , Fam Zheng , Ronnie Sahlberg , John Snow , "Michael S. Tsirkin" , Jason Wang , Vladimir Sementsov-Ogievskiy , Peter Xu , Fabiano Rosas , "Dr. David Alan Gilbert" , Markus Armbruster , Michael Roth , Wainer dos Santos Moschetta Subject: [PATCH 09/17] monitor: Convert to new bh API Date: Fri, 20 Dec 2024 20:42:11 +1000 Message-ID: <20241220104220.2007786-10-npiggin@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241220104220.2007786-1-npiggin@gmail.com> References: <20241220104220.2007786-1-npiggin@gmail.com> MIME-Version: 1.0 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=2607:f8b0:4864:20::636; envelope-from=npiggin@gmail.com; helo=mail-pl1-x636.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1734691461705116600 Content-Type: text/plain; charset="utf-8" Convert aio_bh_schedule_oneshot() to aio_bh_schedule_oneshot_event(), which can specify the clock type, making it compatible with record-replay. Monitor creation and input does not affect target machine state, so it should use QEMU_CLOCK_REALTIME so it is not recorded and replayed. Signed-off-by: Nicholas Piggin --- monitor/monitor.c | 3 ++- monitor/qmp.c | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/monitor/monitor.c b/monitor/monitor.c index 56786c0ccc7..accdee88b51 100644 --- a/monitor/monitor.c +++ b/monitor/monitor.c @@ -583,7 +583,8 @@ void monitor_resume(Monitor *mon) ctx =3D qemu_get_aio_context(); } =20 - aio_bh_schedule_oneshot(ctx, monitor_accept_input, mon); + aio_bh_schedule_oneshot_event(ctx, monitor_accept_input, mon, + QEMU_CLOCK_REALTIME); } =20 trace_monitor_suspend(mon, -1); diff --git a/monitor/qmp.c b/monitor/qmp.c index 5e538f34c0d..c6fec04860f 100644 --- a/monitor/qmp.c +++ b/monitor/qmp.c @@ -541,8 +541,9 @@ void monitor_init_qmp(Chardev *chr, bool pretty, Error = **errp) * since chardev might be running in the monitor I/O * thread. Schedule a bottom half. */ - aio_bh_schedule_oneshot(iothread_get_aio_context(mon_iothread), - monitor_qmp_setup_handlers_bh, mon); + aio_bh_schedule_oneshot_event(iothread_get_aio_context(mon_iothrea= d), + monitor_qmp_setup_handlers_bh, mon, + QEMU_CLOCK_REALTIME); /* The bottom half will add @mon to @mon_list */ } else { qemu_chr_fe_set_handlers(&mon->common.chr, monitor_can_read, --=20 2.45.2