From patchwork Tue Jun 2 09:01:58 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Fedorov X-Patchwork-Id: 479347 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id A270F1412E5 for ; Tue, 2 Jun 2015 19:02:45 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=uaofQ5ZU; dkim-atps=neutral Received: from localhost ([::1]:56853 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yzi5r-0007Py-SR for incoming@patchwork.ozlabs.org; Tue, 02 Jun 2015 05:02:43 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45300) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yzi5M-0006br-BW for qemu-devel@nongnu.org; Tue, 02 Jun 2015 05:02:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yzi5G-0006GY-TP for qemu-devel@nongnu.org; Tue, 02 Jun 2015 05:02:12 -0400 Received: from mail-la0-x235.google.com ([2a00:1450:4010:c03::235]:32825) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yzi5G-0006GL-H5 for qemu-devel@nongnu.org; Tue, 02 Jun 2015 05:02:06 -0400 Received: by labpy14 with SMTP id py14so108569653lab.0 for ; Tue, 02 Jun 2015 02:02:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=vmon11fNNPjOSMINHVD7H3qxtCwFB+MIVIP27k2Zlp0=; b=uaofQ5ZU1CVWVUPHv9nUFEo020urW7GySWq3s8Nyshz99FiR+qrANdWDBld9GDIIVJ AhejMiI/arQTou8OtAET0w/822ScG+xbTqs1ABWzLtzKNyyzaZ0awQhAMzLJiLQ5Hn1G GoRDfhj6SM/oB/dz+ZQ9TrgzZNT7j6pBXB/d6j1FvdQserEu+iXPKIEJKGN9ocznqaox CnmPcRL2OBhkNyFhg9g7D8SQpt/yxWBREOgXs0Y62tRHCFDJ74BZbaJDepVBdNIZSZiI kp7qo7V38szqeA6/6mlxiQTfuOU+miAlgKbXZkX/zT8wbLfkwVVhKW3+9SKuLpSRHdYE Flvw== X-Received: by 10.112.185.100 with SMTP id fb4mr25303657lbc.79.1433235725754; Tue, 02 Jun 2015 02:02:05 -0700 (PDT) Received: from sfedorov-laptop.smware.local ([213.243.91.10]) by mx.google.com with ESMTPSA id ap8sm1469087lac.4.2015.06.02.02.02.04 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 02 Jun 2015 02:02:04 -0700 (PDT) From: Sergey Fedorov To: qemu-devel@nongnu.org Date: Tue, 2 Jun 2015 12:01:58 +0300 Message-Id: <1433235718-30485-1-git-send-email-serge.fdrv@gmail.com> X-Mailer: git-send-email 1.9.1 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4010:c03::235 Cc: Peter Maydell , Sergey Fedorov Subject: [Qemu-devel] [PATCH v3] target-arm: use extended address bits from supersection short descriptor 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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Since ARMv7 with LPAE support, a supersection short translation table descriptor has had extended base address fields which hold bits 39:32 of translated address. These fields are IMPDEF in ARMv6 and ARMv7 without LPAE support. Signed-off-by: Sergey Fedorov --- v3: * needless parenthesis removed v2: * commit message enhanced target-arm/helper.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/target-arm/helper.c b/target-arm/helper.c index 1cc4993..b2b377a 100644 --- a/target-arm/helper.c +++ b/target-arm/helper.c @@ -5323,6 +5323,8 @@ static int get_phys_addr_v6(CPUARMState *env, uint32_t address, int access_type, if (desc & (1 << 18)) { /* Supersection. */ phys_addr = (desc & 0xff000000) | (address & 0x00ffffff); + phys_addr |= (uint64_t)extract32(desc, 20, 4) << 32; + phys_addr |= (uint64_t)extract32(desc, 5, 4) << 36; *page_size = 0x1000000; } else { /* Section. */