[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
[PATCH 2/2] riscv: virt: Use Goldfish RTC device, Anup Patel, 2019/09/24
Re: [PATCH 0/2] RTC support for QEMU RISC-V virt machine, Richard W.M. Jones, 2019/09/27