From patchwork Tue Jan 8 22:31:19 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 155035 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp48550jaa; Tue, 8 Jan 2019 14:56:28 -0800 (PST) X-Google-Smtp-Source: ALg8bN5/evzdb7/sLGRPxlc+i/Lx8KsR+Y0mLIYKJm3Z2+CnxhCDvBSXPMRQpFLe+7wuh/teLE15 X-Received: by 2002:a5d:4652:: with SMTP id j18mr2921611wrs.279.1546988188578; Tue, 08 Jan 2019 14:56:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546988188; cv=none; d=google.com; s=arc-20160816; b=XoAxdlX5ojVPfsaQ10nBUXkSAmBpCuSk4nLuOwFHh2nBujgTY/0m2u+U/gNW3whSE1 X4kOWLuqvpWCFGo5jGVZvAIEiiAAXylkTkB4WDu1Gauc/+xN92uyv1g11PjyFEF6dU1M N6kS76TXoMjnlOPrpqWUL2QCV0mhl0J7bZ7wrUBrGBBUHzaFi/FAR/SYNq3w6yl5AnLH p+OMFWzSIzrJWTtMAsbBWZr1mvm4Df2A+FRfV06iZW4gUPJ5x1aVXMKkM8aq0jQGAsMq w6VSfwhOjwGqKvuaIVGO5K0/D6RBGtP4d9+cn0IIM8M/vSUzRJ+KYbS6qhQdxkhh9+k/ K+TQ== 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=Jm0q4VrYesXT+1aKV7gHpLk65YgMU1hEIfu+1DhEv/c=; b=XnEYAYSzjgnJV8fcobvUbT4qs+3MpjrrkshNMSXqp/eIQSDf90KTtEW77RzDjSdpJR pGKT8pHBKDts7140mjfdRVoaeIFv5Ivu9SKJNBi1smOuVwGc8l6ujzrLI48zsslsEKIw WjbAdh2rXjB+xzTOhMMnPAnBKzhtuirRvcN99GZ0l6Wh2QuBnq3XYBl9pC1kAurbneZ2 f/ypvjToBEPvHOk9K2XyOs9i+vo3XAk/kEU3vbg3K7e9KOotbd2JxptDvgxMpx/o/pUs D0rDNuvta1Q/KKwkWosD3TAmmxc7EpLxmZ7WEOHfBDq/bvtBpM1VFq9g7hoajmvG0bTO mhiw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=WMtx8eMW; 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 a6si39331066wrw.119.2019.01.08.14.56.28 for (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 08 Jan 2019 14:56:28 -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=WMtx8eMW; 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]:45661 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gh0IN-0005r3-Gl for patch@linaro.org; Tue, 08 Jan 2019 17:56:27 -0500 Received: from eggs.gnu.org ([209.51.188.92]:52867) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ggzvF-0000P5-9e for qemu-devel@nongnu.org; Tue, 08 Jan 2019 17:32:35 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ggzvE-0004xk-He for qemu-devel@nongnu.org; Tue, 08 Jan 2019 17:32:33 -0500 Received: from mail-pg1-x541.google.com ([2607:f8b0:4864:20::541]:45183) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ggzvE-0004x5-By for qemu-devel@nongnu.org; Tue, 08 Jan 2019 17:32:32 -0500 Received: by mail-pg1-x541.google.com with SMTP id y4so2343324pgc.12 for ; Tue, 08 Jan 2019 14:32:32 -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=Jm0q4VrYesXT+1aKV7gHpLk65YgMU1hEIfu+1DhEv/c=; b=WMtx8eMW2AHj0ZMaV3Cpc/+FQw6m91bFOE7+VuwQIl+sbqjLq9+o25PqWPdQyr+qut 1ZEMQ3IsimLdDqEDi0f6J6CefAl7x6OVDUoWmB719JGQ6mb5/74XWvAva73HUC5RNbP3 nbMayOMZMV91W1PFJS4PeCbFKRXmeTSuuWqdk= 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=Jm0q4VrYesXT+1aKV7gHpLk65YgMU1hEIfu+1DhEv/c=; b=M0dkomZmrQuDc09HK7Fda7tQypR4aPHizkhSSZGN1CkDl0kLW55fvZ9dRONC+j0Ppn JLWNOdQyZQVmD4Wtd7UpLN0jnm/PHQRhBM08kyiZZnC1Yk1TR8LFzZFbSWY20agmNO5j ocA2axPI6C9NEPzRSLtGxEOsExlvtvedACztQqaw8O7k/kwODSBMTm0JqGs2BY+0MyKO 6QalWTHaUOSD1B1f6qvZiuRbf4barXVO85PsnzxtcrrZT50lXO8KqGStjAPNL+RVu6Og SwTrNxNPOPOpVifcIEboPT2VNs8NzDpqSQ8070fhaYvTCzR+LFn92PGBQojlxCorzCtp BJ7Q== X-Gm-Message-State: AJcUukex0H/EVsJ8HbxZLVW/jp/Hn7XbrkInxd/Ao0mBQBsHuHV4R9lL jb+YrX2iyNj6geSzoXVl6NoBX2xODo8= X-Received: by 2002:a63:2d46:: with SMTP id t67mr3216839pgt.140.1546986751013; Tue, 08 Jan 2019 14:32:31 -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.28 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 08 Jan 2019 14:32:30 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Date: Wed, 9 Jan 2019 08:31:19 +1000 Message-Id: <20190108223129.5570-22-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::541 Subject: [Qemu-devel] [PATCH v3 21/31] target/arm: Add aa64_va_parameters_both 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 will want to check TBI for I and D simultaneously. Signed-off-by: Richard Henderson --- target/arm/internals.h | 15 ++++++++++++--- target/arm/helper.c | 10 ++++++++-- 2 files changed, 20 insertions(+), 5 deletions(-) -- 2.17.2 Reviewed-by: Peter Maydell diff --git a/target/arm/internals.h b/target/arm/internals.h index 82cf685695..acd99b579c 100644 --- a/target/arm/internals.h +++ b/target/arm/internals.h @@ -957,9 +957,9 @@ typedef struct ARMVAParameters { } ARMVAParameters; #ifdef CONFIG_USER_ONLY -static inline ARMVAParameters aa64_va_parameters(CPUARMState *env, - uint64_t va, - ARMMMUIdx mmu_idx, bool data) +static inline ARMVAParameters aa64_va_parameters_both(CPUARMState *env, + uint64_t va, + ARMMMUIdx mmu_idx) { return (ARMVAParameters) { /* 48-bit address space */ @@ -968,7 +968,16 @@ static inline ARMVAParameters aa64_va_parameters(CPUARMState *env, .tbi = false, }; } + +static inline ARMVAParameters aa64_va_parameters(CPUARMState *env, + uint64_t va, + ARMMMUIdx mmu_idx, bool data) +{ + return aa64_va_parameters_both(env, va, mmu_idx); +} #else +ARMVAParameters aa64_va_parameters_both(CPUARMState *env, uint64_t va, + ARMMMUIdx mmu_idx); ARMVAParameters aa64_va_parameters(CPUARMState *env, uint64_t va, ARMMMUIdx mmu_idx, bool data); #endif diff --git a/target/arm/helper.c b/target/arm/helper.c index f4538c9f82..28322ae109 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; } -ARMVAParameters aa64_va_parameters(CPUARMState *env, uint64_t va, - ARMMMUIdx mmu_idx, bool data) +ARMVAParameters aa64_va_parameters_both(CPUARMState *env, uint64_t va, + ARMMMUIdx mmu_idx) { uint64_t tcr = regime_tcr(env, mmu_idx)->raw_tcr; uint32_t el = regime_el(env, mmu_idx); @@ -9799,6 +9799,12 @@ ARMVAParameters aa64_va_parameters(CPUARMState *env, uint64_t va, }; } +ARMVAParameters aa64_va_parameters(CPUARMState *env, uint64_t va, + ARMMMUIdx mmu_idx, bool data) +{ + return aa64_va_parameters_both(env, va, mmu_idx); +} + static ARMVAParameters aa32_va_parameters(CPUARMState *env, uint32_t va, ARMMMUIdx mmu_idx) {