qemu/target/i386
Zhao Liu 2613747a79 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>
2024-05-22 19:43:29 +02:00
..
hvf accel/hvf: Use accel-specific per-vcpu @dirty field 2024-04-26 17:03:00 +02:00
kvm target/i386: SEV: use KVM_SEV_INIT2 if possible 2024-04-23 17:35:25 +02:00
nvmm accel/nvmm: Fix NULL dereference in nvmm_init_vcpu() 2024-05-03 14:37:51 +02:00
tcg target/i386: clean up AAM/AAD 2024-05-22 15:53:30 +02:00
whpx accel/whpx: Fix NULL dereference in whpx_init_vcpu() 2024-05-03 14:37:51 +02:00
arch_dump.c
arch_memory_mapping.c memory: follow Error API guidelines 2023-10-19 23:13:27 +02:00
confidential-guest.c target/i386: introduce x86-confidential-guest 2024-04-23 17:35:25 +02:00
confidential-guest.h target/i386: Implement mc->kvm_type() to get VM type 2024-04-23 17:35:25 +02:00
cpu-apic.c target/i386: Move APIC related code to cpu-apic.c 2024-04-25 10:12:54 +02:00
cpu-dump.c
cpu-internal.h
cpu-param.h target: Define TCG_GUEST_DEFAULT_MO in 'cpu-param.h' 2024-04-26 15:31:37 +02:00
cpu-qom.h target: Move ArchCPUClass definition to 'cpu.h' 2023-11-07 13:08:48 +01:00
cpu-sysemu.c target/i386: Move APIC related code to cpu-apic.c 2024-04-25 10:12:54 +02:00
cpu.c i386/cpu: Consolidate the use of topo_info in cpu_x86_cpuid() 2024-05-22 19:43:29 +02:00
cpu.h target/i386: add control bits support for LAM 2024-05-22 15:53:30 +02:00
gdbstub.c misc: Use QEMU header path relative to include/ directory 2024-05-09 00:07:21 +02:00
helper.c target/i386: add control bits support for LAM 2024-05-22 15:53:30 +02:00
helper.h target/i386: clean up AAM/AAD 2024-05-22 15:53:30 +02:00
host-cpu.c target/i386/host-cpu: Consolidate the use of warn_report_once() 2024-04-23 17:35:26 +02:00
host-cpu.h
Kconfig i386: select correct components for no-board build 2024-05-10 15:45:15 +02:00
machine.c target/i386: Constify VMState in machine.c 2023-12-29 11:17:30 +11:00
meson.build target/i386: Move APIC related code to cpu-apic.c 2024-04-25 10:12:54 +02:00
monitor.c target/i386: Move APIC related code to cpu-apic.c 2024-04-25 10:12:54 +02:00
ops_sse.h target/i386: implement SHA instructions 2023-10-25 17:35:07 +02:00
sev-sysemu-stub.c
sev.c hw/i386/sev: Use legacy SEV VM types for older machine types 2024-04-23 17:35:25 +02:00
sev.h i386/sev: Switch to use confidential_guest_kvm_init() 2024-04-23 17:35:25 +02:00
svm.h target/i386: check intercept for XSETBV 2023-10-17 15:20:53 +02:00
trace-events
trace.h
xsave_helper.c