From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932941AbcIBQ5S (ORCPT ); Fri, 2 Sep 2016 12:57:18 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40616 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932236AbcIBQ5R (ORCPT ); Fri, 2 Sep 2016 12:57:17 -0400 Subject: Re: [PATCH 3/4] KVM: x86: introduce get_kvmclock_ns To: Roman Kagan , linux-kernel@vger.kernel.org, kvm@vger.kernel.org, peterhornyack@google.com, rkrcmar@redhat.com, den@openvz.org References: <1472743575-123756-1-git-send-email-pbonzini@redhat.com> <1472743575-123756-4-git-send-email-pbonzini@redhat.com> <20160902135225.3ynmrv564rbgaca6@rkaganb.sw.ru> <20160902145123.v53bthe64qvj7ris@rkaganb.sw.ru> <9a02e696-f9ac-8caa-5acd-d820374e6773@redhat.com> <20160902165551.2owvzs4peerwtlpd@rkaganb.sw.ru> From: Paolo Bonzini Message-ID: <6207edf3-72e7-229d-8ff7-a91c23e40cd7@redhat.com> Date: Fri, 2 Sep 2016 18:57:10 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <20160902165551.2owvzs4peerwtlpd@rkaganb.sw.ru> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Fri, 02 Sep 2016 16:57:16 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/09/2016 18:55, Roman Kagan wrote: >> > I'll change patch 4 to store the parameters and use them when accessing >> > the time reference counter MSR. I'll still keep the procedure that goes >> > through kvmclock. It's a bit more involved for the scale, but >> > vcpu->last_guest_tsc only provides a part of the offset computation; the >> > other half is vcpu->hv_clock.system_time and it's not stored anywhere. > Erm... It is stored right there, in vcpu->hv_clock.system_time, you can > access it just fine when you populate tsc_ref_page values. Am I missing > anything? No. It's not stored anywhere outside vcpu->hv_clock. My reasoning goes that if I have to use vcpu->hv_clock.system_time I might as well use vcpu->hv_clock for everything. :) Paolo