From patchwork Wed May 3 07:23:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 678794 Delivered-To: patch@linaro.org Received: by 2002:a5d:4a41:0:0:0:0:0 with SMTP id v1csp917301wrs; Wed, 3 May 2023 00:51:49 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ46dvFECa5OpurKme9eeAFZSGCC23PqQgyxbkrfISosDkt6rYP15Mi5gOrEDQ5Z8JnLdt3Q X-Received: by 2002:a05:6214:21c7:b0:5ad:47a1:1fd8 with SMTP id d7-20020a05621421c700b005ad47a11fd8mr9633681qvh.50.1683100309648; Wed, 03 May 2023 00:51:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683100309; cv=none; d=google.com; s=arc-20160816; b=hth0BRQ90i0ax9OQHm2JXJRkz5fuDuHRssJ4veF/D4hXVSSjYhtUHNb2YutseShAvM FxUEgGY+cNFmXTPdlA0ipolFPEcWwvvlt3jiXYFyKtMNYW4UumBVthmBZlVWifabScdC zUSx+qBscaLbMO9PmhzMGz40477K0ufJWN0QWaIuy1aZLNAFNulg8jEEEW/4eqExdH1k QTYd8D1edpVYo5cjf00UtYycYRTWX2tOoiG0oW2VqyUkAJN41f6lpWbAFEmzqu3N+sR0 6PFg46v8sYEzk7QCvnVDkDlVQnVjQJAevs77e78N0B65eYO/kQgYBVWb260N4iD+w3Bp VXEg== 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=2NJv9OOJTdlX++M0pyUMomvcf+tdOdIff0jFcTgQSmI=; b=XWsMPv0wDjjNQsnRiU1uIMZKUIxoF5Symt0f987n7ClURkwfRJ+B+b3Rw8TtDKCdjf Cyw7ZGkue2oCMYKKakA9scLRGkuhLoHR/dnDow7tKquDG0RNecXjl9ovkY1Bs/SoRfei JAWRY08X39WyYqtJNDr4V6qQA16ds6TGgRJ6hwlSNQFszl06XN8ykP04drNzwxTNI9qr ME6QL1t5CfkdWMfmiVvtotO8SkKim8fEdJ7Na8g/PLRdj+6pFjgcjfVirEATfMz+2S+9 KFgaTEu6JDjAS5gnC7TFsnOPuE7ZH7p+ZUF8+vc+QY7+V7BhJ/hfaoyHDY0Joc8iO0vE zgzg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PMfo1BfO; 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 iv15-20020ad45cef000000b0056eb019cf92si18603830qvb.118.2023.05.03.00.51.49 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 03 May 2023 00:51:49 -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=PMfo1BfO; 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 1pu6wt-0008Ie-2c; Wed, 03 May 2023 03:30:51 -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 1pu6wi-0007lJ-RX for qemu-devel@nongnu.org; Wed, 03 May 2023 03:30:44 -0400 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pu6we-00071W-3r for qemu-devel@nongnu.org; Wed, 03 May 2023 03:30:40 -0400 Received: by mail-wr1-x434.google.com with SMTP id ffacd0b85a97d-3023a56048bso4438877f8f.3 for ; Wed, 03 May 2023 00:30:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1683099034; x=1685691034; 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=2NJv9OOJTdlX++M0pyUMomvcf+tdOdIff0jFcTgQSmI=; b=PMfo1BfOr6M/UEEksrRIxXTs2fW/SJc+NN9yWTJAGblk+FlIk7IBD+IkLWIxsJWOyd S+U7GyvEloKvtCqDxyi5+eYA6pvRvnPfGbdqhIWcF69kl+yOi/oxpTByU1khEpq4n1e6 LSXT4e0TVY0prJXJERLQPkrksdmxi1YAi9bUQBHZhKwmaojydduy/K0t0hrL2+unLv2g OeUF5K57iNYjmYxT1222SZHvk8wDCwwCuWTUeJBYnsfdJFyV3fmdLhx6w0lUap9bNWw4 wO3rtEDzxeRXlxMjoYxOqkhCvEMVlzvJOCVs+gEqXIZFreFxoZvJJNgrLJHUczIquz3c tNzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683099034; x=1685691034; 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=2NJv9OOJTdlX++M0pyUMomvcf+tdOdIff0jFcTgQSmI=; b=WuWbP7vO6OY/jVTV2mrUQuh0kQ2VI+FtI/TiPglgWm3mms/VONRDWOFEaVY2Hnz35h r3dWNeluTBa5ZEBct3ksl70yZT0ptUCUtpezC3k4DECKRW8LMu823WdceoK1OHIkrlqQ po+SrqbhKCYwYO9L2nznfKJn5rmBtan0BJ9ib6NEJfH2QJqH1zJ4lVWApkATvgRpQvAU ms9lzcJ19SnAtURzIKc4j0p/9dxp3SWBuFNI6saGXFa0VLs8OfqjjJcR/N+MgLhvSlIG ljRR52qiNgB9ieMyveb7lRSRyPbAdg0T1TB46U8axUUUFimAWmj4KsouNntinhtbhYX8 UDGQ== X-Gm-Message-State: AC+VfDyxhnG3OzRHTxFFFvMUYb5/u9pKs90Hk8zCY9fA332msQxM0AiM 261e+628T3m9sqBX3o091qv5FLOxnQMZKxJP6vaPaA== X-Received: by 2002:a05:6000:1145:b0:306:2cf5:79dc with SMTP id d5-20020a056000114500b003062cf579dcmr6012766wrx.35.1683099034279; Wed, 03 May 2023 00:30:34 -0700 (PDT) Received: from stoup.Home ([2a02:c7c:74db:8d00:c01d:9d74:b630:9087]) by smtp.gmail.com with ESMTPSA id f24-20020a1cc918000000b003f0ad8d1c69sm982896wmb.25.2023.05.03.00.30.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 May 2023 00:30:33 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: ale@rev.ng, philmd@linaro.org, marcel.apfelbaum@gmail.com, wangyanan55@huawei.com, anjo@rev.ng Subject: [PATCH 81/84] tcg: Split out exec/user/guest-base.h Date: Wed, 3 May 2023 08:23:28 +0100 Message-Id: <20230503072331.1747057-82-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230503072331.1747057-1-richard.henderson@linaro.org> References: <20230503072331.1747057-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::434; envelope-from=richard.henderson@linaro.org; helo=mail-wr1-x434.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, T_SCC_BODY_TEXT_LINE=-0.01, T_SPF_TEMPERROR=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 TCG will need this declaration, without all of the other bits that come with cpu-all.h. Signed-off-by: Richard Henderson Reviewed-by: Thomas Huth --- include/exec/cpu-all.h | 5 +---- include/exec/user/guest-base.h | 12 ++++++++++++ tcg/tcg.c | 3 +++ 3 files changed, 16 insertions(+), 4 deletions(-) create mode 100644 include/exec/user/guest-base.h diff --git a/include/exec/cpu-all.h b/include/exec/cpu-all.h index 95b9947e20..09bf4c0cc6 100644 --- a/include/exec/cpu-all.h +++ b/include/exec/cpu-all.h @@ -84,11 +84,8 @@ #if defined(CONFIG_USER_ONLY) #include "exec/user/abitypes.h" +#include "exec/user/guest-base.h" -/* On some host systems the guest address space is reserved on the host. - * This allows the guest address space to be offset to a convenient location. - */ -extern uintptr_t guest_base; extern bool have_guest_base; /* diff --git a/include/exec/user/guest-base.h b/include/exec/user/guest-base.h new file mode 100644 index 0000000000..afe2ab7fbb --- /dev/null +++ b/include/exec/user/guest-base.h @@ -0,0 +1,12 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ +/* + * Declaration of guest_base. + * Copyright (c) 2003 Fabrice Bellard + */ + +#ifndef EXEC_USER_GUEST_BASE_H +#define EXEC_USER_GUEST_BASE_H + +extern uintptr_t guest_base; + +#endif diff --git a/tcg/tcg.c b/tcg/tcg.c index 8314b912f7..460ec66490 100644 --- a/tcg/tcg.c +++ b/tcg/tcg.c @@ -57,6 +57,9 @@ #include "tcg/tcg-temp-internal.h" #include "tcg-internal.h" #include "accel/tcg/perf.h" +#ifdef CONFIG_USER_ONLY +#include "exec/user/guest-base.h" +#endif /* Forward declarations for functions declared in tcg-target.c.inc and used here. */