From patchwork Mon Jul 3 13:44:07 2023 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: 698711 Delivered-To: patch@linaro.org Received: by 2002:adf:fcc5:0:0:0:0:0 with SMTP id f5csp1763217wrs; Mon, 3 Jul 2023 06:55:49 -0700 (PDT) X-Google-Smtp-Source: APBJJlFZXKIwuiUKyVRtdypmCXhd1aW5klnD6HzW6zsYaQLDOnw/6gwX4+gOPoNRXWdArboid08j X-Received: by 2002:a05:6214:508c:b0:636:836e:8064 with SMTP id kk12-20020a056214508c00b00636836e8064mr7663047qvb.63.1688392549266; Mon, 03 Jul 2023 06:55:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688392549; cv=none; d=google.com; s=arc-20160816; b=sOhITtttzKGfn7HUfoKn5wOY80Q/PjPh00Ct0lUgaHBRTZYDT+GIEgKJmWO3VNtapy ZaohnAPnakmMbOGJc/lIKuOI+2IghtbX3nHCowRipdrlVzD4jHotYNfCezKa30hyKgKj Sq/4BK+9UQ0SByLQa4DO7hEnAmixCci8UkSEKlRW9dYH8zAaTJetQ/2NS8D9dWGOAs8d Cenwakk7VEMXKW2XhFlEcuaVMqf4uIAjk0uhW6OCu/oWVoQWEAl+bFEB8jY0lnLh7XQq K0nqJsrYCdg7m0oGBWNijBRX4hVZzu6UN1rZw4OiGTI1GAMFUL9iiPz50fID8y43SEfV G8rw== 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=BaNMUangs5gWtxxq2cv83Ymb8o2XEiPMP7DPTxDoR+U=; fh=5l4T6DKG+thc8P//09XoeOWVEktD75tm5BvYKR6Xu0U=; b=xuoj7SPEhhOPoHXQt3OtaOEmTL27ngBtShhjteC0T3v66HBANTtTMZDAtxSthSv2wl YWgr+zQwj1atFWs1eXbJyY0jfnif2cDJbljkp3c88Qkh3AJXC8JdE4GTPoeCRsIHWkve ASR3j5W4zYKj+rMEqh30hGRygbKNevsp53HNia0lIAihcFcFCkJdK4p9jUckErCJ5eRa Bmsfta8wRR5UAWvbNIEnvJqUp6Ge5fWQG/EytFJMAo2Hmja7KE5kFZoAivQUyv+a9eq0 edv7W0PD8hzillecFeg4rRf5lMb3+otlAzgEeSPl5v6QqEOCRIyfNs5OummqI5hJVCs0 a2Ww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=k8cnn9ut; 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 iy1-20020a0562140f6100b00623951524aesi8903597qvb.206.2023.07.03.06.55.49 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 03 Jul 2023 06:55: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=k8cnn9ut; 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 1qGJzl-0000Zf-Lo; Mon, 03 Jul 2023 09:53:37 -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 1qGJzh-0000WS-Un for qemu-devel@nongnu.org; Mon, 03 Jul 2023 09:53:34 -0400 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qGJzg-00082P-8g for qemu-devel@nongnu.org; Mon, 03 Jul 2023 09:53:33 -0400 Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-3fbc77e76abso40419475e9.1 for ; Mon, 03 Jul 2023 06:53:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1688392410; x=1690984410; 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=BaNMUangs5gWtxxq2cv83Ymb8o2XEiPMP7DPTxDoR+U=; b=k8cnn9utKjqhc/wB4hnl10+Vki/oGFcndUUuw+pIP9f/5PWw0lP4PsnNMgXLtH1O7W dTSwmCkvvG031Tsjw4akbpvKBa7EW8vsWknwLiozhYm5dN+oNiIqKZdCA9/x8WHCo4qY vWmKl2k3rrjmiL4GjBJCJT4vuwaB3N5feZlj3YxpDEw8OXqzwBZMMLc+1Ai8Rt/AQeZq cHze8c3tizT4kAN5PaAcj4m1ZtA8IMve1KnQaC7fNGamyfYsOlpUUi4/1MI0jT5V/t8z UXL7gMCGcaT04CJOKFXG8ti2ckYyrRIEanZKAybHs8bUcSqTKoex3o39bYOJsCzhPGb0 yFpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688392410; x=1690984410; 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=BaNMUangs5gWtxxq2cv83Ymb8o2XEiPMP7DPTxDoR+U=; b=gR3JULA8Xwk5/IpvYBIjwZ6Jz0TpVUEFnL3PHPBqbPHxBCipI9tlxRuQrHMH5dFV5h Y65MxEaiUkbtkZcURQmWvCSAimWSZDMzB6mWHyvOKFKZdgtjU0gZkFgawS9r7tXWELK4 fMcYsEchQKNefeTyn47D+Cf1T4aGkLCG9uoUNC9vWfzUfeHsQZQRadAnwoyqAdUYzKqI VaX0f5QLgqJ889Nl2iqlAPrUBYggxcYdh6iye4DucqHyWxFNpHc2owVJWv0NcJWoG71u kNWskVbyT9CfwPiSVW+UynTRdzKZYTpwVA0Sv9L0WNxreHtcMUckT4HklH3ge/dluSRr jt7Q== X-Gm-Message-State: ABy/qLb3zCYJTWS9o0pkWUrpD8fBS+/3o1nIka6+RYO8PhIst7VRYBgv zJQdgMstEMzNt6GvKMAAQ6vIOQ== X-Received: by 2002:a5d:6305:0:b0:314:1e86:e75d with SMTP id i5-20020a5d6305000000b003141e86e75dmr8223727wru.34.1688392410722; Mon, 03 Jul 2023 06:53:30 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id da16-20020a056000197000b0031274a184d5sm25819195wrb.109.2023.07.03.06.53.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Jul 2023 06:53:29 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id D11691FFBE; Mon, 3 Jul 2023 14:44:29 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: richard.henderson@linaro.org, =?utf-8?q?Alex_Benn=C3=A9e?= , Peter Maydell , qemu-arm@nongnu.org (open list:ARM TCG CPUs) Subject: [PULL 18/38] target/arm: make arm_casq_ptw CONFIG_TCG only Date: Mon, 3 Jul 2023 14:44:07 +0100 Message-Id: <20230703134427.1389440-19-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230703134427.1389440-1-alex.bennee@linaro.org> References: <20230703134427.1389440-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32e; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32e.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 The ptw code is accessed by non-TCG code (specifically arm_pamax and arm_cpu_get_phys_page_attrs_debug) but most of it is really only for TCG emulation. Seeing as we already assert for a non TARGET_AARCH64 build lets extend the test rather than further messing with the ifdef ladder. Reviewed-by: Richard Henderson Signed-off-by: Alex Bennée Message-Id: <20230630180423.558337-19-alex.bennee@linaro.org> diff --git a/target/arm/ptw.c b/target/arm/ptw.c index 6015121b99..42355caa9b 100644 --- a/target/arm/ptw.c +++ b/target/arm/ptw.c @@ -628,7 +628,7 @@ static uint64_t arm_casq_ptw(CPUARMState *env, uint64_t old_val, uint64_t new_val, S1Translate *ptw, ARMMMUFaultInfo *fi) { -#ifdef TARGET_AARCH64 +#if defined(TARGET_AARCH64) && defined(CONFIG_TCG) uint64_t cur_val; void *host = ptw->out_host; @@ -709,7 +709,7 @@ static uint64_t arm_casq_ptw(CPUARMState *env, uint64_t old_val, return cur_val; #else - /* AArch32 does not have FEAT_HADFS. */ + /* AArch32 does not have FEAT_HADFS; non-TCG guests only use debug-mode. */ g_assert_not_reached(); #endif }