qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Thomas Huth <thuth@redhat.com>,
	qemu-devel@nongnu.org, Eduardo Habkost <eduardo@habkost.net>
Cc: "Philippe Mathieu-Daudé" <philmd@linaro.org>,
	"Marcel Apfelbaum" <marcel.apfelbaum@gmail.com>,
	"Yanan Wang" <wangyanan55@huawei.com>,
	"Daniel P . Berrangé" <berrange@redhat.com>
Subject: Re: [RFC PATCH 0/3] Deprecate the qemu-system-i386 binary
Date: Thu, 27 Apr 2023 10:25:58 +0200	[thread overview]
Message-ID: <7528672e-9b12-84db-dd83-7addf987d49c@redhat.com> (raw)
In-Reply-To: <f0c9cd0b-d1f4-4fb8-1f47-6506a09a56e0@redhat.com>

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	other threads:[~2023-04-27  8:27 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-25 13:38 [RFC PATCH 0/3] Deprecate the qemu-system-i386 binary Thomas Huth
2023-04-25 13:38 ` [RFC PATCH 1/3] cpu: Add a way to detect 32-bit mode from argv0 Thomas Huth
2023-04-25 13:38 ` [RFC PATCH 2/3] target/i386/cpu: Allow to limit the 64-bit binary to 32-bit mode only Thomas Huth
2023-04-25 13:38 ` [RFC PATCH 3/3] docs/about/deprecated: Deprecate the qemu-system-i386 binary Thomas Huth
2023-10-06  9:38   ` Philippe Mathieu-Daudé
2023-04-26 10:59 ` [RFC PATCH 0/3] " Paolo Bonzini
2023-04-27  8:13   ` Thomas Huth
2023-04-27  8:25     ` Paolo Bonzini [this message]
2023-04-27  8:28   ` Daniel P. Berrangé
2023-04-27  8:31     ` Paolo Bonzini
2023-04-27  8:33       ` Daniel P. Berrangé
2023-04-27  9:06         ` Paolo Bonzini
2023-04-27 12:12         ` Thomas Huth
2023-04-27 12:22           ` Daniel P. Berrangé
2024-06-19 10:09   ` Philippe Mathieu-Daudé

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=7528672e-9b12-84db-dd83-7addf987d49c@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=berrange@redhat.com \
    --cc=eduardo@habkost.net \
    --cc=marcel.apfelbaum@gmail.com \
    --cc=philmd@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=thuth@redhat.com \
    --cc=wangyanan55@huawei.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).