From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [PATCH v2] KVM: x86: update masterclock values on TSC writes Date: Wed, 05 Nov 2014 10:36:05 +0100 Message-ID: <5459EF85.5010206@redhat.com> References: <20141104233044.GB29191@amt.cnet> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Cc: kvm-devel To: Marcelo Tosatti Return-path: Received: from mx1.redhat.com ([209.132.183.28]:58067 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932103AbaKEJgK (ORCPT ); Wed, 5 Nov 2014 04:36:10 -0500 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id sA59a9Oe013902 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Wed, 5 Nov 2014 04:36:10 -0500 In-Reply-To: <20141104233044.GB29191@amt.cnet> Sender: kvm-owner@vger.kernel.org List-ID: On 05/11/2014 00:30, Marcelo Tosatti wrote: > + /* > + * If the vcpus have matched TSCs and host clocksource is TSC, > + * perform request to enable masterclock. > + * > + * If the masterclock is enabled, perform request to update > + * masterclock values. > + */ > + if ((vcpus_matched && gtod->clock.vclock_mode == VCLOCK_TSC) || > + ka->use_master_clock) This is not an explanation, it is a literal translation from C to English. :) Can you also explain the why, especially for the first half of the condition? Paolo