Received: from list by lists.gnu.org with archive (Exim 4.71) id 1X2Gom-0003RR-Fb for mharc-grub-devel@gnu.org; Wed, 02 Jul 2014 05:27:08 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49317) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X2Gof-0003Ga-9L for grub-devel@gnu.org; Wed, 02 Jul 2014 05:27:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X2GoZ-0005dw-HH for grub-devel@gnu.org; Wed, 02 Jul 2014 05:27:01 -0400 Received: from smtp02.citrix.com ([66.165.176.63]:1057) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X2GoZ-0005dA-4L for grub-devel@gnu.org; Wed, 02 Jul 2014 05:26:55 -0400 X-IronPort-AV: E=Sophos;i="5.01,587,1400025600"; d="scan'208";a="149350066" Received: from accessns.citrite.net (HELO FTLPEX01CL01.citrite.net) ([10.9.154.239]) by FTLPIPO02.CITRIX.COM with ESMTP; 02 Jul 2014 09:26:42 +0000 Received: from kazak.uk.xensource.com (10.80.2.80) by FTLPEX01CL01.citrite.net (10.13.107.78) with Microsoft SMTP Server id 14.3.181.6; Wed, 2 Jul 2014 05:26:41 -0400 Message-ID: <1404293200.18330.3.camel@kazak.uk.xensource.com> Subject: Re: [Xen-devel] Loading a 32 bit kernel from 64 bit grub-xen From: Ian Campbell To: Phillip Susi Date: Wed, 2 Jul 2014 10:26:40 +0100 In-Reply-To: <53B2FDAE.7030506@ubuntu.com> References: <53B2DC70.1040109@ubuntu.com> <20140701201814.6234200d@opensuse.site> <53B2FDAE.7030506@ubuntu.com> Organization: Citrix Systems, Inc. Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.12.2-1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Originating-IP: [10.80.2.80] X-DLP: MIA1 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 66.165.176.63 Cc: Andrey Borzenkov , The development of GNU GRUB , 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 09:27:07 -0000 On Tue, 2014-07-01 at 14:27 -0400, Phillip Susi wrote: > On 7/1/2014 12:18 PM, Andrey Borzenkov wrote: > > В Tue, 01 Jul 2014 12:06:08 -0400 Phillip Susi > > пишет: > > > >> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 > > > >> 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*? > > > > > > IIRC it was already discussed not long ago and it seems to be Xen > > limitation. You probably need to ask on xen-devel to be sure. > > > > Is it not more simple to use 32 bit grub with 32 bit kernel to > > start with? > > 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. > > Also there must be a way to do this otherwise a 64 bit kernel running > under xen wouldn't be able to execute a 32 bit binary. I suppose I'll > Cc xen-devel. Running a 32-bit userspace under a 64-bit kernel is a very different thing to switching a kernel from 64-bit down to 32-bit (or vice versa). While the former is of course supported just fine the latter is not and IIRC doing so would be very difficult for a PV kernel due to the way the interfaces are constructed (e.g. to p2m entries change size, the maximum addressable machine address changes). Yes, this is a massive Pain In The A**. Ian.