From patchwork Fri Jun 30 18:04:03 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: 697986 Delivered-To: patch@linaro.org Received: by 2002:adf:fcc5:0:0:0:0:0 with SMTP id f5csp601003wrs; Fri, 30 Jun 2023 11:23:57 -0700 (PDT) X-Google-Smtp-Source: APBJJlFZLO0T6GuoYUYLJRx3Upz9b02l+eKgFcviRjs5DzayJ6aQwbBRM8ZKI3e2OEgeOWcje0KO X-Received: by 2002:ad4:5de6:0:b0:62f:f1ca:ee55 with SMTP id jn6-20020ad45de6000000b0062ff1caee55mr4290038qvb.41.1688149437791; Fri, 30 Jun 2023 11:23:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688149437; cv=none; d=google.com; s=arc-20160816; b=zo3IlRcIDfTwmRS4mxgGFHWsLzB9Tr7UwCoOGnpbekOWonMBynXs9cxOkgwxvMXtvf /CedxWxkOuMOzn8I54vHPnJQTxbBUogIG5lrxvKqRQnHv8ZOSvQbgL2XWeZHioYOIvKa fothaEbihCasapGG1sa0TlE8eXvtz7HRWLxlhKLk+2VD2auFzeW+PKG7eknP5HDyH2fr 0K4t6JaHooebLUkHpsRym8Sfn0F+1GmW2rVDX+sxd99Y+ChIomuf5QQYGH8zKaysynGr czVWGVRW15sQu1sLsuFgLDYtGGhheTc5sVmj4btluqTtK+Zo32mz36B9NMETXHRHxLRC wp0Q== 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=Ay2STL3w3t73igsB7L/HM+7h1jtUCGIXFOIRbzQEacg=; fh=OltHerz+Vf7zZkebZbScoRT4WgVwJDskRS7DoEjx2Hw=; b=Tq4p9KExOkpNRm0Kho+TNvvd+fMFznSYTqZ9fDpHFHk4d9KNKdHh+3qfwgUw1rZC5E 3EjTGpsLBo8c8Gq3rNokqJtF21pP9U0hAug3gdRwAjab1j5cRMu06jUsQxWOQIGmfAWk 49Y5h5VFewhTO9WYWGRqWZfImRrfH3oAfpKqQB0B10x/f60g3A25z+nQ5O/RC0iRqADV /LEawprgcFIh8u6ECAUe+urz8aldu+8UTGXUeJH72bSz0TRt1VxJo9QWi0rg+DDnriZT xSIUhb9N2EX7h6qC2txbB3x63dHxxS8Se/VKtCHLSW0Qz6sE+2BDITa9Mt2KzxV8Kw1N RFYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=jxYXEAWM; 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 fv10-20020a056214240a00b0062febed2bafsi7255613qvb.356.2023.06.30.11.23.57 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 30 Jun 2023 11:23:57 -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=jxYXEAWM; 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 1qFImR-0004eW-HX; Fri, 30 Jun 2023 14:23:39 -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 1qFImQ-0004dY-Aj for qemu-devel@nongnu.org; Fri, 30 Jun 2023 14:23:38 -0400 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qFImN-0001fx-D3 for qemu-devel@nongnu.org; Fri, 30 Jun 2023 14:23:38 -0400 Received: by mail-wr1-x429.google.com with SMTP id ffacd0b85a97d-3113dabc549so2599213f8f.1 for ; Fri, 30 Jun 2023 11:23:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1688149408; x=1690741408; 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=Ay2STL3w3t73igsB7L/HM+7h1jtUCGIXFOIRbzQEacg=; b=jxYXEAWM5fsjiwKZfee8MetTUA9eXz6nKU1Ol41fy6BqsmPOsg4u1fS7cvBG+CqfDi UFSeLAlYxjjd1lukeLo/oVf2Bo4ayxc6qq2LL1yMnTzOJDKbyEpGdHpd2Vs9LGDN9nFo YZtXylLYvo1u7OQqbltk772UI0lBF2CA2mY42nkGEcUzXIkK1SKSA1ugAkoFNJo97Bm4 YabmDgN1DjNaMNUsKqJirm8U0hve6az432WjtNwF8/tnALYvOx+2TJRcxWhVkO9cqVEA A8tGENOnyqZOp9Ib8VSOU9qyvxmFLA+6vTlDH7SKDiIbxACJDlfsexrT0khMfj/9Q5/O etYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688149408; x=1690741408; 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=Ay2STL3w3t73igsB7L/HM+7h1jtUCGIXFOIRbzQEacg=; b=XeDifliTX5PL/auv0sghLqY+LS7QMGNAxjVJYQYEGglIvTAHkXelt7vpjxRD0MHjvx nfr3h01GnKBZlRYFKu3/8kQ941GiTf+9U+f6EW/3YFKIRFpztMnI2ccTFrD/g64FQd/8 PsdMMcHlPqJNWBcUr0D8KOk/6qjHYlINOCcmcGV9SoRnoaT2oiXCQzdKorX5eg7Xt3a4 oV8kPhnC/44s0zw9lDo9S9d3nfZzuvTg1XbjbHx+6+VAaj7aXohMzMWEUX7i5ZkQQx+w uhYxuvbQ2iaZEqofalTiEv29zutIxz5Nt7DmEQyzFbr39ZUtfb54S5ujTfSn+2JD3L2l wPbA== X-Gm-Message-State: ABy/qLYH+B2hwE9omQ2k5RbZkQj8AjjLgbGTRn7min76LRwo2jBBWVJf YcVlYQUzXiV9ku9t32M6C/K0PQ== X-Received: by 2002:adf:f992:0:b0:314:1e87:f5d3 with SMTP id f18-20020adff992000000b003141e87f5d3mr4250739wrr.29.1688149408331; Fri, 30 Jun 2023 11:23:28 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id m9-20020adff389000000b00313f551b032sm13070406wro.53.2023.06.30.11.23.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Jun 2023 11:23:27 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id EB88E1FFCA; Fri, 30 Jun 2023 19:04:25 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Paolo Bonzini , Stefan Hajnoczi , Leonardo Bras , Laurent Vivier , Peter Xu , Juan Quintela , Beraldo Leal , Radoslaw Biernacki , Qiuhao Li , Peter Maydell , Yanan Wang , Riku Voipio , Wainer dos Santos Moschetta , Mahmoud Mandour , Alexandre Iooss , =?utf-8?q?Alex_Benn=C3=A9e?= , =?utf-8?q?Philippe_M?= =?utf-8?q?athieu-Daud=C3=A9?= , Eduardo Habkost , Thomas Huth , Laurent Vivier , Bin Meng , Marcel Apfelbaum , Bandan Das , Cleber Rosa , Richard Henderson , Leif Lindholm , Marcin Juszkiewicz , qemu-arm@nongnu.org, Darren Kenny , Alexander Bulekov Subject: [PATCH v4 18/38] target/arm: make arm_casq_ptw CONFIG_TCG only Date: Fri, 30 Jun 2023 19:04:03 +0100 Message-Id: <20230630180423.558337-19-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230630180423.558337-1-alex.bennee@linaro.org> References: <20230630180423.558337-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::429; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x429.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=unavailable 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. Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson --- v2 - tweak comment to rth's suggestion --- target/arm/ptw.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 }