diff options
author | Zhao Liu <zhao1.liu@intel.com> | 2024-04-24 23:49:16 +0800 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2024-05-22 19:43:29 +0200 |
commit | 2613747a794c4de8cd04e4a24001765220e91f1b (patch) | |
tree | d1af733dfe3e049d814bd9950106caed8f2f9dc2 /docs/devel/index-api.rst | |
parent | 9a085c4b4adeec648d6506316b8a42fbd0cf7c3c (diff) | |
download | qemu-2613747a794c4de8cd04e4a24001765220e91f1b.zip qemu-2613747a794c4de8cd04e4a24001765220e91f1b.tar.gz qemu-2613747a794c4de8cd04e4a24001765220e91f1b.tar.bz2 |
i386/cpu: Consolidate the use of topo_info in cpu_x86_cpuid()
In cpu_x86_cpuid(), there are many variables in representing the cpu
topology, e.g., topo_info, cs->nr_cores and cs->nr_threads.
Since the names of cs->nr_cores and cs->nr_threads do not accurately
represent its meaning, the use of cs->nr_cores or cs->nr_threads is
prone to confusion and mistakes.
And the structure X86CPUTopoInfo names its members clearly, thus the
variable "topo_info" should be preferred.
In addition, in cpu_x86_cpuid(), to uniformly use the topology variable,
replace env->dies with topo_info.dies_per_pkg as well.
Suggested-by: Robert Hoo <robert.hu@linux.intel.com>
Tested-by: Yongwei Ma <yongwei.ma@intel.com>
Signed-off-by: Zhao Liu <zhao1.liu@intel.com>
Reviewed-by: Xiaoyao Li <xiaoyao.li@intel.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Tested-by: Babu Moger <babu.moger@amd.com>
Message-ID: <20240424154929.1487382-9-zhao1.liu@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'docs/devel/index-api.rst')
0 files changed, 0 insertions, 0 deletions