From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcelo Tosatti Subject: Re: What's kvmclock's custom sched_clock for? Date: Thu, 7 Jan 2016 18:15:43 -0200 Message-ID: <20160107201541.GB18469@amt.cnet> References: <20160107151810.GA12375@potion.brq.redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Radim Krcmar , kvm list To: Andy Lutomirski Return-path: Received: from mx1.redhat.com ([209.132.183.28]:42095 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752985AbcAGUSx (ORCPT ); Thu, 7 Jan 2016 15:18:53 -0500 Content-Disposition: inline In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: On Thu, Jan 07, 2016 at 09:27:30AM -0800, Andy Lutomirski wrote: > On Thu, Jan 7, 2016 at 2:56 AM, Marcelo Tosatti wrote: > > On Wed, Jan 06, 2016 at 11:18:51PM -0800, Andy Lutomirski wrote: > >> AFAICT KVM reliably passes a monotonic TSC through to guests, > > > > It does not. > > Under what circumstances does it go backwards? All hosts support tsc > offsets, I think, and the host code knows how to prevent the clock > from going backwards even on host suspend. > > Does migration make the TSC go backwards? If so, that's impolite and > it would be nice to fix it. TSC clocksource in the host is required for TSC masterclock scheme. A change from TSC clocksource to a different clocksource, in the host, invalidates TSC masterclock scheme. If you change from TSC clocksource to HPET clocksource, for example, TSC masterclock scheme stops functioning and its necessary to stop exposing PVCLOCK_TSC_STABLE_CLOCK. Please send a fix, your patch is causing breakage.