[libvirt] Exporting kvm_max_guest_tsc_khz to userspace (was Re: [PATCH 4/4] kvm: Allow migration with invtsc)

Paolo Bonzini pbonzini at redhat.com
Mon Jan 9 14:58:11 UTC 2017



On 08/01/2017 21:28, Eduardo Habkost wrote:
>> Well just export KVM_GET_TSC_KHZ in a QMP command right? Its pretty
>> easy.
>>
>> Let me know if you need any help coding or testing.
> I just found out that KVM doesn't provide something that QEMU and
> libvirt need: the value of kvm_max_guest_tsc_khz. Without it, we
> have no way to know if a given VM is really migratable to a host.
> 
> Could we add a KVM_CAP_MAX_TSC_KHZ capability for that?

The ratio is really quite high, 256x the host frequency for AMD and
65536x for Intel.  Anything below 2^32 Hz (above that, there would
probably be other failures) is safe.

Paolo




More information about the libvir-list mailing list