From nobody Wed Jan 15 05:13:01 2025 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=1734691459; cv=none; d=zohomail.com; s=zohoarc; b=hJc2X6yts7N0bIoLC0alAOJbdaKhkiMHnczV0PFc7KAS6sBLZLjgPz0tRYQisXnTRPpD8DKRlgjTS9IIc34oASI1qgv5JFsjhszlPxNjGI1+AOWXLVYLKDj7KzCosXjJcbZzTjAxLonC3hQPLBrnKTSK6DhFI/B/pjTHsIM3VUo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1734691459; 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=3jvfp4tXxGdJYBXXPUHySvHV3oIx1k2wq60uhteeuWk=; b=SA7zLd4QNowAyhI4cu6y4za1hGDYJ/57lWAAPz0I4q98aJtPL6EXlOWP7/OzSysMqNx4q54e57Ea5AO9vMEmpYn8bmcYknRqEb0TxXJm1nyoHgbQmeF2vMKHg31acZHxMTS/dL4nSRo855/7GqZcWU9VK9aM9JwLpI8RuM+jaHo= 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 1734691459541273.5970473833381; Fri, 20 Dec 2024 02:44:19 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tOaUD-00060p-FJ; Fri, 20 Dec 2024 05:44:01 -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 1tOaU7-0005uR-Lu; Fri, 20 Dec 2024 05:43:57 -0500 Received: from mail-pg1-x533.google.com ([2607:f8b0:4864:20::533]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tOaU5-0005O3-LS; Fri, 20 Dec 2024 05:43:54 -0500 Received: by mail-pg1-x533.google.com with SMTP id 41be03b00d2f7-7fd2ff40782so1534633a12.2; Fri, 20 Dec 2024 02:43:52 -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.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Dec 2024 02:43:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734691431; x=1735296231; 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=3jvfp4tXxGdJYBXXPUHySvHV3oIx1k2wq60uhteeuWk=; b=ilzwcpYvP7PHwFaUEV+2hOuQJcL0mC5pKg1tSvxmt9ANkwUC8qhFuFT5Jh1+S8w/wU E3PC1+Kv/sCck1wKbbURk71AYlzn5PwhhpJHyPzFZNda2SPykj4PiUxfc0JTxv+ujFkI dgfxzVuTxHYMFtEQNGtobuSlXRdYmDaCBpPnHjBXCGCujt/d7e7/+dE3hVbOuGM4DaIi gC0nj32viyxI5+cN2MTYXK71z8EvgRzRlxthuZGLBSfi2TEZwEFhePVN25cs+2uMLrSh lK05ElngcrF/A5p39bHkdApIAZRWfsHQr888xRX3BT1iG6ZN7UrLvaehYZTMTt9uI3oP XKEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734691431; x=1735296231; 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=3jvfp4tXxGdJYBXXPUHySvHV3oIx1k2wq60uhteeuWk=; b=GjxA5yaEBU86nKULlObVoWWTGNBzWWdclGks6FusRQRVWuGXCOaIoJaKNOgyTZcIfs tmJRdNKhDiknAjoLgVxcY9VS51YR5aTRcCY6/HGoPId8vxa7xecBgWJgVZJOu1TyJbQF xzXlaD8cYFPyOl/uIIzFEL7Piy8+VbbySIv6GWzIFE3VMMNr2M23+6HBhYoCcMJDk37Q 5N5mEtKH56Ib1kC2WqCEzGLq+0atW3SQuk0YJn8EXMcGhvrey9cpgFZmpogDpxnZxQ4o kSDVSYEtUwhK3ovLSWuuSIx4SjEsASIDt/5LwvYWyradnvjK+LuFA3rBJyiTMRyYap/I 87+g== X-Forwarded-Encrypted: i=1; AJvYcCX5FdI5SNQoh8IYCHJS11lL3Z6LnA102tEAC5jIRJwJLtCYyjCDBzUfkYneLzlXQtJwW4UOu+pheUEn@nongnu.org X-Gm-Message-State: AOJu0Yyp2dnloc24F13PcT1WWWepcVCvBs0fHEwhwa629IDYTYl2slsE kzIh1b74O9qY07yGmL+hgf77k5V4d9SkQ+xXjRw96G1ylVRqPIwFEnQQ/A== X-Gm-Gg: ASbGncsghU5DStpgyGGZGgjPIDkVGxg+dM0qckZACRvVNUPpJJkAhmFu7PilOM3GyB3 jj0Y37YbutMPSATqb0k6xNKBoHzh7vMewDXCZSNiAAbQBZXQSEjHjZTljnFUAKpvfd2vUdeOmjl DYkUScoCiwCy+yjMpfGNiIojIb8doPrc4GLw57WD/tIk0ylUd28Sac9Ed2MJTi7eIS5aH4/q+Lr jonoxzSRR7bGE5wEtqI6q9RBbYVasikmsI6bWKc4kMjm2GJsag12A3BUEf2gmok5Ap4eYpwfqXY 3Gx83c0WRw== X-Google-Smtp-Source: AGHT+IEBXh3mgydDemWGOsIGc+458hM4rBbHR3qnIMTvhJO7NHHHPbbS2Zxl60i2wmMi7Nekxhe8EQ== X-Received: by 2002:a17:90b:2f07:b0:2ea:9ccb:d1f4 with SMTP id 98e67ed59e1d1-2f452d32b5fmr4561997a91.0.1734691431583; Fri, 20 Dec 2024 02:43:51 -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 10/17] qmp: Convert to new bh API Date: Fri, 20 Dec 2024 20:42:12 +1000 Message-ID: <20241220104220.2007786-11-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::533; envelope-from=npiggin@gmail.com; helo=mail-pg1-x533.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: 1734691461662116600 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. qmp dispatching 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 --- qapi/qmp-dispatch.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/qapi/qmp-dispatch.c b/qapi/qmp-dispatch.c index 176b549473c..4a07d75a856 100644 --- a/qapi/qmp-dispatch.c +++ b/qapi/qmp-dispatch.c @@ -254,8 +254,9 @@ QDict *coroutine_mixed_fn qmp_dispatch(const QmpCommand= List *cmds, QObject *requ .errp =3D &err, .co =3D qemu_coroutine_self(), }; - aio_bh_schedule_oneshot(iohandler_get_aio_context(), do_qmp_dispat= ch_bh, - &data); + aio_bh_schedule_oneshot_event(iohandler_get_aio_context(), + do_qmp_dispatch_bh, &data, + QEMU_CLOCK_REALTIME); qemu_coroutine_yield(); } qobject_unref(args); --=20 2.45.2