From patchwork Mon Sep 14 13:53:08 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 53573 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f200.google.com (mail-wi0-f200.google.com [209.85.212.200]) by patches.linaro.org (Postfix) with ESMTPS id 45D082056A for ; Mon, 14 Sep 2015 13:58:57 +0000 (UTC) Received: by wicgb1 with SMTP id gb1sf41679906wic.3 for ; Mon, 14 Sep 2015 06:58:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:date :message-id:in-reply-to:references:subject:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:list-subscribe :errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=rMaSJy2uHxLe4QGXj+YPgOMb2eTo3tqibGdMTpQGq4E=; b=ayLf1EwLMzFY+bIe86Rb5WxXr3+C8lItYJcMeM0KifAB6WYWxZcZuq5UCtnX3VpcyV DFDZJwC+7bbjoLHNwVeLiD0OhFDIJHo9l8RDC+vzRz4ppmhSuwnVBGDIOaFUFC8RQ5cM y2J3IvKKagQLJp66+nrvf5fOaDIkF+JU5xArMJyLWfBboksUSP1xHivxi2WABQuyb+5R K+Im29yjiMKw6gYJM/9TsW+3LUm8C0Ilzunf1i96LO7Tq6qs7HvvFbosSw6K50S+xhLm cy/kzGqTlsIm2NzThLVE3xaFIaexwtPrx7RfFO+S53W3jjwybNq/T+pLwKZ9xILM2FPu 86Fw== X-Gm-Message-State: ALoCoQllge3zItaJ8kCMwv9O8BgiQKFmeMsOkUgDimO99y+0zM5dHLbTDiSsA5ef1zMj5PpUKr49 X-Received: by 10.180.9.104 with SMTP id y8mr2931951wia.7.1442239136617; Mon, 14 Sep 2015 06:58:56 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.4.161 with SMTP id l1ls181787lal.57.gmail; Mon, 14 Sep 2015 06:58:56 -0700 (PDT) X-Received: by 10.112.151.106 with SMTP id up10mr14266887lbb.106.1442239123092; Mon, 14 Sep 2015 06:58:43 -0700 (PDT) Received: from mail-la0-f51.google.com (mail-la0-f51.google.com. [209.85.215.51]) by mx.google.com with ESMTPS id yg10si9794309lbb.122.2015.09.14.06.58.43 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 14 Sep 2015 06:58:43 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.51 as permitted sender) client-ip=209.85.215.51; Received: by lagj9 with SMTP id j9so88467694lag.2 for ; Mon, 14 Sep 2015 06:58:43 -0700 (PDT) X-Received: by 10.112.168.66 with SMTP id zu2mr14104594lbb.29.1442239122978; Mon, 14 Sep 2015 06:58:42 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.59.35 with SMTP id w3csp1215338lbq; Mon, 14 Sep 2015 06:58:41 -0700 (PDT) X-Received: by 10.107.135.17 with SMTP id j17mr24005958iod.101.1442239121642; Mon, 14 Sep 2015 06:58:41 -0700 (PDT) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id 133si9240672iof.152.2015.09.14.06.58.40 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 14 Sep 2015 06:58:41 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Received: from localhost ([::1]:41017 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZbUHH-0004Nv-83 for patch@linaro.org; Mon, 14 Sep 2015 09:58:39 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54631) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZbUC8-0004bX-CF for qemu-devel@nongnu.org; Mon, 14 Sep 2015 09:53:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZbUC7-0000Af-EO for qemu-devel@nongnu.org; Mon, 14 Sep 2015 09:53:20 -0400 Received: from mnementh.archaic.org.uk ([2001:8b0:1d0::1]:35073) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZbUC7-00005c-7j for qemu-devel@nongnu.org; Mon, 14 Sep 2015 09:53:19 -0400 Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.80) (envelope-from ) id 1ZbUC0-0007u8-DS for qemu-devel@nongnu.org; Mon, 14 Sep 2015 14:53:12 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Date: Mon, 14 Sep 2015 14:53:08 +0100 Message-Id: <1442238791-30255-22-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1442238791-30255-1-git-send-email-peter.maydell@linaro.org> References: <1442238791-30255-1-git-send-email-peter.maydell@linaro.org> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:8b0:1d0::1 Subject: [Qemu-devel] [PULL 21/24] target-arm: Suppress EPD for S2, EL2 and EL3 translations X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 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 X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: peter.maydell@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.51 as permitted sender) smtp.mailfrom=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 From: "Edgar E. Iglesias" Stage-2 translations, EL2 and EL3 regimes don't have the EPD control. Signed-off-by: Edgar E. Iglesias Message-id: 1442135278-25281-6-git-send-email-edgar.iglesias@gmail.com Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target-arm/helper.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/target-arm/helper.c b/target-arm/helper.c index 200b9f2..478347b 100644 --- a/target-arm/helper.c +++ b/target-arm/helper.c @@ -6344,7 +6344,7 @@ static bool get_phys_addr_lpae(CPUARMState *env, target_ulong address, /* Read an LPAE long-descriptor translation table. */ MMUFaultType fault_type = translation_fault; uint32_t level = 1; - uint32_t epd; + uint32_t epd = 0; int32_t tsz; uint32_t tg; uint64_t ttbr; @@ -6438,7 +6438,9 @@ static bool get_phys_addr_lpae(CPUARMState *env, target_ulong address, */ if (ttbr_select == 0) { ttbr = regime_ttbr(env, mmu_idx, 0); - epd = extract32(tcr->raw_tcr, 7, 1); + if (el < 2) { + epd = extract32(tcr->raw_tcr, 7, 1); + } tsz = t0sz; tg = extract32(tcr->raw_tcr, 14, 2);