From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [RFC PATCH 1/2] Hyper-H reference counter Date: Mon, 20 May 2013 11:32:27 +0200 Message-ID: <5199EDAB.7000500@redhat.com> References: <1368696535.18400.10.camel@localhost> <5194E2D3.3080300@redhat.com> <1368714390.18400.13.camel@localhost> <5194F0F8.9070205@redhat.com> <1368945475.1859.2.camel@localhost> <5199D952.2020808@redhat.com> <20130520083648.GP4725@redhat.com> <5199E20C.1030004@redhat.com> <20130520084912.GQ4725@redhat.com> <5199E536.6070809@redhat.com> <20130520092519.GA11606@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Vadim Rozenfeld , kvm@vger.kernel.org, mtosatti@redhat.com, pl@dlh.net To: Gleb Natapov Return-path: Received: from mx1.redhat.com ([209.132.183.28]:57951 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752047Ab3ETJcf (ORCPT ); Mon, 20 May 2013 05:32:35 -0400 In-Reply-To: <20130520092519.GA11606@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: Il 20/05/2013 11:25, Gleb Natapov ha scritto: > So in Hyper-V spec they > say: > > Special value of 0xFFFFFFFF is used to indicate that this facility is no > longer a reliable source of reference time and the virtual machine must > fall back to a different source (for example, the virtual PM timer). > > May be they really mean "virtual PM timer" here and reference counter is > not considered as a fall back source, but this is not what we want. > > On the other hand in API specification [1] they have: > > #define HV_REFERENCE_TSC_SEQUENCE_INVALID (0x00000000) > > which is not even documented in hyper-v spec. Actually 0 is specified as > valid value there. Go figure. > > [1] http://msdn.microsoft.com/en-us/library/windows/hardware/ff540244%28v=vs.85%29.aspx Ok, if the API document is right then we should use HV_REFERENCE_TSC_SEQUENCE_INVALID instead of 0, with a comment explaining why we use 0 and not 0xFFFFFFFF. Paolo