From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:32813) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RuNps-00037p-Qf for qemu-devel@nongnu.org; Mon, 06 Feb 2012 07:38:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RuNpo-00069J-2f for qemu-devel@nongnu.org; Mon, 06 Feb 2012 07:38:20 -0500 Received: from mail-lpp01m010-f45.google.com ([209.85.215.45]:57272) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RuNpn-00069A-RF for qemu-devel@nongnu.org; Mon, 06 Feb 2012 07:38:16 -0500 Received: by lahi5 with SMTP id i5so3415724lah.4 for ; Mon, 06 Feb 2012 04:38:14 -0800 (PST) MIME-Version: 1.0 In-Reply-To: References: Date: Mon, 6 Feb 2012 12:38:14 +0000 Message-ID: From: Stefan Hajnoczi Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] Support for multiboot images in elf64 (EM_X86_64) format List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Goswin von Brederlow Cc: qemu-devel@nongnu.org On Sat, Feb 4, 2012 at 5:38 PM, Goswin von Brederlow wr= ote: > Description: Allow 64bit elf binaries in multiboot format > =A0This patch allows 64bit elf files with multiboot header to be loaded. > =A0The entry point will still be called in 32bit mode and the kernel > =A0must switch to 64bit mode on its own. The image and all modules must > =A0also be located in the lower 2GB of ram. All the restrictions of a > =A032bit image still apply. > Author: Goswin von Brederlow > Last-Updated: 2011-04-08 > --- The multiboot specification is 32-bit only. This patch enables a non-standard 64-bit version of multiboot. Have you checked whether GRUB or other multiboot loaders have equivalent functionality? Have you contacted the multiboot specification authors? > --- qemu-kvm-0.14.0+dfsg.orig/hw/multiboot.c > +++ qemu-kvm-0.14.0+dfsg/hw/multiboot.c > @@ -173,8 +173,7 @@ int load_multiboot(void *fw_cfg, > =A0 =A0 =A0 =A0 fclose(f); > > =A0 =A0 =A0 =A0 if (((struct elf64_hdr*)header)->e_machine =3D=3D EM_X86_= 64) { > - =A0 =A0 =A0 =A0 =A0 =A0fprintf(stderr, "Cannot load x86-64 image, give = a 32bit one.\n"); > - =A0 =A0 =A0 =A0 =A0 =A0exit(1); > + =A0 =A0 =A0 =A0 =A0 mb_debug("qemu: 64bit elf, I hope you know what you= are doing\n"); This is silent by default, but given the nature of 64-bit multiboot support I think this warning should be on by default. Anyone using this really needs to know what they are doing and QEMU should not silently do weird things. Stefan