From patchwork Thu May 30 22:06:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Pierrick Bouvier X-Patchwork-Id: 800215 Delivered-To: patch@linaro.org Received: by 2002:a5d:65c4:0:b0:35b:5a80:51b4 with SMTP id e4csp448203wrw; Thu, 30 May 2024 15:07:40 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUa2VSl+pLdeUjvXt+d9slK6mEfX+4C/f0JNbVS5WLpE2ygzUNW7zwpuG+v8h336hptStGkXc2mBkZxC11JuH7k X-Google-Smtp-Source: AGHT+IG1ncqJDogn5bmjyPI5mgVY1MobCKblS+Nam+DiNMo+DZFU2AeKklvnHKFfuzTjtgkS7qW6 X-Received: by 2002:a05:6808:419a:b0:3c9:67a5:3aef with SMTP id 5614622812f47-3d1e35cbaedmr54167b6e.49.1717106860116; Thu, 30 May 2024 15:07:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1717106860; cv=none; d=google.com; s=arc-20160816; b=WQmxgamKcTTEMdwkO7LC6EKdCGgK8chqg8rjGauNgUiNKn218aEKDNZEA5T4ML7ZTZ H5ksEXs8/+MvLDbHGbXX3oO+lyLXHIH1+lw0p2hbrNYMPdhcQ+t2RnJ/sW8LmyNCkBuX q/sNuXsX5ovQBGext88iBm+aLCz40SNM2yE45JrLkMSuEBez6Q/vfaVx4js1oY1LBnQs SwzdpWi7ifULkVyxFvMH5icny/UHi6NE9NZRB1ClIZTxaxutQ96+J3Hv9cWt9tMbuAwF Iy5wshKJPzWjhWL+Ezlbj4zQ9fY0fx1pmFnXM50ZwJyUtGF/RiuxSF7K4zgqZQtP8HOC Qy6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=ChXWvUNOD02yoYequIGCuEzpK9HfTXZtOpXCWQ0j1Uw=; fh=9DrfyMIxQXmVFGXijTr0lAFjSMU1v2ifvPRi5ZRi3rM=; b=UytWDLI6VEEOCeb5z124lt/bRe5PesmFeTEyoi+ESBUkoV31O3/hw9ybKGsBpIYbgH lQ5acqS3xEw0bb6Op/i6Y9ENYNLYRCAqTjBVAfXJLxsYTou9YWsHXPax5jiIMLj9StCM 3PyS/S6HPImsItOa5+e/Wc1c0jO00b7dkHOXaWyK0N728USFD//Q/PwTE6ueH+eQGH0t XVti2jfF9rzEFrsi2pj1zkrNdcV87qqybhhe3D+LhCxi0jdFw6ETW+5GGVnMVOSDVkPL GAFTDK4WpraOatNkiO3hWFK02N6pEo0KNVRuOeSmxp/XG8qAtvisjYUdlUAM1CX5LQto MsZQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=iQAQLne5; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-43ff2466ce9si5767521cf.303.2024.05.30.15.07.39 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 30 May 2024 15:07:40 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=iQAQLne5; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sCnul-0007Jr-6V; Thu, 30 May 2024 18:06:27 -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 1sCnuh-0007JI-RA for qemu-devel@nongnu.org; Thu, 30 May 2024 18:06:24 -0400 Received: from mail-pl1-x630.google.com ([2607:f8b0:4864:20::630]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sCnug-0005Do-9I for qemu-devel@nongnu.org; Thu, 30 May 2024 18:06:23 -0400 Received: by mail-pl1-x630.google.com with SMTP id d9443c01a7336-1f480624d04so12583455ad.2 for ; Thu, 30 May 2024 15:06:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1717106779; x=1717711579; 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=iQAQLne5GUbCraZ+irpqq4BuCF31pf2NcnWdp5vi5DcF8ciI1/63knMmHtH+bbQ++m jwS0KFSJO+v7bz07wTdu6VYy/Zvus4MNYQHKSIm8+mSFGS7FDtGAHKmLxDZyebiJJKl9 kfA3BDWJ7XmKfC0fiCs7agwQa3GBt8sKUdRgWrcuElwfA0BpzlTcDX5sl+iYLtixUaBa LufN81fVRsIwB6u2mNEfOtTEtQS4a23xbi3tlBTtFubSc/8fQ5OXLMiU7Ui8B/uQEyDc ZIcJd/c+Xj07AJIvkFboyoQvIVZObCbPeln3wsrm9Cus0tXg0v537w+GC268ZegBUx8L Nh3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717106779; x=1717711579; 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=wgj2VjEYKVC1vTy4h4TPDl52+qhqjX1gOj5jiJPHd/HykZzSQocJVybVkx5i4VZn8N UrdGyYyWrWd2sNcQn9i+zeemqw+exNDrL+VKa7sFqf1WuX6wfr1jEnbibBI2iukHglkI lqugz9eKA6xBppfypZ45fbOkbm4ELB+mw7bCbTOoEwheosStnkxMZ4hERnT/hqV7u6Fc eVsoQ9ZO0+OjuVAz69yaJu41VctDWhJIvLmgA3t005EvlHs7Mt6ffC89LnAUWtenPkMl PvBQQ1L1JYpZiFnCNINhKvZyKNv9UgMWw8ZFewdj37Nb6eeo8KTS+sT24DOJTbvaAX05 EazA== X-Gm-Message-State: AOJu0YyyZYgbOKncqkjoasZezp6hvanOz3hP3Pjzgq/BZ2rSpaJgPz6z 1c6M3+JkR4UAon/jEgMSmYYl2E5Jz4HluyyVdunAf7eBeKRaTwoXl2dMz2LyeIHE8YDtnMxq8Kw cBRY= X-Received: by 2002:a17:903:181:b0:1f4:befa:7a79 with SMTP id d9443c01a7336-1f637019aa8mr1075925ad.27.1717106779563; Thu, 30 May 2024 15:06:19 -0700 (PDT) Received: from linaro.vn.shawcable.net ([2604:3d08:9384:1d00::e697]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1f6323dde39sm2732615ad.167.2024.05.30.15.06.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 May 2024 15:06:19 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Thomas Huth , Laurent Vivier , Pierrick Bouvier , Paolo Bonzini , Alexandre Iooss , =?utf-8?q?Alex_Benn=C3=A9e?= , Mahmoud Mandour , Richard Henderson Subject: [PATCH v3 4/6] qtest: move qtest_{get, set}_virtual_clock to accel/qtest/qtest.c Date: Thu, 30 May 2024 15:06:08 -0700 Message-Id: <20240530220610.1245424-5-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240530220610.1245424-1-pierrick.bouvier@linaro.org> References: <20240530220610.1245424-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::630; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pl1-x630.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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Signed-off-by: Pierrick Bouvier Reviewed-by: Philippe Mathieu-Daudé --- 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 char *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 #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" +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) } } -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); void qtest_set_command_cb(bool (*pc_cb)(CharBackend *chr, gchar **words))