Message ID | 1393437755-23586-8-git-send-email-peter.maydell@linaro.org |
---|---|
State | Accepted |
Commit | c10f7fc3d167799f19d2184f05012b24cc56878d |
Headers | show
Return-Path: <patchwork-forward+bncBC6Z756YVMIBB5XYXCMAKGQE4VUFRQA@linaro.org> X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pd0-f200.google.com (mail-pd0-f200.google.com [209.85.192.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 4762D203C4 for <linaro@patches.linaro.org>; Wed, 26 Feb 2014 19:11:51 +0000 (UTC) Received: by mail-pd0-f200.google.com with SMTP id p10sf3028378pdj.3 for <linaro@patches.linaro.org>; Wed, 26 Feb 2014 11:11:50 -0800 (PST) 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:cc: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=1nidtrI862DZudfqGsZ8674lcaTV/RHsVh7RaZ+swKo=; b=kV3WRsJdnKm5CQW6eT7/WDjenaZ9d7HFc7bQDLyl9TZ+H6Em+ta+1C3eaF+gkB8eVr tXOJOOwb3NXqLjZeaGHBdKG3q9vvsab8n9rLdVSziT3cWc3gmE8ZQh3ZYR5xYZs6Uus1 8WN3r4P9zJnXUZwRT3LYuAG+cJGCDDG6B1lBVqspnflLebNCqx5Y6i5+gwC7KZpI4zU3 ikOdqrlyW87DbN7Seovvd0TQpTSYNJ7iB3VyWYm+r2VeV2tG/dnoimBu1kaSVGyobhvR wSn/VS/0dq8jtNqhMq63j6gF2J+Vvkl4PcPZmCNGPMMhunOCeUGWd5Y0djl+fS6cpQh/ ouLw== X-Gm-Message-State: ALoCoQnY06fmIVVFtt/QBJblzHXcYvqa7kkklprBe2+7euQpAOUNQtZrBBJL2Or1KvX+dbJTT+FJ X-Received: by 10.68.216.230 with SMTP id ot6mr3294922pbc.3.1393441910473; Wed, 26 Feb 2014 11:11:50 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.25.212 with SMTP id 78ls380312qgt.30.gmail; Wed, 26 Feb 2014 11:11:50 -0800 (PST) X-Received: by 10.58.236.234 with SMTP id ux10mr20392vec.60.1393441910264; Wed, 26 Feb 2014 11:11:50 -0800 (PST) Received: from mail-ve0-f174.google.com (mail-ve0-f174.google.com [209.85.128.174]) by mx.google.com with ESMTPS id lz6si482109vcb.31.2014.02.26.11.11.50 for <patchwork-forward@linaro.org> (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 26 Feb 2014 11:11:50 -0800 (PST) Received-SPF: neutral (google.com: 209.85.128.174 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.174; Received: by mail-ve0-f174.google.com with SMTP id oy12so2641750veb.5 for <patchwork-forward@linaro.org>; Wed, 26 Feb 2014 11:11:50 -0800 (PST) X-Received: by 10.58.186.132 with SMTP id fk4mr6985436vec.9.1393441910190; Wed, 26 Feb 2014 11:11:50 -0800 (PST) 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.220.174.196 with SMTP id u4csp48477vcz; Wed, 26 Feb 2014 11:11:49 -0800 (PST) X-Received: by 10.140.26.240 with SMTP id 103mr1650976qgv.92.1393441909495; Wed, 26 Feb 2014 11:11:49 -0800 (PST) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id ca6si494426qcb.8.2014.02.26.11.11.49 for <patch@linaro.org> (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 26 Feb 2014 11:11:49 -0800 (PST) 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]:42314 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <qemu-devel-bounces+patch=linaro.org@nongnu.org>) id 1WIj3C-0001qP-1B for patch@linaro.org; Wed, 26 Feb 2014 13:17:46 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34261) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <pm215@archaic.org.uk>) id 1WIior-000113-20 for qemu-devel@nongnu.org; Wed, 26 Feb 2014 13:03:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <pm215@archaic.org.uk>) id 1WIioq-0007RB-1K for qemu-devel@nongnu.org; Wed, 26 Feb 2014 13:02:56 -0500 Received: from mnementh.archaic.org.uk ([2001:8b0:1d0::1]:46191) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <pm215@archaic.org.uk>) id 1WIiop-0007Eu-Rr for qemu-devel@nongnu.org; Wed, 26 Feb 2014 13:02:55 -0500 Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.80) (envelope-from <pm215@archaic.org.uk>) id 1WIioV-00069K-L7; Wed, 26 Feb 2014 18:02:35 +0000 From: Peter Maydell <peter.maydell@linaro.org> To: Anthony Liguori <aliguori@amazon.com> Date: Wed, 26 Feb 2014 18:01:57 +0000 Message-Id: <1393437755-23586-8-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1393437755-23586-1-git-send-email-peter.maydell@linaro.org> References: <1393437755-23586-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 Cc: Blue Swirl <blauwirbel@gmail.com>, qemu-devel@nongnu.org, Aurelien Jarno <aurelien@aurel32.net> Subject: [Qemu-devel] [PULL 07/45] target-arm: Load correct access bits from ARMv5 level 2 page table descriptors X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: <patchwork-forward.linaro.org> List-Unsubscribe: <http://groups.google.com/a/linaro.org/group/patchwork-forward/subscribe>, <mailto:googlegroups-manage+836684582541+unsubscribe@googlegroups.com> List-Archive: <http://groups.google.com/a/linaro.org/group/patchwork-forward/> List-Post: <http://groups.google.com/a/linaro.org/group/patchwork-forward/post>, <mailto:patchwork-forward@linaro.org> List-Help: <http://support.google.com/a/linaro.org/bin/topic.py?topic=25838>, <mailto:patchwork-forward+help@linaro.org> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=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=neutral (google.com: 209.85.128.174 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=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 |
diff --git a/target-arm/helper.c b/target-arm/helper.c index c993581..b44aa1b 100644 --- a/target-arm/helper.c +++ b/target-arm/helper.c @@ -2798,7 +2798,7 @@ static int get_phys_addr_v5(CPUARMState *env, uint32_t address, int access_type, break; case 2: /* 4k page. */ phys_addr = (desc & 0xfffff000) | (address & 0xfff); - ap = (desc >> (4 + ((address >> 13) & 6))) & 3; + ap = (desc >> (4 + ((address >> 9) & 6))) & 3; *page_size = 0x1000; break; case 3: /* 1k page. */
In ARMv5 level 2 page table descriptors, each 4K or 64K page is split into four subpages, each of which can have different access permission settings, which are specified by four two-bit fields in the l2 descriptor. A long-standing cut-and-paste error meant we were using the wrong bits in the virtual address to select the access-permission field for 4K pages. The error has presumably not been noticed before because most guests don't make use of the ability to set the access permissions differently for each 1K subpage: if the guest gives the whole page the same access permissions it doesn't matter which of the 4 AP fields we select. (The whole issue is irrelevant for ARMv7 CPUs anyway because subpages aren't supported there.) Reported-by: Vivek Rai <Vivek.Rai@emulex.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 1392667690-8731-1-git-send-email-peter.maydell@linaro.org --- target-arm/helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)