From patchwork Fri May 27 10:23:10 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peng Fan X-Patchwork-Id: 9138063 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 AE5AB60467 for ; Fri, 27 May 2016 10:26:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9FE112793B for ; Fri, 27 May 2016 10:26:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 948E228093; Fri, 27 May 2016 10:26:25 +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 243CB2793B for ; Fri, 27 May 2016 10:26:24 +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 1b6Ew9-0000N0-Ks; Fri, 27 May 2016 10:24:13 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b6Ew8-0000Ms-1G for xen-devel@lists.xen.org; Fri, 27 May 2016 10:24:12 +0000 Received: from [85.158.139.211] by server-10.bemta-5.messagelabs.com id CE/1E-17018-B4028475; Fri, 27 May 2016 10:24:11 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFuplkeJIrShJLcpLzFFi42K5GHrgkK6Xgke 4wZJ1GhZLPi5mcWD0OLr7N1MAYxRrZl5SfkUCa8b9bVNYCk5zVLy6fYK9gXEFexcjF4eQwCRG iRkbusAcFoFLLBKtW1YzgjgSAu9YJB4fu8PaxcgJ5MRIXN7/jw3CrpKYt3g3E4gtJKAiMXdTD yOE3c0ksX6zCYjNJqAmceT9TLC4iIChxO7Ti8DmMAsYS1zctZ0FxBYWsJT48OQ72BwWAVWJ08 cmgtXzCrhKnLx6jBlil5zElPvtTBMY+RYwMqxiVC9OLSpLLdI11UsqykzPKMlNzMzRNTQw1ct NLS5OTE/NSUwq1kvOz93ECAwUBiDYwfil3/kQoyQHk5Iob6yBe7gQX1J+SmVGYnFGfFFpTmrx IUYZDg4lCV4NeY9wIcGi1PTUirTMHGDIwqQlOHiURHj9QdK8xQWJucWZ6RCpU4zGHFt+X1vLx LFt6r21TEIsefl5qVLivE/lgEoFQEozSvPgBsFi6RKjrJQwLyPQaUI8BalFuZklqPKvGMU5GJ WEeb+DTOHJzCuB2/cK6BQmoFMWsICdUpKIkJJqYIyc6W03Vc/Ad/k9HSaeG3WM6UuWT8hhXv9 Zdi4v4/Hbe96yvV2+uexnfLTQkzaZ6Zu+t1e2t5/Ka5EsYL/cq7XJP+CzgdS2zw6inzPrPQ1X axaXVYl+birpmT/VUmhj6yP5p/91FheGZuV/dDcTFlufc2vHzlNmIdmZ7BZZbAWKn/yE7mWVK bEUZyQaajEXFScCAJmwgnegAgAA X-Env-Sender: van.freenix@gmail.com X-Msg-Ref: server-7.tower-206.messagelabs.com!1464344649!41730716!1 X-Originating-IP: [209.85.192.194] X-SpamReason: No, hits=0.0 required=7.0 tests=UPPERCASE_25_50 X-StarScan-Received: X-StarScan-Version: 8.34; banners=-,-,- X-VirusChecked: Checked Received: (qmail 3748 invoked from network); 27 May 2016 10:24:10 -0000 Received: from mail-pf0-f194.google.com (HELO mail-pf0-f194.google.com) (209.85.192.194) by server-7.tower-206.messagelabs.com with AES128-GCM-SHA256 encrypted SMTP; 27 May 2016 10:24:10 -0000 Received: by mail-pf0-f194.google.com with SMTP id g132so5473954pfb.3 for ; Fri, 27 May 2016 03:24:10 -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=7RIPqXhLEKTjo7/IYtvFXgp9gg9eFGiDPMV/fQ8doaY=; b=h+Ozoh9fipuK32/kCx2KMDAVtvYFkKKs0An311Nn5BBuWIxuBYlWyAhz5Ui2k2hnGE rRqD+mFqJ3na78N5I84rZ9BnUiHwGOrqfYgEuvyE/9z8aoFH7weodXce/f+vSZxbw/8N 85cZXD98esuOs3A4Tdm71dPcNCGtDtwAmfZjR2adHUuTG9PKJsH0c4DPVXSlftwkK7+K HsjYjBA2IirjyrBEZzEmA5NRa5OVK49LNNLTiaLR9RLALuxX9N2pRG1/ZdYUns1+R1bH DeokjLyxr32FAiv22fbnpyelERso7lFG2bPddWOvKyKUjcBv12B86gjbc9DE+4HuG6Do BW4w== 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=7RIPqXhLEKTjo7/IYtvFXgp9gg9eFGiDPMV/fQ8doaY=; b=BbnIUufnnKv6K8KKj4VjimA8EGKEdXMC0yOYdpt1tb00SvCoEeXxuhMofmJOgaZDW6 LsQfTDcd4vYPF5+1CCx1BpxRduN+t6V/I4k5XCPssFUqGcamT+w1dqcRFbB1sT4fqj1K M8LHbW3Op7lSWgTKDJ8OjA1DQ1ru5xhwvtfSfZnfdZBspP6ik20ub42VoeWnIX8NTFgo eqVBzPVc2iqOkVY8dGDwBMysjJmXjoDmgfsMIP73jXOpEKqpv6T+yZplTOgm6rm20Qhm H3issnV9esapoStuOnI0s2vog2de5IcqpRQvOlBIDoPSg/990FUer88yP09fmG0mxWL7 K7sg== X-Gm-Message-State: ALyK8tKOvMvFP8/tm94WI7pbmmgngYUaF8TH7Wy5MzB8eaLh8d61RAoo+hohE2Qr7++ZwQ== X-Received: by 10.98.55.129 with SMTP id e123mr1570456pfa.145.1464344649180; Fri, 27 May 2016 03:24:09 -0700 (PDT) Received: from linux-7smt.suse (gate-zmy3.freescale.com. [192.88.167.1]) by smtp.gmail.com with ESMTPSA id s131sm8705502pfs.45.2016.05.27.03.24.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 27 May 2016 03:24:08 -0700 (PDT) From: Peng Fan To: julien.grall@arm.com, sstabellini@kernel.org Date: Fri, 27 May 2016 18:23:10 +0800 Message-Id: <1464344590-12093-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] xen/arm64: config: correct 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 To ARM64, we should use '(VMAP_VIRT_START + GB(1))' as VMAP_VIRT_END, but not '(VMAP_VIRT_START + GB(1) - 1)'. Seeing 'vm_end[type] = PFN_DOWN(end - start);' in vm_init_type, if not correct VMAP_VIRT_END, one page is wasted. Signed-off-by: Peng Fan Cc: Julien Grall Cc: Stefano Stabellini --- I found X86 use '(VMAP_VIRT_START + GB(64))' and ARM32 use XENHEAP_VIRT_START, both are aligned address. So, I think ARM64 may also need to use aligned address. I am not very sure (: 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)