pc: Update rtc_cmos in pc_cpu_plug
Update rtc_cmos in pc_cpu_plug() directly, instead of the notifier.
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Gu Zheng <guz.fnst@cn.fujitsu.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
index 02a1d61..d101197 100644
--- a/include/hw/i386/pc.h
+++ b/include/hw/i386/pc.h
@@ -34,6 +34,7 @@
MemoryRegion hotplug_memory;
HotplugHandler *acpi_dev;
+ ISADevice *rtc;
uint64_t max_ram_below_4g;
};
@@ -211,7 +212,7 @@
uint32 hpet_irqs);
void pc_init_ne2k_isa(ISABus *bus, NICInfo *nd);
void pc_cmos_init(ram_addr_t ram_size, ram_addr_t above_4g_mem_size,
- const char *boot_device,
+ const char *boot_device, MachineState *machine,
ISADevice *floppy, BusState *ide0, BusState *ide1,
ISADevice *s);
void pc_nic_init(ISABus *isa_bus, PCIBus *pci_bus);