From patchwork Mon Jun 24 10:18:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 807006 Delivered-To: patch@linaro.org Received: by 2002:a5d:508d:0:b0:362:4979:7f74 with SMTP id a13csp1810722wrt; Mon, 24 Jun 2024 03:19:17 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVNsqlxmaxoWfhYU+Db3Wms1ETtncXbhltkM7ykFASKKQ1zuaBjFoAgs4i8Dvi2MDCEE/MpZmXzp28XlrgdbdE7 X-Google-Smtp-Source: AGHT+IG87FjQrUv0xqfmQCCFC43AvXLxxKwKgJciDUzcEq8bDnjcMutx7bl4eN1UA5aSb6JX057e X-Received: by 2002:a05:6808:1283:b0:3d5:1e33:fc14 with SMTP id 5614622812f47-3d5459d13d1mr5618320b6e.34.1719224357626; Mon, 24 Jun 2024 03:19:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1719224357; cv=none; d=google.com; s=arc-20160816; b=JD2BLvTERWBm9MiLunUIDA4VRdhxVZD6HM2BvOUsB8zr/0z8qZrb4umcCCcpVBQoOo SPTnBy42h6cxpjCUxIMXOfuggiJaXebnZDqhzlyI+oXajYG/Aa9an7/V4rh+TBTuM+jR 4/yCirzACPg12zmqnbfOQYVMpsgsDpR8jMHMggaUHZQcSDmNwcm6YzCAwLbBcTg/BFru xIHFozOds9E8/hY86YOc0R2Uw84RzqCg0+9MmBYRS1FsQoWzmFjCAJWUPnJaGvcLxxN1 QpFuMfZiOh7cyk7Fkin3OBVc1gUxj8eFhWCEEEBj7Idh5isEv0BGKZ4e5cCvurRBqu7v i5nw== 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=ob6CSHHY9QNLxHtzyLGqMdnNXrmVZ+yffKASjxK2raE=; fh=1Ld9v93MoJnKBDczIQ8k1GnCoTepK845KSXw+Qd4bl8=; b=ilOOPnZcyZFVVL0AMJZCE1dScw5HJKjCU2kD6n6M2nOuz1TdJFSoTNNU5m8zGv4Rnr ZPLax6lKbIhcSx+gFvuEPUVM6f1XeQI/gPcT5kviAZDRh5zFss5z3wkgk1UMbJoEiUcH jZbJEmtjJYjM325m7wBjFdfkcOZop1ZIWdUE49alM88YHseJnPtb0HfgL0FQ/g0g6Be5 cbCoMaQ6bEOX/mu5giqUDz6ZGT19B6nNtc4/Ag2X6XIRuiBpCOr38a+y/NoTV1KTBnw1 t3gz48yRhxoKIUlGMM+f2vSLXfpnwQ/sYxJQXGw7JYLsr3X8lMgoiWGEBMAtuM/sMCrF 9XlQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Rw2d9G7I; 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=pass (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-444ea1f6da7si8717241cf.63.2024.06.24.03.19.17 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 24 Jun 2024 03:19:17 -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=pass header.i=@linaro.org header.s=google header.b=Rw2d9G7I; 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=pass (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 1sLgmg-0006oP-Tx; Mon, 24 Jun 2024 06:18:50 -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 1sLgmf-0006nV-Dx for qemu-devel@nongnu.org; Mon, 24 Jun 2024 06:18:49 -0400 Received: from mail-lf1-x12b.google.com ([2a00:1450:4864:20::12b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sLgma-0007h1-Q2 for qemu-devel@nongnu.org; Mon, 24 Jun 2024 06:18:49 -0400 Received: by mail-lf1-x12b.google.com with SMTP id 2adb3069b0e04-52cd80e55efso4511238e87.0 for ; Mon, 24 Jun 2024 03:18:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1719224323; x=1719829123; 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=ob6CSHHY9QNLxHtzyLGqMdnNXrmVZ+yffKASjxK2raE=; b=Rw2d9G7IRRr8L/W4poDLO1yig4CE+Q11uujTiznMRWF3WiMsdCVGF9+Ru+dEnzHHpx Wbb4Xm2FvzCfXgpsHWe+gc4dXKHnnmTKnE8sqs3zzRMuVxyl7dttWLlqQMJL/GwCsQ82 b6N4cVmU1hDQKt8J98Fus2Eu/DZbSuBeblvcqD6R3E2itMc4qL8lukOGEbex4n5/SOK4 8GX6gJo8wJ+hfJej3idLBisfxCB9zao2coWpdomI3f2UVKrbsdaX8QZuylU5JDBogGYa pgLtJw0mHxL5YBe1SbZxUiwXylaAiG0a/US6Jxf/x2JW6cxWSzfRcTrlKliNeBz0SlF4 UWmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719224323; x=1719829123; 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=ob6CSHHY9QNLxHtzyLGqMdnNXrmVZ+yffKASjxK2raE=; b=OHACda3E58oPF4zmfmK3UDuKThXOSm0Lc1T8WEfqeveZlc1CqbXvCiJGLwPcOf6VSZ rQbY0J3PpDWQSG3c0yLtHLIXWbf29FZGzj3m48HhsgFQv+KJ3YN5kIeWoPjuja3L/vXr eCKQxhR4X9yBmWvSFEvHb/U5fkJRKiplGWQacxCec2etcKllBsfQZlzu7oXmVT59/tdc 8rtQOfmcTaj3dOggfknbpos5Mo26q5JR6XNaPr2iA9CVeBgGwudV/JRvpD7pPy4tIBRG Wx9jrM+FHyuRFOyp8V0ma0sJv9i/MDUInyuajSINt2R2ieTyHp1K8KFo1UEpR3ql1ctc ZGqA== X-Gm-Message-State: AOJu0Yy4IwIAXMrHwmA7hJDAsMxAaGDf0Jfm/vM+FbuI65IC8CpH0niX 9rDi3qtOK+r1fYjt03D8mNIzEFZ0ylr2tJWhQJUD7EQEZxHGwiWqqnGADUbnb4IsfBZcbhYCKj3 X X-Received: by 2002:a05:6512:539:b0:52c:ab21:7c05 with SMTP id 2adb3069b0e04-52ce185d03emr2736074e87.67.1719224322852; Mon, 24 Jun 2024 03:18:42 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a6fe779bc80sm271867366b.174.2024.06.24.03.18.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Jun 2024 03:18:40 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 097D85FA29; Mon, 24 Jun 2024 11:18:37 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , =?utf-8?q?Philippe_Mathi?= =?utf-8?q?eu-Daud=C3=A9?= , =?utf-8?q?Alex_Benn=C3=A9e?= , Thomas Huth , Laurent Vivier , Paolo Bonzini Subject: [PULL 07/12] qtest: move qtest_{get, set}_virtual_clock to accel/qtest/qtest.c Date: Mon, 24 Jun 2024 11:18:31 +0100 Message-Id: <20240624101836.193761-8-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240624101836.193761-1-alex.bennee@linaro.org> References: <20240624101836.193761-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::12b; envelope-from=alex.bennee@linaro.org; helo=mail-lf1-x12b.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 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 From: Pierrick Bouvier Signed-off-by: Pierrick Bouvier Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Alex Bennée Message-Id: <20240530220610.1245424-5-pierrick.bouvier@linaro.org> Message-Id: <20240620152220.2192768-8-alex.bennee@linaro.org> 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 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 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" +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) } } -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))