From patchwork Tue Jan 8 22:31:18 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 155027 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp42568jaa; Tue, 8 Jan 2019 14:48:07 -0800 (PST) X-Google-Smtp-Source: ALg8bN7NH2Yf1xrYj1Cj2i+mRzmN5f2pUXU0cPIVpiDCOR0AvhL9Mi2ODCBFIe2biUo5QwM7lMuS X-Received: by 2002:a1c:f613:: with SMTP id w19mr3193839wmc.0.1546987687744; Tue, 08 Jan 2019 14:48:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546987687; cv=none; d=google.com; s=arc-20160816; b=UklG4d/W1BUgzTR82PUG73eTROZHpVJczq3FK2dk4vLy0oQ66H5Nvebu5FyIoLFrqg CDunFyOK9FFN24rpgD9RIjkjnIA1Y0D9V2BUbvOurQayC3dU3LSPnIHFUAq7a3zzJuaA XuruJnj1mcBVRcRLW7nd6xCY73EcPtNfyojJKMcJbdOaWSsUnSphjtwMpnxC5qp31qLo fgKMfHG9nZv15QE1c0oEpMpKVK27yivQHpMTUn4Nksk2aWYI01EB7NElfBdRujVyX7rv UD/4o+SGeg6MpAZKNBwXgimYkEfpuUDUqCTV1TwctB9XtEan9AhNpEAjP07DuqgWSxbz XALg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=HtgD2kb0Tk4a5mvvgc/yTa4iLNXqbugMtAKVtQjNC/Y=; b=nuWxSYtgbqySOYkIM8gfk1B58a5cxkT7MEx8fV/f/5rgBQAiEgbc4OK4ckmi0rntzq lN3YhD0Bg5dWvSXgxyOqPGKt4bHTpqKYodjvtQKpWA39KyZzm2QwOxUAugqtbvAMOm7I bMEN5QsIE8jmw4KOfGBehLdmGItkcBrUrNdL7sSENRb1QiiEUHSnOFRYFOn8K8QUgjXS 4KbCES9s1GwHVHe5Ojmy5j1S1PouT0ekBw4nkLOnNmzuhxGTb+sVP+jZhyINj3mpQm4a +7faHAexS4vyVZdC7JxHNjlyhA5YPTr31viEy9o+5W7nPnmsTK23blB4LXhQsornZVkM +2sA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="W/gcyjNT"; 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=fail (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 p4si7658381wmp.160.2019.01.08.14.48.07 for (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 08 Jan 2019 14:48:07 -0800 (PST) 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=fail header.i=@linaro.org header.s=google header.b="W/gcyjNT"; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([127.0.0.1]:43775 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gh0AI-0006yB-L4 for patch@linaro.org; Tue, 08 Jan 2019 17:48:06 -0500 Received: from eggs.gnu.org ([209.51.188.92]:52840) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ggzvC-0000LZ-Fa for qemu-devel@nongnu.org; Tue, 08 Jan 2019 17:32:31 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ggzvB-0004ue-OU for qemu-devel@nongnu.org; Tue, 08 Jan 2019 17:32:30 -0500 Received: from mail-pl1-x642.google.com ([2607:f8b0:4864:20::642]:42419) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ggzvB-0004ts-Iv for qemu-devel@nongnu.org; Tue, 08 Jan 2019 17:32:29 -0500 Received: by mail-pl1-x642.google.com with SMTP id y1so2559686plp.9 for ; Tue, 08 Jan 2019 14:32:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=HtgD2kb0Tk4a5mvvgc/yTa4iLNXqbugMtAKVtQjNC/Y=; b=W/gcyjNTMpSJSCNGPMjfy1gRASXkpVNNpsxZ91KQPRAiPcD3xEe6H1TeFva2V8/vR/ JopoWG1vqgLRzHW25ik/F+5L5jpPC5REHThunmYbZ0t2wHX8PSC2ak0w5SHGatam25be PkJsaLvoH+RhOkZDv247k44IRpjro5CxZvQ9k= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=HtgD2kb0Tk4a5mvvgc/yTa4iLNXqbugMtAKVtQjNC/Y=; b=dO/VOUZBswzmP/bhJc25LCrXTW7rnkDtCR+Ypbn2MawdG+BbmuIV8mFhVh2y36UkV4 eT8cNo9zTYE49JGp4a7+zUeyKtQkyrMW0xi8wWoMo5hqVvPJgbI+OOfwIPKk1dt75Irt 02xy/5Y/FhJ23MiMFcID9iGwRLtY8EpSyQ1B/pFG+EZb/G+aN4kBmVSh3oTPRLfJaUaj 4/W0PxhaHMjoFoo180k/4AbeEOBxH4P9WhGgfcd4t16Ut9nQrngz8/mujCmMCvO9pESj yFz+KMz/KFhjo7YSax3TqUIjSL4+pEtZ7vif32IX+KdVnK4h7qWdDlP+7D9mKfo7AxAH ES5A== X-Gm-Message-State: AJcUukew5EIjOLfvnzmT2R4k0URhwAyTfWfB/LAcqnZPiro3NRUrayEe /+Pgz1aNYgN7mlj89hmd+IzjkkaOrPU= X-Received: by 2002:a17:902:9a81:: with SMTP id w1mr3434700plp.19.1546986748327; Tue, 08 Jan 2019 14:32:28 -0800 (PST) Received: from cloudburst.lan (2001-44b8-2176-c800-8cc6-2630-7d99-5ef1.static.ipv6.internode.on.net. [2001:44b8:2176:c800:8cc6:2630:7d99:5ef1]) by smtp.gmail.com with ESMTPSA id w128sm100686177pfw.79.2019.01.08.14.32.26 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 08 Jan 2019 14:32:27 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Date: Wed, 9 Jan 2019 08:31:18 +1000 Message-Id: <20190108223129.5570-21-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20190108223129.5570-1-richard.henderson@linaro.org> References: <20190108223129.5570-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::642 Subject: [Qemu-devel] [PATCH v3 20/31] target/arm: Export aa64_va_parameters to internals.h X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" We need to reuse this from helper-a64.c. Provide a stub definition for CONFIG_USER_ONLY. This matches the stub definitions that we removed for arm_regime_tbi{0,1} before. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/internals.h | 17 +++++++++++++++++ target/arm/helper.c | 4 ++-- 2 files changed, 19 insertions(+), 2 deletions(-) -- 2.17.2 diff --git a/target/arm/internals.h b/target/arm/internals.h index fdda2c866a..82cf685695 100644 --- a/target/arm/internals.h +++ b/target/arm/internals.h @@ -956,4 +956,21 @@ typedef struct ARMVAParameters { bool using64k : 1; } ARMVAParameters; +#ifdef CONFIG_USER_ONLY +static inline ARMVAParameters aa64_va_parameters(CPUARMState *env, + uint64_t va, + ARMMMUIdx mmu_idx, bool data) +{ + return (ARMVAParameters) { + /* 48-bit address space */ + .tsz = 16, + /* We can't handle tagged addresses properly in user-only mode */ + .tbi = false, + }; +} +#else +ARMVAParameters aa64_va_parameters(CPUARMState *env, uint64_t va, + ARMMMUIdx mmu_idx, bool data); +#endif + #endif diff --git a/target/arm/helper.c b/target/arm/helper.c index f934c80c28..f4538c9f82 100644 --- a/target/arm/helper.c +++ b/target/arm/helper.c @@ -9744,8 +9744,8 @@ static uint8_t convert_stage2_attrs(CPUARMState *env, uint8_t s2attrs) return (hiattr << 6) | (hihint << 4) | (loattr << 2) | lohint; } -static ARMVAParameters aa64_va_parameters(CPUARMState *env, uint64_t va, - ARMMMUIdx mmu_idx, bool data) +ARMVAParameters aa64_va_parameters(CPUARMState *env, uint64_t va, + ARMMMUIdx mmu_idx, bool data) { uint64_t tcr = regime_tcr(env, mmu_idx)->raw_tcr; uint32_t el = regime_el(env, mmu_idx);