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
Subject: Re: [PATCH v2] microvm: do not use the lastest cpu version
Date: Thu, 20 Feb 2025 15:25:58 +0800 [thread overview]
Message-ID: <Z7bZBsqO6MxhFKVp@intel.com> (raw)
In-Reply-To: <20250220065326.312596-1-anisinha@redhat.com>
On Thu, Feb 20, 2025 at 12:23:26PM +0530, Ani Sinha wrote:
> Date: Thu, 20 Feb 2025 12:23:26 +0530
> From: Ani Sinha <anisinha@redhat.com>
> Subject: [PATCH v2] microvm: do not use the lastest cpu version
> 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].
>
> All pc machines still use the default cpu version of 1 for
> unversioned cpu models. CPU_VERSION_LATEST is a moving target and
> changes with time. Therefore, if machines use CPU_VERSION_LATEST, it would
> mean that over a period of time, for the same versioned machine type,
> the cpu version would be different depending on what the latest was at that
> time. This would break guests even when they use a constant specific
> versioned machine type.
> Additionally, microvm machines are not versioned anyway and therefore
> there is no requirement to use the latest cpu model by default.
> Let microvms use the non-versioned cpu model and remove all references
> to CPU_VERSION_LATEST as there are no other users (nor we anticipate
> future consumers of CPU_VERSION_LATEST).
>
> Those users who need spefific cpu versions can use explicit version in
> the QEMU command line to select the specific cpu version desired.
>
> CI pipline does not break with this change.
>
> 1) See commit dcafd1ef0af227 ("i386: Register versioned CPU models")
>
> CC: imammedo@redhat.com
> CC: zhao1.liu@intel.com
> Reviewed-by: Igor Mammedov <imammedo@redhat.com>
> Reviewed-by: Sergio Lopez <slp@redhat.com>
> Signed-off-by: Ani Sinha <anisinha@redhat.com>
> ---
> hw/i386/microvm.c | 2 +-
> target/i386/cpu.c | 15 ---------------
> target/i386/cpu.h | 4 ----
> 3 files changed, 1 insertion(+), 20 deletions(-)
>
> changelog:
> v2: tags added, more explanation in the commit log.
Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
next prev parent reply other threads:[~2025-02-20 7:07 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-20 6:53 [PATCH v2] microvm: do not use the lastest cpu version Ani Sinha
2025-02-20 7:25 ` Zhao Liu [this message]
2025-03-01 15:34 ` Ani Sinha
2025-03-05 7:54 ` Ani Sinha
2025-03-05 13:42 ` Stefan Hajnoczi
2025-03-05 14:26 ` Ani Sinha
2025-03-18 5:13 ` Ani Sinha
2025-03-18 11:01 ` Paolo Bonzini
2025-03-18 13:33 ` Michael S. Tsirkin
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=Z7bZBsqO6MxhFKVp@intel.com \
--to=zhao1.liu@intel.com \
--cc=anisinha@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 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.