From: Zhao Liu <zhao1.liu@intel.com>
To: Ani Sinha <anisinha@redhat.com>
Cc: "Sergio Lopez" <slp@redhat.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Richard Henderson" <richard.henderson@linaro.org>,
"Eduardo Habkost" <eduardo@habkost.net>,
"Michael S. Tsirkin" <mst@redhat.com>,
"Marcel Apfelbaum" <marcel.apfelbaum@gmail.com>,
imammedo@redhat.com, qemu-devel@nongnu.org,
"Daniel P. Berrangé" <berrange@redhat.com>
Subject: Re: [PATCH] hw/i386/cpu: remove default_cpu_version and simplify
Date: Mon, 9 Dec 2024 23:10:27 +0800 [thread overview]
Message-ID: <Z1cIY357gcsE1IgJ@intel.com> (raw)
In-Reply-To: <20241208064810.893451-1-anisinha@redhat.com>
+Daniel,
On Sun, Dec 08, 2024 at 12:18:10PM +0530, Ani Sinha wrote:
> Date: Sun, 8 Dec 2024 12:18:10 +0530
> From: Ani Sinha <anisinha@redhat.com>
> Subject: [PATCH] hw/i386/cpu: remove default_cpu_version and simplify
> X-Mailer: git-send-email 2.45.2
>
> commit 0788a56bd1ae3 ("i386: Make unversioned CPU models be aliases")
> introduced 'default_cpu_version' for PCMachineClass. This created three
> categories of CPU models:
> - Most unversioned CPU models would use version 1 by default.
> - For machines 4.0.1 and older that do not support cpu model aliases, a
> special default_cpu_version value of CPU_VERSION_LEGACY is used.
> - It was thought that future machines would use the latest value of cpu
> versions corresponding to default_cpu_version value of
> CPU_VERSION_LATEST [1].
>
> Unfortunately, all pc machines still use the default cpu version of 1 for
> unversioned cpu models. Only microvms use CPU_VERSION_LATEST.
Hi Ani,
So could we use CPU_VERSION_LATEST for other machines now?
Mapping unversioned cpu models to the latest version sounds like more
user friendly.
Regards,
Zhao
> This change cleans up the complicated logic around default_cpu_version
> including getting rid of default_cpu_version property itself. A couple of new
> flags are introduced, one for the legacy model for machines 4.0.1 and older
> and other for microvms. For older machines, a new pc machine property is
> introduced that separates pc machine versions 4.0.1 and older from the newer
> machines. 4.0.1 and older machines are scheduled to be deleted towards
> end of 2025 since they would be 6 years old by then. At that time, we can
> remove all logic around legacy cpus. Microvms are the only machines that
> continue to use the latest cpu version. If this changes later, we can
> remove all logic around x86_cpu_model_last_version(). Default cpu version
> for unversioned cpu models is hardcoded to the value 1 and applies
> unconditionally for all pc machine types of version 4.1 and above.
>
> This change also removes all complications around CPU_VERSION_AUTO
> including removal of the value itself.
>
> 1) See commit dcafd1ef0af227 ("i386: Register versioned CPU models")
>
> CC: imammedo@redhat.com
> Signed-off-by: Ani Sinha <anisinha@redhat.com>
next prev parent reply other threads:[~2024-12-09 14:52 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-08 6:48 [PATCH] hw/i386/cpu: remove default_cpu_version and simplify Ani Sinha
2024-12-09 15:10 ` Zhao Liu [this message]
2024-12-09 15:38 ` Ani Sinha
2024-12-10 14:43 ` Ani Sinha
2024-12-12 14:05 ` Zhao Liu
2024-12-12 14:50 ` Ani Sinha
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=Z1cIY357gcsE1IgJ@intel.com \
--to=zhao1.liu@intel.com \
--cc=anisinha@redhat.com \
--cc=berrange@redhat.com \
--cc=eduardo@habkost.net \
--cc=imammedo@redhat.com \
--cc=marcel.apfelbaum@gmail.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=slp@redhat.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).