Re: [libvirt] TSC frequency configuration & invtsc migration (was Re: [PATCH 4/4] kvm: Allow migration with invtsc)

Paolo Bonzini
2017-01-10T16:38:48Z

On 05/01/2017 14:00, Daniel P. Berrange wrote:
>> If you do this unconditionally, you have another problem: if
>> tsc-frequency is set explicitly, migration is only possible if
>> TSC frequency of the destination matches[1], or if TSC scaling is
>> supported by the destination. It's a good idea to set a TSC
>> frequency only if invtsc is enabled explicitly in the config.
>
> If we don't set tsc-frequency and the TSC frequency doesn't
> match, does that mean the guest migration succeed, but suddenly
> sees different TSC frequency ?

That's the reason why kvmclock exists (or more precisely, the reason why
kvmclock is still useful even when hosts have invtsc).

Paolo

> I guess we we allowed that historically we can't break that
> now, so setting it only if invtsc is set seems reasonable.