From: Paolo Bonzini Subject: Re: [libvirt] TSC frequency configuration & invtsc migration (was Re: [PATCH 4/4] kvm: Allow migration with invtsc) Date: Tue, 10 Jan 2017 17:38:45 +0100 Message-ID: <1ec51249-59c8-582b-d3cb-3389606649ce@redhat.com> References: <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> <20170105123351.GF3292@redhat.com> <20170105124857.GQ3315@thinpad.lan.raisama.net> <20170105130032.GJ3292@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: Marcelo Tosatti , libvir-list@redhat.com, qemu-devel@nongnu.org, kvm@vger.kernel.org, Haozhong Zhang To: "Daniel P. Berrange" , Eduardo Habkost Return-path: Received: from mx1.redhat.com ([209.132.183.28]:52764 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752826AbdAJQis (ORCPT ); Tue, 10 Jan 2017 11:38:48 -0500 In-Reply-To: <20170105130032.GJ3292@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: 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.