All of lore.kernel.org
 help / color / mirror / Atom feed
From: Samuel Thibault <samuel.thibault@gnu.org>
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")
Date: Mon, 7 Sep 2026 13:41:11 +0200	[thread overview]
Message-ID: <ap6i1z057uqnYo6g@end> (raw)
In-Reply-To: <20260829175047.2710519-1-samuel.thibault@ens-lyon.org>

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 <samuel.thibault@ens-lyon.org>
> ---
>  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


      reply	other threads:[~2026-09-07 11:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-29 17:50 [PATCH] Revert 9696846600ca ("multiboot: Prevent loading of x86_64 images") Samuel Thibault
2026-09-07 11:41 ` Samuel Thibault [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ap6i1z057uqnYo6g@end \
    --to=samuel.thibault@gnu.org \
    --cc=adam@os.inf.tu-dresden.de \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.