From patchwork Wed Jun 1 07:51:06 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peng Fan X-Patchwork-Id: 9146237 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 7927E60757 for ; Wed, 1 Jun 2016 07:54:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6A20325819 for ; Wed, 1 Jun 2016 07:54:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5EF952654B; Wed, 1 Jun 2016 07:54:07 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id EEE9225819 for ; Wed, 1 Jun 2016 07:54:06 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b80wG-0002tQ-47; Wed, 01 Jun 2016 07:51:40 +0000 Received: from mail6.bemta6.messagelabs.com ([85.158.143.247]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b80wE-0002tK-Hy for xen-devel@lists.xen.org; Wed, 01 Jun 2016 07:51:38 +0000 Received: from [85.158.143.35] by server-2.bemta-6.messagelabs.com id D6/7A-06230-9049E475; Wed, 01 Jun 2016 07:51:37 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupjkeJIrShJLcpLzFFi42K5GHrgoC7nFL9 wg63t0hZLPi5mcWD0OLr7N1MAYxRrZl5SfkUCa8aV/XdZCiZwVvTsvsDWwHiXvYuRi0NIYBKj xJZH9xlBHBaBSywSs56vZgFxJATesUjsm3+HuYuRE8iJkWh+8B/KrpL4tv4rO4gtJKAiMXdTD yPEqB4miVVLnjGCJNgE1CSOvJ8JZosIGEpMXvWXFcRmFjCWuLhrOwuILSzgKvHo0A0wm0VAVe LmjA4mEJsXKL565WxWiGVyElPutzNNYORbwMiwilG9OLWoLLVI11AvqSgzPaMkNzEzR9fQwEw vN7W4ODE9NScxqVgvOT93EyMwVBiAYAfjzudOhxglOZiURHlT8/zChfiS8lMqMxKLM+KLSnNS iw8xynBwKEnwvpoElBMsSk1PrUjLzAEGLUxagoNHSYSXbTJQmre4IDG3ODMdInWK0Zhjy+9ra 5k4tk29t5ZJiCUvPy9VSpz3N8gkAZDSjNI8uEGwaLrEKCslzMsIdJoQT0FqUW5mCar8K0ZxDk YlYd4zIFN4MvNK4Pa9AjqFCeiU+AwfkFNKEhFSUg2Mxc4n11QJdU5dlXXjdNcJDx6DU4mvnQ8 m3JB6Ua/x0HT138XyNTuOpJ69tG69XY9KvW/qv+5vWwWe5rE0SFW7W0w8J+6eP2mPzdmYPy2T 7iVPj0p8nJaZwfn/2/wPjPGzZjXH3koU7nE+zv5effLkVfyBju8Mq82+RedFtGhmth8tuX/VT uahEktxRqKhFnNRcSIAbVLmPaECAAA= X-Env-Sender: van.freenix@gmail.com X-Msg-Ref: server-5.tower-21.messagelabs.com!1464767496!16827723!1 X-Originating-IP: [209.85.192.193] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 8.46; banners=-,-,- X-VirusChecked: Checked Received: (qmail 2701 invoked from network); 1 Jun 2016 07:51:37 -0000 Received: from mail-pf0-f193.google.com (HELO mail-pf0-f193.google.com) (209.85.192.193) by server-5.tower-21.messagelabs.com with AES128-GCM-SHA256 encrypted SMTP; 1 Jun 2016 07:51:37 -0000 Received: by mail-pf0-f193.google.com with SMTP id f144so2456427pfa.2 for ; Wed, 01 Jun 2016 00:51:37 -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=ObnRHtBmV7C4HaI8i+A/P4pbGYQB9KNTv+ZJftOo8Aw=; b=PA4PsjFQwnniYCMGA9/tK6dOS09M9V3eU0wVGQ/qTeHPw1n3SQeloxsqE27ft1inDJ wu49q4t+HoN+V12oYfQsHE9/U14fuME7R3tA4X3oHZlKFJzLxM6snA5UXLbavcVESaoh uDWLEadDKYtlEck+lHyAfmhOpM/slUcmGxUCU/p2/OAjC4u+lwnRMVX4CgQeaDGh/1Bh A4KVMpR1X9R7VAzqqk8BUwxNXjNL/+6pApqK3yiBVfuqxa3J7/BlBKeWBL43IvWW/Ymb wrp1UIOxhFNwH1bSbGiHzkPyP2ajM50RTKxrvGDtTe+zUr7SjsMnjdYs1T5qq2mTJqoW T0vQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=ObnRHtBmV7C4HaI8i+A/P4pbGYQB9KNTv+ZJftOo8Aw=; b=f34xQdYe0YnmoDtluppuSHuKfSyEhaKv4jH8FrhhE9GY7CC8UylLjsammAoKnbEc7y G1NmKmHjzXVLb0uVvMr1KlVKtGSPxVJLzYxpMvY74hkvKFbQ7HtmA2OuBLAwdrFSycVQ 1Zt/DwA1z2wa8oeyp7xknHNnE6MTemyAsb0GwR4eA1LtJdHtbUaRM+Jt0upozGXgAPMU dzlWAsKYAcEyBRs1Lm/xRRdMnma06Zdt9X6TRyFm4kkwzMcvAlqNLlvIrHlXDaQOtVQY 8LBBS32ZXRa0ny+69Jvzty8lAzfNUmW8+3C2fe2OoEgIjLrm8tqd3t+L5/BP5BaA3B8J ZqQg== X-Gm-Message-State: ALyK8tLvnoMvHZqYyooTl7hfELp2Iwcod0PVDx3SUTarByOQ2HeSEE3IZZOu05L+2eXDFQ== X-Received: by 10.98.95.197 with SMTP id t188mr5898271pfb.162.1464767492653; Wed, 01 Jun 2016 00:51:32 -0700 (PDT) Received: from linux-7smt.suse (gate-zmy3.freescale.com. [192.88.167.1]) by smtp.gmail.com with ESMTPSA id s124sm45648753pfb.63.2016.06.01.00.51.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 01 Jun 2016 00:51:32 -0700 (PDT) From: Peng Fan To: sstabellini@kernel.org, julien.grall@arm.com Date: Wed, 1 Jun 2016 15:51:06 +0800 Message-Id: <1464767466-29835-1-git-send-email-van.freenix@gmail.com> X-Mailer: git-send-email 2.6.2 Cc: van.freenix@gmail.com, xen-devel@lists.xen.org Subject: [Xen-devel] [PATCH V2] xen/arm64: config: Correctly define VMAP_VIRT_END X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP The vmap initialization code (vm_init_type) will round down the end of the region to a page-aligned address. On ARM64, the default vmap region is located between 1G and 2G. Based on the initialization code, the end address is excluded of the region. Therefore the current definition of VMAP_VIRT_END will lead the vmap code to not use the last 4K of the region. Fix it by defining VMAP_VIRT_END as "VMAP_VIRT_START + GB(1)". Signed-off-by: Peng Fan Cc: Julien Grall Cc: Stefano Stabellini Reviewed-by: Julien Grall --- V2: Take Julien's better commit message. Thanks. xen/include/asm-arm/config.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/include/asm-arm/config.h b/xen/include/asm-arm/config.h index 2d11b62..f92c0a0 100644 --- a/xen/include/asm-arm/config.h +++ b/xen/include/asm-arm/config.h @@ -147,7 +147,7 @@ #define SLOT0_ENTRY_SIZE SLOT0(1) #define VMAP_VIRT_START GB(1) -#define VMAP_VIRT_END (VMAP_VIRT_START + GB(1) - 1) +#define VMAP_VIRT_END (VMAP_VIRT_START + GB(1)) #define FRAMETABLE_VIRT_START GB(32) #define FRAMETABLE_SIZE GB(32)