Re: [QEMU PATCH v2] kvmclock: advance clock by time window between vm_stop and pre_save

Paolo Bonzini
2016-11-10T17:57:27Z

On 10/11/2016 12:48, Marcelo Tosatti wrote:
> Destination has to run the following logic:
>
> If (source has KVM_CAP_ADVANCE_CLOCK)
> use KVM_GET_CLOCK value
> Else
> read pvclock from guest
>
> To support migration from older QEMU versions which do not have
> KVM_CAP_ADVANCE_CLOCK (or new QEMU versions running on old
> hosts without KVM_CAP_ADVANCE_CLOCK).
>
> I don't see any clean way to give that information, except changing
> the migration format to pass "host: kvm_cap_advance_clock=true/false"
> information.

If you make it only affect new machine types, you could transmit a dummy
clock value such as -1 if the source does not have KVM_CLOCK_TSC_STABLE.

Paolo