From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1aYuBE-0002Ad-EY for mharc-grub-devel@gnu.org; Thu, 25 Feb 2016 06:34:00 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58226) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aYuB4-0001s2-PW for grub-devel@gnu.org; Thu, 25 Feb 2016 06:33:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aYuB1-0000Cr-AU for grub-devel@gnu.org; Thu, 25 Feb 2016 06:33:50 -0500 Received: from mx2.suse.de ([195.135.220.15]:34164) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aYuB1-0000C2-50 for grub-devel@gnu.org; Thu, 25 Feb 2016 06:33:47 -0500 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 mx2.suse.de (Postfix) with ESMTP id 365A1AC51; Thu, 25 Feb 2016 11:33:45 +0000 (UTC) From: Juergen Gross To: grub-devel@gnu.org Subject: [PATCH v5 00/11] grub-xen: support booting huge pv-domains Date: Thu, 25 Feb 2016 12:33:26 +0100 Message-Id: <1456400017-5789-1-git-send-email-jgross@suse.com> X-Mailer: git-send-email 2.6.2 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] X-Received-From: 195.135.220.15 Cc: Juergen Gross , phcoder@gmail.com, daniel.kiper@oracle.com, mchang@suse.com, xen-devel@lists.xen.org X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Feb 2016 11:33:52 -0000 The Xen hypervisor supports starting a dom0 with large memory (up to the TB range) by not including the initrd and p2m list in the initial kernel mapping. Especially the p2m list can grow larger than the available virtual space in the initial mapping. The started kernel is indicating the support of each feature via elf notes. This series enables grub-xen to do the same as the hypervisor. Tested with: - 32 bit domU (kernel not supporting unmapped initrd) - 32 bit domU (kernel supporting unmapped initrd) - 1 GB 64 bit domU (kernel supporting unmapped initrd, not p2m) - 1 GB 64 bit domU (kernel supporting unmapped initrd and p2m) - 900GB 64 bit domU (kernel supporting unmapped initrd and p2m) Changes in V5: - patch 2: set grub_errno to GRUB_ERR_NONE to avoid false error reports as requested by Daniel Kiper - patch 9: let call grub_xen_alloc_final() all subfunctions unconditionally and let them decide whether they need to do anything as suggested by Daniel Kiper Changes in V4: - split patch 1 into two patches as requested by Daniel Kiper - patch 9 (was 8): rename grub_xen_alloc_end() as requested by Daniel Kiper - patch 10 (was 9): align variables in assembly sources, use separate structure define as requested by Daniel Kiper Changes in V3: - added new patch 1 (free memory in case of error) as requested by Daniel Kiper - added new patch 2 (avoid global variables) as requested by Daniel Kiper - added new patch 3 (use constants for elf notes) as requested by Daniel Kiper - added new patch 4 (sync with new Xen headers) in order to use constants in assembly code - modified patch 9 (was patch 5) to use constants instead of numbers as requested by Daniel Kiper Changes in V2: - rebased patch 5 to current master Juergen Gross (11): xen: make xen loader callable multiple times xen: avoid memleaks on error xen: reduce number of global variables in xen loader xen: add elfnote.h to avoid using numbers instead of constants xen: synchronize xen header xen: factor out p2m list allocation into separate function xen: factor out allocation of special pages into separate function xen: factor out allocation of page tables into separate function xen: add capability to load initrd outside of initial mapping xen: modify page table construction xen: add capability to load p2m list outside of kernel mapping grub-core/lib/i386/xen/relocator.S | 88 ++-- grub-core/lib/x86_64/xen/relocator.S | 135 +++--- grub-core/lib/xen/relocator.c | 28 +- grub-core/loader/i386/xen.c | 781 +++++++++++++++++++++++------------ grub-core/loader/i386/xen_fileXX.c | 45 +- include/grub/i386/memory.h | 7 + include/grub/xen/relocator.h | 6 +- include/grub/xen_file.h | 3 + include/xen/arch-x86/xen-x86_32.h | 22 +- include/xen/arch-x86/xen-x86_64.h | 8 +- include/xen/elfnote.h | 281 +++++++++++++ include/xen/xen.h | 125 ++++-- 12 files changed, 1080 insertions(+), 449 deletions(-) create mode 100644 include/xen/elfnote.h -- 2.6.2