qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RFC PATCH 0/3] Deprecate the qemu-system-i386 binary


From: Paolo Bonzini
Subject: Re: [RFC PATCH 0/3] Deprecate the qemu-system-i386 binary
Date: Thu, 27 Apr 2023 10:25:58 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.1

On 4/27/23 10:13, Thomas Huth wrote:
On 26/04/2023 12.59, Paolo Bonzini wrote:
On 4/25/23 15:38, Thomas Huth wrote:
- CPU types have different suffixes between the -x86_64 and -i386
   variant (see TYPE_X86_CPU in cpu-qom.h) ... do we need to care
   about this in the new qemu-system-i386 symlink run mode?

- The code in target/i386/tcg/sysemu/smm_helper.c looks like it
   maybe needs a runtime switch, too ... or is it ok to leave this
   hard-coded to the x86_64 version?

Yes, it would have to switch based on the CPU's LM feature.

Ok. BTW, what happens if you run qemu-system-x86_64 with -cpu lm=off today? Isn't that a problem already?

Nothing special---I was thinking of migration compatibility from old savefiles created with qemu-system-i386, but using LM would break compatibility from old savefiles created with qemu-system-x86_64 and 32-bit CPU models.

A better way to go would be to have a separate property than LM (e.g. 64bit-smm-format=on|off), and add a "-global" based on -i386 vs. -x86_64.

Anyway, I'd like to get some feedback on this idea here... What
do you think of the idea of getting rid of the qemu-system-i386
binary this way in the future?

I wonder if we should take this a step further and rename qemu-system-x86_64 to qemu-system-x86!  Distros can if they wish create symlinks to both qemu-system-i386 and qemu-system-x86_64.

Then we would name the CPUs "foo-x86" and alias them to foo-x86_64 and, if they don't have LM set, to foo-i386 as well.

I like the idea! ... we could maybe even go a step further and change the default machine to "q35" in the -x86 binary (or use no default machine at all), and switch back to "pc" as default if running in -x86_64 or -i386 mode...

That's a clever way to move away from the "-M pc" default, indeed.

(BTW, on the user-mode emulation side qemu-i386 and qemu-x86_64 identify the ABI, so the binaries cannot be unified. Still, it would be beneficial to make qemu-i386 use the x86_64 emulation code, because right now QEMU user-mode emulation---unlike real hardware---cannot run 32-bit binaries with new CPU models. So the above unification effort would benefit both system and user-mode emulators).

Paolo




reply via email to

[Prev in Thread] Current Thread [Next in Thread]