|
@@ -8203,13 +8203,12 @@ static void x86_cpu_realizefn(DeviceState *dev, Error **errp)
|
|
|
|
|
|
#ifndef CONFIG_USER_ONLY
|
|
|
MachineState *ms = MACHINE(qdev_get_machine());
|
|
|
+ MachineClass *mc = MACHINE_GET_CLASS(ms);
|
|
|
|
|
|
- /*
|
|
|
- * TODO: Add a SMPCompatProps.has_caches flag to avoid useless updates
|
|
|
- * if user didn't set smp_cache.
|
|
|
- */
|
|
|
- if (!x86_cpu_update_smp_cache_topo(ms, cpu, errp)) {
|
|
|
- return;
|
|
|
+ if (mc->smp_props.has_caches) {
|
|
|
+ if (!x86_cpu_update_smp_cache_topo(ms, cpu, errp)) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
qemu_register_reset(x86_cpu_machine_reset_cb, cpu);
|