From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1VmSce-00014m-UQ for mharc-grub-devel@gnu.org; Fri, 29 Nov 2013 13:17:00 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46621) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VmScb-00013S-NR for grub-devel@gnu.org; Fri, 29 Nov 2013 13:16:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VmSca-0000SE-K1 for grub-devel@gnu.org; Fri, 29 Nov 2013 13:16:57 -0500 Received: from v6.chiark.greenend.org.uk ([2001:ba8:1e3::]:35931 helo=chiark.greenend.org.uk) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VmSca-0000R8-E7 for grub-devel@gnu.org; Fri, 29 Nov 2013 13:16:56 -0500 Received: from [172.20.153.9] (helo=riva.pelham.vpn.ucam.org) by chiark.greenend.org.uk (Debian Exim 4.72 #1) with esmtps (return-path cjwatson@ubuntu.com) id 1VmScY-0006mH-VB for grub-devel@gnu.org; Fri, 29 Nov 2013 18:16:55 +0000 Received: from ns1.pelham.vpn.ucam.org ([172.20.153.2] helo=riva.ucam.org) by riva.pelham.vpn.ucam.org with esmtps (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1VmScY-0001lQ-4z for grub-devel@gnu.org; Fri, 29 Nov 2013 18:16:54 +0000 Date: Fri, 29 Nov 2013 18:16:52 +0000 From: Colin Watson To: grub-devel@gnu.org Subject: Re: pvgrub2 is merged Message-ID: <20131129181652.GI16321@riva.ucam.org> References: <527EA084.6000706@gmail.com> <20131129132422.GC16321@riva.ucam.org> <20131129214427.02439ae0@opensuse.site> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20131129214427.02439ae0@opensuse.site> User-Agent: Mutt/1.5.21 (2010-09-15) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:ba8:1e3:: 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: Fri, 29 Nov 2013 18:16:58 -0000 On Fri, Nov 29, 2013 at 09:44:27PM +0400, Andrey Borzenkov wrote: > В Fri, 29 Nov 2013 13:24:22 +0000 > Colin Watson пишет: > > On Sat, Nov 09, 2013 at 09:52:20PM +0100, Vladimir 'φ-coder/phcoder' Serbinenko wrote: > > > Hello, all. pvgrub2 has just became part of upstream grub as ports > > > i386-xen and x86_64-xen. > > > > Could anyone offer packaging advice for which ports should be built > > here? Is it reasonable to assume that a 32-bit userspace only needs the > > 32-bit Xen port and a 64-bit userspace only needs the 64-bit Xen port, > > or is it possible that there could be cross-architecture combinations > > here? Does the architecture of the GRUB port have to match the > > architecture of the Xen hypervisor? > > I guess this question is better asked on xen-devel. I'm not subscribed there, and was hoping not to have to start by explaining PV-GRUB2, especially since I don't fully understand it myself yet. :-) > Assuming we have 64 bit dom0 and try to boot 32 bit domU. Is it > possible to start with loading 64 bit grub that loads 32 bit kernel > and jumps to it? If yes (and in other direction too) situation becomes > relatively simple. This is why I want to know exactly what's compatible with what, indeed. I can answer part of the question by code inspection: I see in grub-core/loader/i386/xen.c that the GRUB Xen port can only load Linux kernels that exactly match its own architecture. That means that we have four entities, any of which are potentially 32-bit or 64-bit, and we need to know the full compatibility matrix: dom0 ... can run? ... domU ... can load? ... GRUB ... can load? ... guest kernel I gather that OpenSUSE only supports 64-bit hypervisors? If so then you probably don't care about the first part, but I'd still like to understand it. I would assume that you can't run a 64-bit GRUB on a 32-bit domU because the guest won't have a suitable memory layout, but I don't know for sure. I also assume that if you have a 32-bit hypervisor you can't run anything 64-bit on top of it, but ditto. It would be nice to know why the restriction that GRUB must match the guest kernel exists, and whether this is intrinsic or fixable. -- Colin Watson [cjwatson@ubuntu.com]