[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v5 2/3] xlnx-zynqmp-rtc: Add basic time support
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH v5 2/3] xlnx-zynqmp-rtc: Add basic time support |
Date: |
Thu, 25 Jan 2018 11:36:36 +0000 |
On 23 January 2018 at 22:24, Alistair Francis
<address@hidden> wrote:
> Allow the guest to determine the time set from the QEMU command line.
>
> This includes adding a trace event to debug the new time.
>
> Signed-off-by: Alistair Francis <address@hidden>
> ---
> static const VMStateDescription vmstate_rtc = {
> .name = TYPE_XLNX_ZYNQMP_RTC,
> .version_id = 1,
> .minimum_version_id = 1,
> + .post_load = rtc_post_load,
> .fields = (VMStateField[]) {
> VMSTATE_UINT32_ARRAY(regs, XlnxZynqMPRTC, XLNX_ZYNQMP_RTC_R_MAX),
> + VMSTATE_INT32(current_tm.tm_sec, XlnxZynqMPRTC),
> + VMSTATE_INT32(current_tm.tm_min, XlnxZynqMPRTC),
> + VMSTATE_INT32(current_tm.tm_hour, XlnxZynqMPRTC),
> + VMSTATE_INT32(current_tm.tm_wday, XlnxZynqMPRTC),
> + VMSTATE_INT32(current_tm.tm_mday, XlnxZynqMPRTC),
> + VMSTATE_INT32(current_tm.tm_mon, XlnxZynqMPRTC),
> + VMSTATE_INT32(current_tm.tm_year, XlnxZynqMPRTC),
I'm still not sure about having the current_tm struct fields
here rather than whatever the hardware's natural representation
of the current time is. Can you explain why you think this
is the best approach?
thanks
-- PMM