summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hw/i386/pc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index a9e64a88e5..02cc5a24f1 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -1818,8 +1818,10 @@ static void pc_cpu_plug(HotplugHandler *hotplug_dev,
/* increment the number of CPUs */
pcms->boot_cpus++;
- if (dev->hotplugged) {
+ if (pcms->rtc) {
rtc_set_cpus_count(pcms->rtc, pcms->boot_cpus);
+ }
+ if (pcms->fw_cfg) {
fw_cfg_modify_i16(pcms->fw_cfg, FW_CFG_NB_CPUS, pcms->boot_cpus);
}