From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E0A91C982D7 for ; Sat, 19 Sep 2026 14:46:37 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1x7wK1-00058x-45; Sat, 19 Sep 2026 10:45:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1x7wJz-00058a-KM for qemu-devel@nongnu.org; Sat, 19 Sep 2026 10:45:43 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1x7wJy-0003ZK-0k; Sat, 19 Sep 2026 10:45:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=In-Reply-To:MIME-Version:References:Subject:To:From: Date; bh=Ww7R8NXMZC+dWif6yWjtoLDKcU7fAjli3/Jr1Ieb2dw=; b=qKGVGJOfL5R53UyPK1Wj /MHZnl4d9NirXrjxKEmljW94m33iguidibmc3oV/2O7BLjf8Sbsj2FA61aPvmj0Ea0RVaEeBVJQOI Oe7KWSOGruJv3TaeOo49NVyEFIfznUxkeG3AMfnFD6yvXmQGQaJrknC9vlauSJNFvzT+i3UMkx4SJ hNCRb4KuW0VQAGliG6AdjVkVeBpY1SZAUwp5HvtGkro5I+IMxPk3ysg0rUdZT9HjlCt9gf7ILsmII b1/gLeu1TUv+rawCV64n8QVpchdE8HJKPcNRuOzxWpI7t1jIVe9aaueRyR2Ck0lgPJpBqyuphICQ3 wqZZ/kTN694AWQ==; Date: Sat, 19 Sep 2026 16:45:38 +0200 From: Samuel Thibault To: qemu-devel@nongnu.org, adam@os.inf.tu-dresden.de, pbonzini@redhat.com, richard.henderson@linaro.org, mst@redhat.com Subject: Re: [PATCH] Revert 9696846600ca ("multiboot: Prevent loading of x86_64 images") Message-ID: References: <20260829175047.2710519-1-samuel.thibault@ens-lyon.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Organization: I am not organized X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Hello, I am still waiting for feedback on this. With regards, Samuel Samuel Thibault, le lun. 14 sept. 2026 01:25:30 +0200, a ecrit: > Hello, > > Any opinion on this? > > With regards, > Samuel > > Samuel Thibault, le lun. 07 sept. 2026 13:41:11 +0200, a ecrit: > > Hello, > > > > Ping on this? > > > > With regards, > > Samuel > > > > Samuel Thibault, le sam. 29 août 2026 19:50:47 +0200, a ecrit: > > > Loading x86_64 images in multiboot was disabled on the ground that since > > > multiboot actually boots 64bit kernels in 32bit mode, the binary would > > > have to be 32bit. > > > > > > https://lists.gnu.org/archive/html/qemu-devel/2010-08/msg00913.html > > > > > > But making the binary 32bit makes using debugging tools such as gdb > > > unnecessarily complex since they don't understand what architecture the > > > kernel actually is. Letting qemu load x86_64 images and boot them in 32bit > > > mode is completely fine, works, and is what the multiboot standard actually > > > expects. > > > > > > This notably fixes loading gnumach in x86_64 mode. > > > > > > Signed-off-by: Samuel Thibault > > > --- > > > hw/i386/multiboot.c | 5 ----- > > > 1 file changed, 5 deletions(-) > > > > > > diff --git a/hw/i386/multiboot.c b/hw/i386/multiboot.c > > > index d544b62afb..004d5185fb 100644 > > > --- a/hw/i386/multiboot.c > > > +++ b/hw/i386/multiboot.c > > > @@ -196,11 +196,6 @@ int load_multiboot(X86MachineState *x86ms, > > > int kernel_size; > > > fclose(f); > > > > > > - if (((struct elf64_hdr*)header)->e_machine == EM_X86_64) { > > > - error_report("Cannot load x86-64 image, give a 32bit one."); > > > - exit(1); > > > - } > > > - > > > kernel_size = load_elf(kernel_filename, NULL, NULL, NULL, &elf_entry, > > > &elf_low, &elf_high, NULL, > > > ELFDATA2LSB, I386_ELF_MACHINE, 0, 0); > > > -- > > > 2.53.0