From patchwork Thu May 30 17:49:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierrick Bouvier X-Patchwork-Id: 800200 Delivered-To: patch@linaro.org Received: by 2002:a5d:65c4:0:b0:35b:5a80:51b4 with SMTP id e4csp358940wrw; Thu, 30 May 2024 10:51:36 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXOdHD8Z3KXaZDUloTqsmaNmbuu5o2UlU63ND0G7jaLcI4nnekR0nhzyaDe9vRWZnjoG26PSPX5oHCKScZGlAza X-Google-Smtp-Source: AGHT+IH3m+qcdm5ptP8xdpoWr5B82hq5v13Y4xURAH1Drr1GoElDQDIwlyW9RNQ1fEui0QByCFKN X-Received: by 2002:a9d:6aca:0:b0:6f0:e6c4:7cb with SMTP id 46e09a7af769-6f90ad5e546mr3081644a34.0.1717091496541; Thu, 30 May 2024 10:51:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1717091496; cv=none; d=google.com; s=arc-20160816; b=h82Sd/KWlzrGpdVZUaB8WASK6PBYHP+YNjdTy015btR2pK2fjeVoNxYM9ISYpHvS6E Oji2M/XAd21PiJj4BawTEf49WSYlJ9zBQOMVBQ/I/uaYXoQfVpd7Evp5Vel2WUHUExbQ bQ0pmPSgzs3kv3aHuYGK8G7jlSyEI96RImsbl7ktTGjO2nDpsB4UMKep2qJ0kEAn0QNk O/PCKjikTRukfxcjwCB3+k/8nXiJc0FJ3h9okbHcPuZjJfo4HE+0ScKqd0lPfH51lmLp Pbxk7EFf2qrlVZwAZuPEmFSiRHCZuFmBUBKBGY5u9jwl7cZForvFRiW3eb0vmiS4RXMN pHqQ== 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=cf3Q/5dJyAanhqpbGSZv6kxpEC/hZ4CRqZ3z5yvqhQw=; b=vzIyCS+HudxrfFSQOktmzRUBe2uAgNmiYzFv2uv5H36Nx0t7rtkiUVlle5MiaHzkd7 6Q/maP9AHLMPRVGfPFe18qSWPL6lijxQVPeSZDhU8jFSUIatCOAKPjwMT9ECt922aB0A GYNuAfCm/hv7R7C8ZeaSInXbwAaDWj58037H9O5y2vSsmsqr83tAeLgcGJUOJB4bjvOo B+1W3fJFHh7zyI4ZfyBFSCnnbcTHVXBwhXqLRGOixFUsacMQnJd4hHEo0wYSTZ96eatC AQkPrd2m1SlXfd4q+Y7WOyMk+nozUkasxaLDqJEcJr7sCGs55fBQtixWtTWiJRCSTIXU /NZw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="dGG/j/ku"; 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-43ff23dd15fsi881391cf.172.2024.05.30.10.51.36 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 30 May 2024 10:51:36 -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="dGG/j/ku"; 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 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) 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-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) 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) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Richard Henderson , Laurent Vivier , =?utf-8?q?Alex_Benn=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 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org 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 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))