From nobody Fri Oct 25 19:22:00 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=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1718206674; cv=none; d=zohomail.com; s=zohoarc; b=m2qL286xITkj5P3KSttoyP/L//6c1RiKDq2E0nadgZ7zF/c40If8ASCf2RjTXEUKBmWTnr3iuEyzMeuhjOfsZ7jMf+ZQqdhDWKtuEieLqeg31f7MNoA4zFMadzK18c2ih4ayu9igyaJwJKOsmnmYvn+rR6z71GYeVw2xuG7d3nE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1718206674; h=Content-Type: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=a0NIpkhyGGYgnbxSmBPfzzcGZB9GrmkEzQVe5cCnoVc=; b=nGaXT7kjareivulXoI406fgMv5QVvHnIwMAPNwBbKeLy7zFyZH0jedIec+R7PywKzSW60D1t50xOQWb5YCIGA/kYxIxOBYtPBia5tX0UDN1dM8OQZahf0eW8Cfcp+7990xxGcijdkTsxkAM+W+5OPkLkOFRABN/O8uJb5pz0hQQ= 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 1718206674827266.23838445365436; Wed, 12 Jun 2024 08:37:54 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sHQ0T-00013P-EL; Wed, 12 Jun 2024 11:35:25 -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 1sHQ0P-0000t3-TD for qemu-devel@nongnu.org; Wed, 12 Jun 2024 11:35:21 -0400 Received: from mail-ed1-x535.google.com ([2a00:1450:4864:20::535]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sHQ0J-0004LM-0c for qemu-devel@nongnu.org; Wed, 12 Jun 2024 11:35:21 -0400 Received: by mail-ed1-x535.google.com with SMTP id 4fb4d7f45d1cf-57864327f6eso2062419a12.1 for ; Wed, 12 Jun 2024 08:35:14 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-57c855b959bsm5045481a12.38.2024.06.12.08.35.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jun 2024 08:35:11 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id DE76D5FA1B; Wed, 12 Jun 2024 16:35:08 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718206513; x=1718811313; 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=a0NIpkhyGGYgnbxSmBPfzzcGZB9GrmkEzQVe5cCnoVc=; b=tRTIDd1HyYwWmQwkkWddb105y5bfpXwZbOp9TBgvN7EjHiAD7KYItTow7GFMi/Be8S 4lBWP+utlChzWSjn21UIFUf+BwGdwZSGNta0TrH5EXYb4RyyRW6jlql74WRZkBiQkjF6 eXXPqNgPJrdJ9FuUx3w3Zlnt2ve/w8kmve8Q3HfT0KZYfnJxlUoAANNC3q00IfAh4H+7 6mFWgCorjlh5yJRTJv4taoZ5YOgNjPqARkUxtYn2LcLCCBdeW6iUk8vCH3bCX77c7xKa XMsSWErr/W1Lty1VuGC5hiOl6B43HhTlrjBDRd/iwpqduPf8peMwt41mgkTdurX/mpN/ 1b0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718206513; x=1718811313; 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=a0NIpkhyGGYgnbxSmBPfzzcGZB9GrmkEzQVe5cCnoVc=; b=n7jZZS4vlzPPMzooKCYHPsC9SxhwKxd5PzK9ArBr+PC99q+5lYX5PqY4fc9gLWuBAk +3yuXLol74fqkMhkGnX9TGqBqlUPcR9HgvGOUzWdinAldA99xl95y0AYwTAc5JsrwlLP UwJtS7dFv/zVAiULpn9i3ubijHlVCFUbj5KAfzk/OWW3oYzwnPT2vzg591/KjnQRgPrg Fr2xG9CS30s/C09r2eTVzOUWxAL2VuLnCey+K/gE/ZiCDu28II2cSbJR/g15ODbuIHSX u2wckcPCrNIe5YhD9C/usHL2aBrFXczi/zCVnD2l42RLTffWO2iMUYK8elid0bXLA5W4 7Wjg== X-Gm-Message-State: AOJu0Yz8hrB7S6dTcrT4HevE8fONCug5qlUpcFWgJ03LT/R3LzxX9apg uiP3iMEOCEGI9XW1pinHV2sSbCP2mZ7WLt+WYwpgHCkP5sACDDsrqWXGsE7i7Og= X-Google-Smtp-Source: AGHT+IHiw9ywaeCwe00VTJSJ8JkM2YVfCIcQrjCS/i3yRBDrnPHhfF6suexbyfgKr6PBW9GlUolKmQ== X-Received: by 2002:a05:6402:703:b0:57c:537a:49c5 with SMTP id 4fb4d7f45d1cf-57cb4c17f24mr6294a12.18.1718206513407; Wed, 12 Jun 2024 08:35:13 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: David Hildenbrand , Ilya Leoshkevich , Daniel Henrique Barboza , Marcelo Tosatti , Paolo Bonzini , Pierrick Bouvier , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Mark Burton , qemu-s390x@nongnu.org, Peter Maydell , kvm@vger.kernel.org, Laurent Vivier , Halil Pasic , Christian Borntraeger , Alexandre Iooss , qemu-arm@nongnu.org, Alexander Graf , Nicholas Piggin , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Marco Liebel , Thomas Huth , Roman Bolshakov , qemu-ppc@nongnu.org, Mahmoud Mandour , Cameron Esfahani , Jamie Iles , "Dr. David Alan Gilbert" , Richard Henderson Subject: [PATCH 7/9] qtest: move qtest_{get, set}_virtual_clock to accel/qtest/qtest.c Date: Wed, 12 Jun 2024 16:35:06 +0100 Message-Id: <20240612153508.1532940-8-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240612153508.1532940-1-alex.bennee@linaro.org> References: <20240612153508.1532940-1-alex.bennee@linaro.org> 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=2a00:1450:4864:20::535; envelope-from=alex.bennee@linaro.org; helo=mail-ed1-x535.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=unavailable 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 @linaro.org) X-ZM-MESSAGEID: 1718206676514100006 From: Pierrick Bouvier Signed-off-by: Pierrick Bouvier Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20240530220610.1245424-5-pierrick.bouvier@linaro.org> --- 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 45f3b7e1df..c161d75165 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 53182e6c2a..bf14032d29 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 8cb98966b4..12703a2045 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