From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Gleixner Subject: RE: [PATCH 2/2] x86/vdso: Add VCLOCK_HVCLOCK vDSO clock read method Date: Mon, 13 Feb 2017 10:27:18 +0100 (CET) Message-ID: References: <20170209141052.18694-1-vkuznets@redhat.com> <20170209141052.18694-3-vkuznets@redhat.com> <87d1eqqlkv.fsf@vitty.brq.redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: virtualization-bounces@lists.linux-foundation.org Errors-To: virtualization-bounces@lists.linux-foundation.org To: Dexuan Cui Cc: Stephen Hemminger , Haiyang Zhang , "x86@kernel.org" , "linux-kernel@vger.kernel.org" , Andy Lutomirski , Ingo Molnar , "H. Peter Anvin" , "devel@linuxdriverproject.org" , "virtualization@lists.linux-foundation.org" List-Id: virtualization@lists.linuxfoundation.org On Mon, 13 Feb 2017, Dexuan Cui wrote: > > From: Thomas Gleixner [mailto:tglx@linutronix.de] > > Sent: Saturday, February 11, 2017 02:02 > > ... > > That's important if the stuff happens cross CPU. If the update happens on > > the same CPU then this is a different story and as there are VMexits > > involved they might provide the required ordering already. But I can't tell > > as I have no idea how that host side thing is done. > > > > IMO Hyper-V TSC page clocksource here seems pretty similar to KVM's pvclock, > So I would guess "the structure is only updated just before reentering the guest > after some VM event" (https://rwmj.wordpress.com/2010/10/15/kvm-pvclock/), > that is, the update should happen on the same CPU, I guess. Guessing does not help much. There are a gazillion ways to implement such a thing. I'm sure that there exists proper documentation of the mechanism inside your company. Thanks, tglx