Received: from list by lists.gnu.org with archive (Exim 4.71) id 1X2G1N-0005TH-UB for mharc-grub-devel@gnu.org; Wed, 02 Jul 2014 04:36:05 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36814) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X2G1D-0005ME-FZ for grub-devel@gnu.org; Wed, 02 Jul 2014 04:36:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X2G17-0004tA-Mt for grub-devel@gnu.org; Wed, 02 Jul 2014 04:35:55 -0400 Received: from mail.emea.novell.com ([130.57.118.101]:38139) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X2G17-0004s8-F5 for grub-devel@gnu.org; Wed, 02 Jul 2014 04:35:49 -0400 Received: from EMEA1-MTA by mail.emea.novell.com with Novell_GroupWise; Wed, 02 Jul 2014 09:35:39 +0100 Message-Id: <53B3E079020000780001F56C@mail.emea.novell.com> X-Mailer: Novell GroupWise Internet Agent 14.0.0 Date: Wed, 02 Jul 2014 09:35:37 +0100 From: "Jan Beulich" To: "Phillip Susi" Subject: Re: [Xen-devel] Loading a 32 bit kernel from 64 bit grub-xen References: <53B2DC70.1040109@ubuntu.com> <20140701201814.6234200d@opensuse.site> <53B2FDAE.7030506@ubuntu.com> In-Reply-To: <53B2FDAE.7030506@ubuntu.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 130.57.118.101 Cc: Andrey Borzenkov , The development of GNU GRUB , Daniel Kiper , 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: Wed, 02 Jul 2014 08:36:01 -0000 >>> On 01.07.14 at 20:27, wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 >=20 > On 7/1/2014 12:18 PM, Andrey Borzenkov wrote: >> =D0=92 Tue, 01 Jul 2014 12:06:08 -0400 Phillip Susi = >> =D0=BF=D0=B8=D1=88=D0=B5=D1=82: >>=20 >>> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 >>=20 >>> I have been trying to fix grub to load a 32 bit kernel from the >>> 64 bit xen build. After fixing up one or two minor issues with >>> the elf loader, I believe I now have it to the point where it >>> jumps correctly to the 32 bit kernel and it crashes there, since >>> it is 32 bit code still executing on a cpu in 64 bit mode. The >>> question is how to return the cpu to 32 bit mode *under xen*? >>=20 >>=20 >> IIRC it was already discussed not long ago and it seems to be Xen=20 >> limitation. You probably need to ask on xen-devel to be sure. >>=20 >> Is it not more simple to use 32 bit grub with 32 bit kernel to >> start with? >=20 > The problem with that is that you have to know in advance which kernel > you are going to boot. That makes configuring virtual hosts harder; > they just want one grub image they can use to chainload whatever the > guest wants to install in their domain. >=20 > Also there must be a way to do this otherwise a 64 bit kernel running > under xen wouldn=27t be able to execute a 32 bit binary. I suppose = I=27ll > Cc xen-devel. Perhaps there=27s some confusion about what =22kernel=22 here means: The thing that=27s the kernel from GrUB=27s perspective is the hypervisor, i.e. xen.gz or xen.efi. While the former expects to be entered in 32-bit mode, on the Xen side we all agree that this isn=27t the way things should work under UEFI; Daniel already proposed how to handle this case (Xen should be entered in 64-bit mode, with ExitBootServices() not having got called yet). The thing that you=27d traditionally call kernel (e.g. Linux) can be 32- or 64-bit irrespective of GrUB=27s bitness: Xen knows how to load either (both for Dom0 and, likely irrelevant here, DomU). Jan