qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 1/2] hw: timer: Add Goldfish RTC device


From: Peter Maydell
Subject: Re: [PATCH 1/2] hw: timer: Add Goldfish RTC device
Date: Tue, 24 Sep 2019 10:50:31 +0100

On Tue, 24 Sep 2019 at 09:45, Anup Patel <address@hidden> 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 <address@hidden>
> ---
> +
> +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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]