qemu-devel
[Top][All Lists]
Advanced

[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: Tue, 13 Feb 2018 10:47:27 +0000

On 8 February 2018 at 17:21, Alistair Francis
<address@hidden> wrote:
> On Thu, Feb 8, 2018 at 7:42 AM, Peter Maydell <address@hidden> wrote:
>> Doing it this way round means that it gets complicated when the
>> guest writes to the RTC, though. At the moment I can't see anywhere
>> that sets the current_tm fields except for reset and post-migration.
>> Isn't something missing here? I'm wondering if this choice of
>> migration state is going to paint us into a corner for handling
>> guest-writes-to-rtc.
>
> I don't have guest write support. The main focus was just allowing
> users to set the time when they boot QEMU. We haven't seen any request
> to allow guests to set the time, so I didn't bother.
>
> Wouldn't adding guest write support just be as simple as converting
> the value written to a current_tm field?

Yes, but then why are we using the current_tm format at all?
It's not what the guest wants to see for reads, it's not what writes
would naturally be, and it's not what you're using at runtime (you
convert it immediately to a tick_offset and ignore the current_tm
stuff). I guess it can be made to work, it just seems like a weird
format to use for migration.

I've also just reread the patch and am a bit confused -- don't
you need some code that writes the correct value for the current
guest time to the current_tm fields before migration ?

thanks
-- PMM



reply via email to

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