[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 36/38] cpu: Remove nr_cores from struct CPUState
From: |
Paolo Bonzini |
Subject: |
[PULL 36/38] cpu: Remove nr_cores from struct CPUState |
Date: |
Fri, 10 Jan 2025 19:46:17 +0100 |
From: Xiaoyao Li <xiaoyao.li@intel.com>
There is no user of it now, remove it.
Signed-off-by: Xiaoyao Li <xiaoyao.li@intel.com>
Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Link: https://lore.kernel.org/r/20241219110125.1266461-9-xiaoyao.li@intel.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
include/hw/core/cpu.h | 2 --
hw/core/cpu-common.c | 1 -
system/cpus.c | 1 -
3 files changed, 4 deletions(-)
diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h
index c3ca0babcb3..fb397cdfc53 100644
--- a/include/hw/core/cpu.h
+++ b/include/hw/core/cpu.h
@@ -407,7 +407,6 @@ struct qemu_work_item;
* Under TCG this value is propagated to @tcg_cflags.
* See TranslationBlock::TCG CF_CLUSTER_MASK.
* @tcg_cflags: Pre-computed cflags for this cpu.
- * @nr_cores: Number of cores within this CPU package.
* @nr_threads: Number of threads within this CPU core.
* @thread: Host thread details, only live once @created is #true
* @sem: WIN32 only semaphore used only for qtest
@@ -466,7 +465,6 @@ struct CPUState {
CPUClass *cc;
/*< public >*/
- int nr_cores;
int nr_threads;
struct QemuThread *thread;
diff --git a/hw/core/cpu-common.c b/hw/core/cpu-common.c
index 1edc16f65c8..cb79566cc51 100644
--- a/hw/core/cpu-common.c
+++ b/hw/core/cpu-common.c
@@ -243,7 +243,6 @@ static void cpu_common_initfn(Object *obj)
cpu->cluster_index = UNASSIGNED_CLUSTER_INDEX;
/* user-mode doesn't have configurable SMP topology */
/* the default value is changed by qemu_init_vcpu() for system-mode */
- cpu->nr_cores = 1;
cpu->nr_threads = 1;
cpu->cflags_next_tb = -1;
diff --git a/system/cpus.c b/system/cpus.c
index 99f83806c16..37e5892c240 100644
--- a/system/cpus.c
+++ b/system/cpus.c
@@ -687,7 +687,6 @@ void qemu_init_vcpu(CPUState *cpu)
{
MachineState *ms = MACHINE(qdev_get_machine());
- cpu->nr_cores = machine_topo_get_cores_per_socket(ms);
cpu->nr_threads = ms->smp.threads;
cpu->stopped = true;
cpu->random_seed = qemu_guest_random_seed_thread_part1();
--
2.47.1
- [PULL 25/38] target/i386/kvm: Clean up return values of MSR filter related functions, (continued)
- [PULL 25/38] target/i386/kvm: Clean up return values of MSR filter related functions, Paolo Bonzini, 2025/01/10
- [PULL 26/38] target/i386/kvm: Return -1 when kvm_msr_energy_thread_init() fails, Paolo Bonzini, 2025/01/10
- [PULL 27/38] target/i386/kvm: Clean up error handling in kvm_arch_init(), Paolo Bonzini, 2025/01/10
- [PULL 32/38] i386/topology: Update the comment of x86_apicid_from_topo_ids(), Paolo Bonzini, 2025/01/10
- [PULL 20/38] target/i386/kvm: Add feature bit definitions for KVM CPUID, Paolo Bonzini, 2025/01/10
- [PULL 37/38] i386/cpu: Set up CPUID_HT in x86_cpu_expand_features() instead of cpu_x86_cpuid(), Paolo Bonzini, 2025/01/10
- [PULL 12/38] rust: qemu-api-macros: add automatic TryFrom/TryInto derivation, Paolo Bonzini, 2025/01/10
- [PULL 31/38] i386/cpu: Drop cores_per_pkg in cpu_x86_cpuid(), Paolo Bonzini, 2025/01/10
- [PULL 35/38] i386/cpu: Hoist check of CPUID_EXT3_TOPOEXT against threads_per_core, Paolo Bonzini, 2025/01/10
- [PULL 38/38] i386/cpu: Set and track CPUID_EXT3_CMP_LEG in env->features[FEAT_8000_0001_ECX], Paolo Bonzini, 2025/01/10
- [PULL 36/38] cpu: Remove nr_cores from struct CPUState,
Paolo Bonzini <=