From: Zhao Liu <zhao1.liu@intel.com>
To: "Paolo Bonzini" <pbonzini@redhat.com>,
"Igor Mammedov" <imammedo@redhat.com>,
"Daniel P . Berrangé" <berrange@redhat.com>,
"Chuang Xu" <xuchuangxclwt@bytedance.com>,
"Xiaoyao Li" <xiaoyao.li@intel.com>,
"Isaku Yamahata" <isaku.yamahata@intel.com>,
"Babu Moger" <babu.moger@amd.com>
Cc: qemu-devel@nongnu.org, Zhao Liu <zhao1.liu@intel.com>
Subject: [PATCH 0/4] i386/cpu: Fix topological field encoding & overflow
Date: Thu, 27 Feb 2025 14:25:19 +0800 [thread overview]
Message-ID: <20250227062523.124601-1-zhao1.liu@intel.com> (raw)
Hi,
This series collects and organizes several topology-related cleanups and
fixes, based on b69801dd6b1e ("Merge tag 'for_upstream' of
https://git.kernel.org/pub/scm/virt/kvm/mst/qemu into staging").
Patch 1 is picked from Chuang's v6 [1].
Patch 2-3 are picked from Qian's v4 [2], though it had previously gone
through sufficient review (got R/b tags), I dropped its R/b tags because
of my code change.
Patch 4 is newly added, inspired by patch 3, to also perform a check on
AMD's cache CPUID. This is to consider the current maximum number of
supported CPUs, which is approaching the overflow boundary.
In addition to the 0x1, 0x4, and 0x8000001d leaves involved in the patch
series, there is also the 0x1f leaf related to topology. However, the
upper limit for CPUID.1FH.EBX[bits 15:0] is 65,535 threads, which
provides enough room. Therefore, this field does not currently require
overflow checks.
This series correct the CPUIDs, but it doesn't affect the Guest's live
migration. Therefore, I did not add the compat property for this.
[1]: https://lore.kernel.org/qemu-devel/20241009035638.59330-1-xuchuangxclwt@bytedance.com/
[2]: https://lore.kernel.org/qemu-devel/20230829042405.932523-2-qian.wen@intel.com/
Thanks and Best Regards,
Zhao
---
Chuang Xu (1):
i386/cpu: Fix number of addressable IDs field for CPUID.01H.EBX[23:16]
Qian Wen (2):
i386/cpu: Fix cpu number overflow in CPUID.01H.EBX[23:16]
i386/cpu: Fix overflow of cache topology fields in CPUID.04H
Zhao Liu (1):
i386/cpu: Honor maximum value for CPUID.8000001DH.EAX[25:14]
target/i386/cpu.c | 35 ++++++++++++++++++++++++++++-------
1 file changed, 28 insertions(+), 7 deletions(-)
--
2.34.1
next reply other threads:[~2025-02-27 6:06 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-27 6:25 Zhao Liu [this message]
2025-02-27 6:25 ` [PATCH 1/4] i386/cpu: Fix number of addressable IDs field for CPUID.01H.EBX[23:16] Zhao Liu
2025-05-12 9:32 ` Michael Tokarev
2025-05-13 3:42 ` Zhao Liu
2025-02-27 6:25 ` [PATCH 2/4] i386/cpu: Fix cpu number overflow in CPUID.01H.EBX[23:16] Zhao Liu
2025-02-27 7:13 ` Xiaoyao Li
2025-02-27 6:25 ` [PATCH 3/4] i386/cpu: Fix overflow of cache topology fields in CPUID.04H Zhao Liu
2025-02-27 7:14 ` Xiaoyao Li
2025-02-27 6:25 ` [PATCH 4/4] i386/cpu: Honor maximum value for CPUID.8000001DH.EAX[25:14] Zhao Liu
2025-05-21 8:53 ` [PATCH 0/4] i386/cpu: Fix topological field encoding & overflow Zhao Liu
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=20250227062523.124601-1-zhao1.liu@intel.com \
--to=zhao1.liu@intel.com \
--cc=babu.moger@amd.com \
--cc=berrange@redhat.com \
--cc=imammedo@redhat.com \
--cc=isaku.yamahata@intel.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=xiaoyao.li@intel.com \
--cc=xuchuangxclwt@bytedance.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).