qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 4/4] pl031: switch clock base to rtc_clock


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH 4/4] pl031: switch clock base to rtc_clock
Date: Mon, 30 Jan 2012 18:02:13 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:9.0) Gecko/20111222 Thunderbird/9.0

On 01/30/2012 05:54 PM, Peter Maydell wrote:
>  This lets the user specify the desired semantics.  By default, the RTC
>  will follow adjustments from the host's NTP client, and will remain in
>  sync when the virtual machine is stopped.  The previous behavior, which
>  provides determinism with both icount and qtest, remains available with
>  "-rtc clock=vm".
>
>  pl031 supports migration, so we need to convert the time
>  base from rtc_clock to vm_clock and back for backwards compatibility.
If it would be cleaner I'm entirely happy for us to do a version
bump and break binary compatibility. (We bump the version on
the CPUState pretty regularly anyhow; save/load for ARM devices
currently is mostly for the benefit of snapshot save/restore rather
than between-qemu-versions migration.)

Actually it's not really just backwards compatibility.

rtc_clock may be counting up from a different time base on the source and destination machine. vm_clock is the only time base that is migrated, so it is the only one that is safe to use in the data stream.

Perhaps I could transfer the timer deadline relative to the current rtc_clock value and convert it again on the destination. However, it would be basically the same code that transfers the value relative to the vm_clock; it's just a different offset to apply.

Paolo



reply via email to

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