On Tue, 24 Sep 2019 at 09:45, Anup Patel <anup.pa...@wdc.com> wrote: > > This patch adds model for Google Goldfish virtual platform RTC device. > > We will be adding Goldfish RTC device to the QEMU RISC-V virt machine > for providing real date-time to Guest Linux. The corresponding Linux > driver for Goldfish RTC device is already available in upstream Linux. > > For now, VM migration support is not available for Goldfish RTC device > but it will be added later when we implement VM migration for KVM RISC-V. > > Signed-off-by: Anup Patel <anup.pa...@wdc.com> > --- > + > +static Property goldfish_rtc_properties[] = { > + DEFINE_PROP_UINT64("tick-offset", GoldfishRTCState, tick_offset, 0), > + DEFINE_PROP_UINT64("alarm-next", GoldfishRTCState, alarm_next, 0), > + DEFINE_PROP_UINT32("alarm-running", GoldfishRTCState, alarm_running, 0), > + DEFINE_PROP_UINT32("irq-pending", GoldfishRTCState, irq_pending, 0), > + DEFINE_PROP_UINT32("irq-enabled", GoldfishRTCState, irq_enabled, 0), > + DEFINE_PROP_END_OF_LIST(), > +};
What are all these properties trying to do ? > + > +static void goldfish_rtc_class_init(ObjectClass *klass, void *data) > +{ > + DeviceClass *dc = DEVICE_CLASS(klass); > + dc->props = goldfish_rtc_properties; Missing reset function. If you don't want to implement migration support now you should at least put in something that block migration. (Personally I prefer to just write the vmstate, it's as easy as writing the code to block migrations.) thanks -- PMM