From: Xiaoyao Li <xiaoyao.li@intel.com>
To: Zhao Liu <zhao1.liu@intel.com>
Cc: Chuang Xu <xuchuangxclwt@bytedance.com>,
pbonzini@redhat.com, imammedo@redhat.com,
xieyongji@bytedance.com, chaiwen.cc@bytedance.com,
qemu-stable@nongnu.org, Guixiong Wei <weiguixiong@bytedance.com>,
Yipeng Yin <yinyipeng@bytedance.com>,
qemu-devel@nongnu.org
Subject: Re: [PATCH v6] i386/cpu: fixup number of addressable IDs for logical processors in the physical package
Date: Tue, 3 Dec 2024 23:04:12 +0800 [thread overview]
Message-ID: <f59cd973-b38b-4ee6-8baf-70019c26122e@intel.com> (raw)
In-Reply-To: <Z060VQVV6ONK9Qd2@intel.com>
On 12/3/2024 3:33 PM, Zhao Liu wrote:
>> However, back to the patch, I think we cannot change it as this patch
>> directly. Instead, we need a compat_props for the changed behavior, because
>> this isn't a bug fix and it introduces guest-visible differences.
>
> This is a fix, not a new feature, so compat_props is not needed.
Fix what? QEMU behaves as it for so many years and if the guest OS uses
the algorithm recommended by SDM, there is no issue.
>> For ancient Intel CPUs, EBX[23:16] did represent the number of Logical
>> processor per package. I believe this should be the reason why QEMU
>> implemented it as is:
>>
>> - on SDM version 013, EBX[23:16]: Number of logical processors per
>> physical processor; two for the Pentium 4 processor supporting
>> Hyper-Threading Technology.
>>
>> - on SDM version 015, it changed to: Number of initial APIC IDs reserved
>> for this physical package. Normally, this is the number of logical
>> processors per physical package.
>>
>> - on SDM version 016, it changed to: Maximum number of logical processors
>> in this physical package.
>>
>> - finally, starting from SDM version 026, it changed to what reads now:
>> Maximum number of addressable IDs for logical processors in this physical
>> package.
>
> And this is an architecturally defined CPUID, so SDM ensures backward
> compatibility.
SDM ensure the backwards compatibility by recommending to round the
number up to the power-of 2 when using it to calculate the topology with
legacy method.
> Regards,
> Zhao
>
next prev parent reply other threads:[~2024-12-03 15:08 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-09 3:56 [PATCH v6] i386/cpu: fixup number of addressable IDs for logical processors in the physical package Chuang Xu
2024-10-09 4:21 ` Zhao Liu
2024-10-12 7:13 ` Xiaoyao Li
2024-10-12 8:10 ` Chuang Xu
2024-10-12 8:32 ` Xiaoyao Li
2024-10-12 8:56 ` Zhao Liu
2024-10-12 8:21 ` Xiaoyao Li
2024-10-12 9:28 ` Zhao Liu
2024-10-12 9:35 ` Chuang Xu
2024-10-14 0:36 ` Xiaoyao Li
2024-10-14 1:32 ` Xiaoyao Li
2024-10-14 3:36 ` Zhao Liu
2024-10-17 8:18 ` Xiaoyao Li
2024-10-17 9:03 ` Zhao Liu
2024-10-28 16:07 ` Xiaoyao Li
2024-12-03 7:33 ` Zhao Liu
2024-12-03 15:04 ` Xiaoyao Li [this message]
2024-12-03 15:35 ` Zhao Liu
2024-12-03 15:29 ` Daniel P. Berrangé
2024-12-03 7:36 ` Zhao Liu
2024-12-03 7:29 ` Chuang Xu
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=f59cd973-b38b-4ee6-8baf-70019c26122e@intel.com \
--to=xiaoyao.li@intel.com \
--cc=chaiwen.cc@bytedance.com \
--cc=imammedo@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-stable@nongnu.org \
--cc=weiguixiong@bytedance.com \
--cc=xieyongji@bytedance.com \
--cc=xuchuangxclwt@bytedance.com \
--cc=yinyipeng@bytedance.com \
--cc=zhao1.liu@intel.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).