]> git.ipfire.org Git - thirdparty/qemu.git/commit
i386/cpu: Track a X86CPUTopoInfo directly in CPUX86State
authorXiaoyao Li <xiaoyao.li@intel.com>
Thu, 19 Dec 2024 11:01:21 +0000 (06:01 -0500)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 10 Jan 2025 22:34:45 +0000 (23:34 +0100)
commit84b71a131c1bc84c36fafb63271080ecf9f2ff7a
treee3adaf307e0d4dde9a5c86faf352005d01734a04
parente60cbeec190d349682bf97cf55446e8ae260b11a
i386/cpu: Track a X86CPUTopoInfo directly in CPUX86State

The name of nr_modules/nr_dies are ambiguous and they mislead people.

The purpose of them is to record and form the topology information. So
just maintain a X86CPUTopoInfo member in CPUX86State instead. Then
nr_modules and nr_dies can be dropped.

As the benefit, x86 can switch to use information in
CPUX86State::topo_info and get rid of the nr_cores and nr_threads in
CPUState. This helps remove the dependency on qemu_init_vcpu(), so that
x86 can get and use topology info earlier in x86_cpu_realizefn(); drop
the comment that highlighted the depedency.

Signed-off-by: Xiaoyao Li <xiaoyao.li@intel.com>
Link: https://lore.kernel.org/r/20241219110125.1266461-7-xiaoyao.li@intel.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
hw/i386/x86-common.c
target/i386/cpu-system.c
target/i386/cpu.c
target/i386/cpu.h