From patchwork Mon Aug 14 10:21:23 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?SsO8cmdlbiBHcm/Dnw==?= X-Patchwork-Id: 9898493 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 E836D60230 for ; Mon, 14 Aug 2017 10:23:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D207E2853E for ; Mon, 14 Aug 2017 10:23:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C4A332859E; Mon, 14 Aug 2017 10:23:55 +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.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED 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 322572853E for ; Mon, 14 Aug 2017 10:23:54 +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 1dhCUy-00028b-ID; Mon, 14 Aug 2017 10:21:28 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dhCUx-00028V-SS for xen-devel@lists.xenproject.org; Mon, 14 Aug 2017 10:21:27 +0000 Received: from [85.158.143.35] by server-4.bemta-6.messagelabs.com id FF/7F-02962-7A971995; Mon, 14 Aug 2017 10:21:27 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrILMWRWlGSWpSXmKPExsVyuP0Ov+6yyom RBtd/Klh83zKZyYHR4/CHKywBjFGsmXlJ+RUJrBmr7r1gKljAW7F7WiNTA2MTdxcjJ4eEgJHE 24n/mLoYuTiEBBYySlz/d5AZJMEmoCqx4fopVhBbREBJ4t6qyWBFzAKPGSWad+9hBEkIC0RIz Jw/kwXEZgFqWDvzB1icV8BE4tzi6ewQG+QlOg5MZpnAyLmAkWEVo0ZxalFZapGusbFeUlFmek ZJbmJmjq6hgZlebmpxcWJ6ak5iUrFecn7uJkagxxiAYAfjzvWBhxglOZiURHkTfHojhfiS8lM qMxKLM+KLSnNSiw8xynBwKEnwOlZMjBQSLEpNT61Iy8wBhg5MWoKDR0mE93I5UJq3uCAxtzgz HSJ1itGYY8Pq9V+YOF5N+P+NSYglLz8vVUqcNwxkkgBIaUZpHtwgWEhfYpSVEuZlBDpNiKcgt Sg3swRV/hWjOAejkjDvY5ApPJl5JXD7XgGdwgR0Sh/IF7zFJYkIKakGxkUTX+yo0HvrsnDOXs dP6i80FMNfVCfeO/5gy2/bBf+f3j/EWhm20ElpulOYykojj0P3gt/PX7n86fSSqLN10vM3m5y L+6TkG2M/sWFzvZ3upK9XHhQ9DG/LmVot+/2OjNSP52kNXxr63t68laL8wefE81WJLG5f/27q nBZqPjVpeWt48dOlWaZKLMUZiYZazEXFiQBGIH8/ZAIAAA== X-Env-Sender: jgross@suse.com X-Msg-Ref: server-12.tower-21.messagelabs.com!1502706086!77791476!1 X-Originating-IP: [195.135.220.15] X-SpamReason: No, hits=0.5 required=7.0 tests=BODY_RANDOM_LONG X-StarScan-Received: X-StarScan-Version: 9.4.45; banners=-,-,- X-VirusChecked: Checked Received: (qmail 14603 invoked from network); 14 Aug 2017 10:21:26 -0000 Received: from mx2.suse.de (HELO mx1.suse.de) (195.135.220.15) by server-12.tower-21.messagelabs.com with DHE-RSA-CAMELLIA256-SHA encrypted SMTP; 14 Aug 2017 10:21:26 -0000 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id CC106AAB9; Mon, 14 Aug 2017 10:21:25 +0000 (UTC) From: Juergen Gross To: xen-devel@lists.xenproject.org Date: Mon, 14 Aug 2017 12:21:23 +0200 Message-Id: <20170814102123.15337-1-jgross@suse.com> X-Mailer: git-send-email 2.12.3 Cc: Juergen Gross , sstabellini@kernel.org, wei.liu2@citrix.com, George.Dunlap@eu.citrix.com, andrew.cooper3@citrix.com, ian.jackson@eu.citrix.com, tim@xen.org, jbeulich@suse.com Subject: [Xen-devel] [PATCH] include/public: add new elf note for support of huge physical addresses 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 Current pv guests will only see physical addresses up to 46 bits wide. In order to be able to run on a host supporting 5 level paging and to make use of any possible memory page there, physical addresses with up to 52 bits have to be supported. As Xen needs to know whether a pv guest can handle such large addresses the kernel of the guest has to advertise this capability. Add a new ELF note for the maximum physical address the kernel can make use of. Please note that it is not required for a pv guest to support 5 level paging in order to use high physical addresses. Signed-off-by: Juergen Gross --- As I'd like to add support for large physical addresses in pv guests rather sooner than later to the Linux kernel, I'm suggesting this public interface change way before any 5 level paging support is added to Xen. --- xen/include/public/elfnote.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/xen/include/public/elfnote.h b/xen/include/public/elfnote.h index 936aa65822..8d76437f19 100644 --- a/xen/include/public/elfnote.h +++ b/xen/include/public/elfnote.h @@ -212,9 +212,18 @@ #define XEN_ELFNOTE_PHYS32_ENTRY 18 /* + * Maximum physical address size the kernel can handle. + * + * All memory of the PV guest must be allocated below this boundary, + * as the guest kernel can't handle page table entries with MFNs referring + * to memory above this value. + */ +#define XEN_ELFNOTE_MAXPHYS_SIZE 19 + +/* * The number of the highest elfnote defined. */ -#define XEN_ELFNOTE_MAX XEN_ELFNOTE_PHYS32_ENTRY +#define XEN_ELFNOTE_MAX XEN_ELFNOTE_MAXPHYS_SIZE /* * System information exported through crash notes.