From nobody Mon Nov 25 08:21:36 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1717091496504105.55361826275919; Thu, 30 May 2024 10:51:36 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sCjuY-0003sG-UB; Thu, 30 May 2024 13:49:58 -0400 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 1sCjuX-0003rp-N2 for qemu-devel@nongnu.org; Thu, 30 May 2024 13:49:57 -0400 Received: from mail-pl1-x62c.google.com ([2607:f8b0:4864:20::62c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sCjuV-0002SW-Tr for qemu-devel@nongnu.org; Thu, 30 May 2024 13:49:57 -0400 Received: by mail-pl1-x62c.google.com with SMTP id d9443c01a7336-1f630e35a01so1388035ad.1 for ; Thu, 30 May 2024 10:49:55 -0700 (PDT) Received: from linaro.vn.shawcable.net ([2604:3d08:9384:1d00::e697]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1f6323deb38sm590405ad.124.2024.05.30.10.49.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 May 2024 10:49:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1717091393; x=1717696193; 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=ChXWvUNOD02yoYequIGCuEzpK9HfTXZtOpXCWQ0j1Uw=; b=dGG/j/kusF2OC8h8X2M1KRmzvUNk2LUH3LaPIPUWkPcIxzcZ736gaQqYhoEd82Cbz2 9JHDDiPs3xnOK2bukJ33HbAuWQ6wb/QM7CFAej/BehNbnBFxQInDMCQuaWihnXf/l6Mx NB7riwuhfk+C7i5XUo6TqQbYNjQuGLjAgKKEk6f1GGGaWeIV0gXIQ9SX9eOVWT/LCiXs 2PAv2+Tu6KfZQ33ZZfHv3IAN+94cxcxZUVIsGLDHfN1Cg6pp4yWPGbURm+0Lh4mQX094 6VzNFDa6U4yzi8nfghzpQrmq4Kppwi6oemvoVK0nb4A5uzVTU0rdwUUNNtLHp/qSxbx9 lezw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717091393; x=1717696193; 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=ChXWvUNOD02yoYequIGCuEzpK9HfTXZtOpXCWQ0j1Uw=; b=fqF7HfIjrMJh4PtmphHwpWJxPCgcH4eSfl5zHxxuroC1rFdzIvf6SGVkUly+FFjNyp x78RzwkJ5Qxf2Hl5dvgzSJiICt9WlNyRyR01XSwO7KQHBYMwlo7LVjOQcyuZnxUX/F2b JPBNyuDrgePfz5PE/oU5AQbsJtDc2IVW1WjVWum+/cT0qAb7PDBQl/MCsWRN2ZmhqEkJ 1WhaG52ItzJDN3W6bN0YayK/yjWnD9kSNdNRbz7hvmDdteorDFSIPv/Nb8W5uqBeIzjj J/F+FHC3YmCiamKn1Sbtx33ThosILeSPJy/AeR/ih5GDgwwBUgSlai7BI/Wjczem6PeC Tp2A== X-Gm-Message-State: AOJu0YzCu4W2PScJfsWdUhTt/pZxCEslc4LWfPtFK0Hmoxa4yyHEsfJ0 PWyXlNpbwzjW5muP5gWOLwlcqYXYEn3RXkj0xrFYsT57k2/y9Tgh4ysp6sx8MuowJG2LAkbTlaK ro0U= X-Google-Smtp-Source: AGHT+IFK5Nnuv8sp7C8fyM6G/nxuCCjstNBkLTzNiWRXZXNGoygsUhYl2t3uw0gsRhHyxeofu0gyOw== X-Received: by 2002:a17:902:e890:b0:1f6:225e:6769 with SMTP id d9443c01a7336-1f6225e697fmr22279025ad.21.1717091393620; Thu, 30 May 2024 10:49:53 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Richard Henderson , Laurent Vivier , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Thomas Huth , Alexandre Iooss , Mahmoud Mandour , Paolo Bonzini , Pierrick Bouvier Subject: [PATCH v2 4/6] qtest: move qtest_{get, set}_virtual_clock to accel/qtest/qtest.c Date: Thu, 30 May 2024 10:49:37 -0700 Message-Id: <20240530174939.749163-5-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240530174939.749163-1-pierrick.bouvier@linaro.org> References: <20240530174939.749163-1-pierrick.bouvier@linaro.org> 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::62c; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pl1-x62c.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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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: fail (Header signature does not verify) X-ZM-MESSAGEID: 1717091498600100009 Content-Type: text/plain; charset="utf-8" Signed-off-by: Pierrick Bouvier --- include/sysemu/qtest.h | 3 --- accel/qtest/qtest.c | 12 ++++++++++++ system/qtest.c | 12 ------------ 3 files changed, 12 insertions(+), 15 deletions(-) diff --git a/include/sysemu/qtest.h b/include/sysemu/qtest.h index 45f3b7e1df5..c161d751650 100644 --- a/include/sysemu/qtest.h +++ b/include/sysemu/qtest.h @@ -34,9 +34,6 @@ void qtest_server_init(const char *qtest_chrdev, const ch= ar *qtest_log, Error ** void qtest_server_set_send_handler(void (*send)(void *, const char *), void *opaque); void qtest_server_inproc_recv(void *opaque, const char *buf); - -int64_t qtest_get_virtual_clock(void); -void qtest_set_virtual_clock(int64_t count); #endif =20 #endif diff --git a/accel/qtest/qtest.c b/accel/qtest/qtest.c index 53182e6c2ae..bf14032d294 100644 --- a/accel/qtest/qtest.c +++ b/accel/qtest/qtest.c @@ -24,6 +24,18 @@ #include "qemu/main-loop.h" #include "hw/core/cpu.h" =20 +static int64_t qtest_clock_counter; + +static int64_t qtest_get_virtual_clock(void) +{ + return qatomic_read_i64(&qtest_clock_counter); +} + +static void qtest_set_virtual_clock(int64_t count) +{ + qatomic_set_i64(&qtest_clock_counter, count); +} + static int qtest_init_accel(MachineState *ms) { return 0; diff --git a/system/qtest.c b/system/qtest.c index e6f6b4e62d5..ba210780ec0 100644 --- a/system/qtest.c +++ b/system/qtest.c @@ -325,18 +325,6 @@ static void qtest_irq_handler(void *opaque, int n, int= level) } } =20 -static int64_t qtest_clock_counter; - -int64_t qtest_get_virtual_clock(void) -{ - return qatomic_read_i64(&qtest_clock_counter); -} - -void qtest_set_virtual_clock(int64_t count) -{ - qatomic_set_i64(&qtest_clock_counter, count); -} - static bool (*process_command_cb)(CharBackend *chr, gchar **words); =20 void qtest_set_command_cb(bool (*pc_cb)(CharBackend *chr, gchar **words)) --=20 2.39.2