From patchwork Thu Sep 14 18:57:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 722600 Delivered-To: patch@linaro.org Received: by 2002:adf:f0d1:0:b0:31d:da82:a3b4 with SMTP id x17csp560024wro; Thu, 14 Sep 2023 11:59:48 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE9kgJcgWRN+qE2kZ+Dw8iTFm+jXtf44EUjwiwv/CVzYfAKiphZu1uHcxvuM2GM6ZamehSd X-Received: by 2002:ac8:580b:0:b0:40f:f860:f025 with SMTP id g11-20020ac8580b000000b0040ff860f025mr7695772qtg.40.1694717988334; Thu, 14 Sep 2023 11:59:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694717988; cv=none; d=google.com; s=arc-20160816; b=ZDvYQfZ4GZ+pe1rq5qayOhcA3G1jC/rA7M/0HlBidwNXf7i2Woq5d/yv8o4/XL+vcm QNN0v7UprxitdzTP33gqRW8Uj/kUGjNdzhd/42mkEW95M2HTUEIcGHP53AKRJI/2WTjJ 9c40MSsEe8ytHw+27SDC5U+usmVl/D4Zrjh6/k/7p5XsGfiFN6W9QeEwv3bI8xAIM0V5 n+Yy6W93W9W5e/RIXcivXKrybGnDVlwnwWt0EjaBV6Nc50nWQmJDOzXBFACKrS5ofkq5 xkZlw0SQs3NqUKAdFI657VjYQH34fCtVlkfilkXwp4n/Pa9NaLHEhqW5qIxlU9Nq0az6 yOzw== 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=Y8/rRDkqjHLNiQmWwYh6x6u6ajkv9cBUtG5tp1iGRHE=; fh=N22+cq4r3bt3EFi1ekaqHEIttLrOanCgE4ldlzS79LU=; b=OmTmMclUWuUr0Eb7reyyjdoa4xvA/6g8/4c5VDQ2VQ0yTY8RNwCqwj785EYd6EzrdU pfa01EcKKasPVpLpeoBMMjc+Qx53xjsUMmcGvys0b2vwigew7qIB8KtaTZ0nuwQIpunZ 3CL4ZEuwCZDNb3ndQBHy1VgoWGZlfKakYjDq8a/rMQnhGrdqxer7Hoqe5aMSVNgbcOc3 r5p89rckuFCiPEOYKlfuhgtJL51LekQkKyWwfBKJ9f8N32IuRJDTrEKI8wb1mWA6/W/P T8m8At3mnazclvYFEIPgrVy/uqQVeGwKrXOohj63pbJwRA5K1vGm2B6TSrachAWJOERa /UDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=avRAShtg; 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 f7-20020a05622a104700b00403b55ed4bfsi1330241qte.487.2023.09.14.11.59.48 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 14 Sep 2023 11:59:48 -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=avRAShtg; 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 1qgrY0-0000mD-Ib; Thu, 14 Sep 2023 14:58:40 -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 1qgrXy-0000aw-Pp for qemu-devel@nongnu.org; Thu, 14 Sep 2023 14:58:38 -0400 Received: from mail-ej1-x632.google.com ([2a00:1450:4864:20::632]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qgrXh-0007jL-V2 for qemu-devel@nongnu.org; Thu, 14 Sep 2023 14:58:38 -0400 Received: by mail-ej1-x632.google.com with SMTP id a640c23a62f3a-9a21b6d105cso166936366b.3 for ; Thu, 14 Sep 2023 11:58:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1694717897; x=1695322697; 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=Y8/rRDkqjHLNiQmWwYh6x6u6ajkv9cBUtG5tp1iGRHE=; b=avRAShtgPYzb8lrsiYEXtqGaamTUo5OPDxSen32lR2UTRkUUcKaNk/MEOLxF5Q2g+R MBzdkrbY2vhcWliC9kX0aLs7c3rohagPjqrJBBjDdW8l5/oJzRo5MGKozHQnAYUnUmkL bHbCZ2JEhvw3IJDo3U3hTpnsuYxOYo18GBNBb/TfpEuXuEi7GTFadt0vGydIOZ02SdRi 9sClU+1v0Srk7atVVEB2c5OMafH4i/uvyhBCYRy2Cgw+3nKkRahGLNcq1gFksqVKaHw4 g6CXED5SVYZa2jdHo6+TnMezBHpnRAKZaptL2YCEHDe1T37NirWO6fQk99q9E1Wc6nrT NWDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694717897; x=1695322697; 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=Y8/rRDkqjHLNiQmWwYh6x6u6ajkv9cBUtG5tp1iGRHE=; b=WlDU7drf/Ef1acvjKYRHtMyoEMLSxwUjnuvQCYCMOn2yjhywNc02C1IHir72xt7ABI Z/kbtlDwvr0AfpVJZgnfnouG7XXkl2XFji0luW8q5W0C1Y3M+B3ygVcuHx+2BAkswMWY B0ff2SjVnTx0isjfvxWk9Oe7yA7g+3pB43OcE25AyYbCvkik9KRbhHuTN8H467RgRDtf LvdY4rip5Rsr47dLW6E1qhBcj4QkSSeBuPvIIlszTuvsG/xrKU60AYflaIMSbcT79yg5 4t2YRe4ZropvcYofNyvW/aL8KPUHotJ2zaAWD5jtkA9ML1f6jlLjMVLhpBEm6RloUWV0 FHlg== X-Gm-Message-State: AOJu0YyvpFsiGDuy1wYa8hvTItD9W8xP5Xs4nARWKHHBRueggjFE9Xuc TbuEJHd5BADk8e8ViQYOFE1Sg3i9RGWjUwkrJ78= X-Received: by 2002:a17:906:5a5f:b0:9aa:20b2:35e7 with SMTP id my31-20020a1709065a5f00b009aa20b235e7mr5174112ejc.9.1694717897323; Thu, 14 Sep 2023 11:58:17 -0700 (PDT) Received: from m1x-phil.lan (176-131-223-129.abo.bbox.fr. [176.131.223.129]) by smtp.gmail.com with ESMTPSA id qx15-20020a170906fccf00b009a5f1d15644sm1360132ejb.119.2023.09.14.11.58.15 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 14 Sep 2023 11:58:16 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , =?utf-8?q?Daniel_P=2E_?= =?utf-8?q?Berrang=C3=A9?= , Paolo Bonzini , Thomas Huth , Alessandro Di Federico , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Anton Johansson , Riku Voipio , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH 09/11] accel/tcg: Make monitor.c a target-agnostic unit Date: Thu, 14 Sep 2023 20:57:15 +0200 Message-ID: <20230914185718.76241-10-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230914185718.76241-1-philmd@linaro.org> References: <20230914185718.76241-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::632; envelope-from=philmd@linaro.org; helo=mail-ej1-x632.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 Move target-agnostic declarations from "internal-target.h" to a new "internal-common.h" header. monitor.c now don't include target specific headers and can be compiled once in system_ss[]. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Anton Johansson --- accel/tcg/internal-common.h | 17 +++++++++++++++++ accel/tcg/internal-target.h | 5 ----- accel/tcg/cpu-exec.c | 1 + accel/tcg/monitor.c | 2 +- accel/tcg/translate-all.c | 1 + accel/tcg/meson.build | 3 +++ 6 files changed, 23 insertions(+), 6 deletions(-) create mode 100644 accel/tcg/internal-common.h diff --git a/accel/tcg/internal-common.h b/accel/tcg/internal-common.h new file mode 100644 index 0000000000..5d5247442e --- /dev/null +++ b/accel/tcg/internal-common.h @@ -0,0 +1,17 @@ +/* + * Internal execution defines for qemu (target agnostic) + * + * Copyright (c) 2003 Fabrice Bellard + * + * SPDX-License-Identifier: LGPL-2.1-or-later + */ + +#ifndef ACCEL_TCG_INTERNAL_COMMON_H +#define ACCEL_TCG_INTERNAL_COMMON_H + +extern int64_t max_delay; +extern int64_t max_advance; + +void dump_exec_info(GString *buf); + +#endif diff --git a/accel/tcg/internal-target.h b/accel/tcg/internal-target.h index 4ce3b29056..f9eec1ce28 100644 --- a/accel/tcg/internal-target.h +++ b/accel/tcg/internal-target.h @@ -99,11 +99,6 @@ static inline bool cpu_in_serial_context(CPUState *cs) return !(cs->tcg_cflags & CF_PARALLEL) || cpu_in_exclusive_context(cs); } -extern int64_t max_delay; -extern int64_t max_advance; - -void dump_exec_info(GString *buf); - extern bool one_insn_per_tb; /** diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c index f5625e047a..95dd8a30cb 100644 --- a/accel/tcg/cpu-exec.c +++ b/accel/tcg/cpu-exec.c @@ -42,6 +42,7 @@ #include "tb-jmp-cache.h" #include "tb-hash.h" #include "tb-context.h" +#include "internal-common.h" #include "internal-target.h" /* -icount align implementation. */ diff --git a/accel/tcg/monitor.c b/accel/tcg/monitor.c index 30724fdb98..caf1189e0b 100644 --- a/accel/tcg/monitor.c +++ b/accel/tcg/monitor.c @@ -16,7 +16,7 @@ #include "sysemu/cpu-timers.h" #include "sysemu/tcg.h" #include "tcg/tcg.h" -#include "internal-target.h" +#include "internal-common.h" static void dump_drift_info(GString *buf) diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c index 6c09b7f50d..8cb6ad3511 100644 --- a/accel/tcg/translate-all.c +++ b/accel/tcg/translate-all.c @@ -61,6 +61,7 @@ #include "tb-jmp-cache.h" #include "tb-hash.h" #include "tb-context.h" +#include "internal-common.h" #include "internal-target.h" #include "perf.h" #include "tcg/insn-start-words.h" diff --git a/accel/tcg/meson.build b/accel/tcg/meson.build index 8ace783707..0fb03bd7d3 100644 --- a/accel/tcg/meson.build +++ b/accel/tcg/meson.build @@ -20,6 +20,9 @@ specific_ss.add_all(when: 'CONFIG_TCG', if_true: tcg_ss) specific_ss.add(when: ['CONFIG_SYSTEM_ONLY', 'CONFIG_TCG'], if_true: files( 'cputlb.c', +)) + +system_ss.add(when: ['CONFIG_TCG'], if_true: files( 'monitor.c', ))