From nobody Wed Nov 5 15:59:09 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; dkim=fail spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1496810568472915.5929124057633; Tue, 6 Jun 2017 21:42:48 -0700 (PDT) Received: from localhost ([::1]:41206 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dISnt-0005lI-Es for importer@patchew.org; Wed, 07 Jun 2017 00:42:45 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52467) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dISn9-0005NT-Fa for qemu-devel@nongnu.org; Wed, 07 Jun 2017 00:42:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dISn4-0004Eh-Jv for qemu-devel@nongnu.org; Wed, 07 Jun 2017 00:41:59 -0400 Received: from mail-pf0-x241.google.com ([2607:f8b0:400e:c00::241]:36239) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dISn4-0004DL-DB for qemu-devel@nongnu.org; Wed, 07 Jun 2017 00:41:54 -0400 Received: by mail-pf0-x241.google.com with SMTP id y7so356849pfd.3 for ; Tue, 06 Jun 2017 21:41:52 -0700 (PDT) Received: from localhost.localdomain (76-198-28-160.lightspeed.sntcca.sbcglobal.net. [76.198.28.160]) by smtp.gmail.com with ESMTPSA id e124sm719931pgc.17.2017.06.06.21.41.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 06 Jun 2017 21:41:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=BAJfX8Kwmd4gl0xyXVqjqA36rYHz3/WEsBeWUItYAQ8=; b=srLjx+y+pXCjwid/dvCm+dUBPlsZv5lgOLM68Mbs7YwP8dFH5ziVfumqYSPLG6sw5Z mZFd13bCavseOL09qxvfc3QzAKe8rDcOzo27mR5n0nLw53TARrglDMtTJ5US5E7/ThE6 OfWDrwgaogDJPSWquu+addjyjXH+pZK5iJXUiSWBgAQLkBEMNgtVkXXwywpWRdc8aL7F bJLuqIBaa0A4+FGhDMRTXhlAngOvGg/XnpvgEsfk+bOh3hgFiyDtoqDLS/H3nNSxQ/gW lBWUkRVl9a9HuhK+3vF8Za//Oy+/sby3ZJMQMiX0V+1v+jgkY8raXuzzAL0CUXL2PGLd 7MGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=BAJfX8Kwmd4gl0xyXVqjqA36rYHz3/WEsBeWUItYAQ8=; b=hLlNjte3sKPq5fN5Ie+82aXILLn6U3Ldb7ys0x54xnsxykCKnHfMLaUPTCiVMJ1g3/ E2lEFcVeij0R5E/bNXcOrtD8TGXebXDDgH8ynpxH3hloi1MTZ9wCxhf6+HOG3WaonVJG UzNCCjg7nJYYUr/5ofySeBSm9sLJg6qtU/DyQ6AFTt+7hEFw+qJ8QiaIH8aXCxx7BFjm Sg/106vwTKXkhs+VfEFlcIr21AE6jHxkfjdX5PHUZFxrhVQNvZagleKzwVWIcJ5OFvqL zxY3aVQ+CWwvp8Wix5ZQakjdYYxnDcys36qn3bnhuTJbSJtIFLa59cm1xCeagV4V1Hil 1J+w== X-Gm-Message-State: AODbwcBw5vxSsX8j8tGBR1LYeb8gBTas9lhf5CDSXFuRs3r0oLkXWthp EuVjcNMIS8roZ+Kl5EI= X-Received: by 10.99.127.89 with SMTP id p25mr15773276pgn.120.1496810511365; Tue, 06 Jun 2017 21:41:51 -0700 (PDT) From: Anatol Pomozov To: qemu-devel@nongnu.org Date: Tue, 6 Jun 2017 21:41:48 -0700 Message-Id: <20170607044148.10481-1-anatol.pomozov@gmail.com> X-Mailer: git-send-email 2.13.1 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c00::241 Subject: [Qemu-devel] [PATCH] Remove restriction that prevents bootimg elf64 images X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Anatol Pomozov Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" It is possible to create a 64 bit elf image that has valid multiboot header. qemu should be able to boot such images. Tested with homemade 64bit OS - now it boots fine with 'qemu -kernel' and as a grub image. Signed-off-by: Anatol Pomozov --- hw/i386/multiboot.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/hw/i386/multiboot.c b/hw/i386/multiboot.c index 663f35a658..cf1b4f5fb3 100644 --- a/hw/i386/multiboot.c +++ b/hw/i386/multiboot.c @@ -192,11 +192,6 @@ int load_multiboot(FWCfgState *fw_cfg, int kernel_size; fclose(f); =20 - if (((struct elf64_hdr*)header)->e_machine =3D=3D EM_X86_64) { - fprintf(stderr, "Cannot load x86-64 image, give a 32bit one.\n= "); - exit(1); - } - kernel_size =3D load_elf(kernel_filename, NULL, NULL, &elf_entry, &elf_low, &elf_high, 0, I386_ELF_MACHINE, 0, 0); --=20 2.13.1