From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: Exporting kvm_max_guest_tsc_khz to userspace (was Re: [PATCH 4/4] kvm: Allow migration with invtsc) Date: Mon, 9 Jan 2017 15:58:11 +0100 Message-ID: References: <1482866480-26208-1-git-send-email-ehabkost@redhat.com> <1482866480-26208-5-git-send-email-ehabkost@redhat.com> <20170104115656.GB14961@amt.cnet> <20170104133916.GG3315@thinpad.lan.raisama.net> <20170104195917.GM3315@thinpad.lan.raisama.net> <20170104222623.GA21789@amt.cnet> <20170105013631.GO3315@thinpad.lan.raisama.net> <20170105104830.GB6299@amt.cnet> <20170105121950.GP3315@thinpad.lan.raisama.net> <20170106103126.GA1575@amt.cnet> <20170108202851.GZ3315@thinpad.lan.raisama.net> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org, Haozhong Zhang , libvir-list@redhat.com To: Eduardo Habkost , Marcelo Tosatti Return-path: Received: from mail-wj0-f193.google.com ([209.85.210.193]:32870 "EHLO mail-wj0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935479AbdAIO6N (ORCPT ); Mon, 9 Jan 2017 09:58:13 -0500 Received: by mail-wj0-f193.google.com with SMTP id kp2so84840434wjc.0 for ; Mon, 09 Jan 2017 06:58:13 -0800 (PST) In-Reply-To: <20170108202851.GZ3315@thinpad.lan.raisama.net> Sender: kvm-owner@vger.kernel.org List-ID: 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