From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752215AbdBMT2m (ORCPT ); Mon, 13 Feb 2017 14:28:42 -0500 Received: from Galois.linutronix.de ([146.0.238.70]:41089 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751313AbdBMT2l (ORCPT ); Mon, 13 Feb 2017 14:28:41 -0500 Date: Mon, 13 Feb 2017 20:28:21 +0100 (CET) From: Thomas Gleixner To: Andy Lutomirski cc: Dexuan Cui , Stephen Hemminger , Vitaly Kuznetsov , "x86@kernel.org" , Ingo Molnar , "H. Peter Anvin" , KY Srinivasan , Haiyang Zhang , "linux-kernel@vger.kernel.org" , "devel@linuxdriverproject.org" , "virtualization@lists.linux-foundation.org" Subject: Re: [PATCH 2/2] x86/vdso: Add VCLOCK_HVCLOCK vDSO clock read method In-Reply-To: Message-ID: References: <20170209141052.18694-1-vkuznets@redhat.com> <20170209141052.18694-3-vkuznets@redhat.com> <87d1eqqlkv.fsf@vitty.brq.redhat.com> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 13 Feb 2017, Andy Lutomirski wrote: > On Sun, Feb 12, 2017 at 11:49 PM, 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. > >> > >> tglx > > > > 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. > > If the patch is correct, there is one of these shared by all vCPUs, so > this is not a sufficient explanation. Right, because that's ony ONE TSC page for the whole guest and then the seq stuff really lacks barriers. Thanks, tglx