Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp1916637imm; Sat, 6 Oct 2018 13:29:27 -0700 (PDT) X-Google-Smtp-Source: ACcGV61t5g0x+krWJylOzu1mBwwj3QfLnOvzA6FPfudDTAY7tbDKNSbELd0OxU4Ij98I9wekJvNk X-Received: by 2002:a63:124b:: with SMTP id 11-v6mr15119122pgs.299.1538857767939; Sat, 06 Oct 2018 13:29:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538857767; cv=none; d=google.com; s=arc-20160816; b=Q399BBwm23mbpriUZ/811Vgp0Bqpkn8eZYHeMVQ0t6KKcUDCjHXUEPskh9i/nuk7Tl kFqpMvVROI3aEQ4qao/J7itLgBOQqW1zm/L+YtXfOd5D6Qn72FX1QHeren3ZAkpgeAJ0 CCux1JB/W1v2X1j6WPLkKjH+U4FU5cVQ5ebVelqdtSwTt/UWfn4M09nndrJaRd3Hu+51 vJgD+5r8obbJvqffaWM++M80dm+DYjtd3r/PwvPwWQgJZnTOIaj8k7aTwxJ6rzdv3hT6 a+tSprqNpWXyGCvRdvNKxgNhktQMeEV2x57D2qXC9Ph6ogmQxF5za++E+gpnCBIDD8Wu D3Aw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=3AtRn53H0W4kuyfVn3J+NWXQPsktDWVdXACHJldG7eM=; b=P/i5aMngMS0OIcVh21StsmtRl4w8tZiI8cZ5mFOKet+BJvnvDeXWxSmH/gOhMDR8in 7KWnlF7Jr81UDvOly9TlPPdjQt2DzqxCUzHrqk1mjDongxpLf2vVV6fTDHw5IQIpKpyH 0YGIGiMnvT+XjuRPgZEPjNZDH88RggQ6b0nMiSJSC1TkNcq9XS++urVOHJBaip68GiOv jzQwJYIQ7OwjLc3rZbPEoF7XriRZWCxVz6gwvSFt/uGC/hetwtxFQVCIadmqReA7RG6p TYHmhimA4qW4ADtWdImKqIiNaA7j/qhqLk3DVEsBYdM/py9VWffN1GZ00eqr4QIS8VCn Q2pw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 97-v6si12764305plc.30.2018.10.06.13.29.12; Sat, 06 Oct 2018 13:29:27 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727945AbeJGDds (ORCPT + 99 others); Sat, 6 Oct 2018 23:33:48 -0400 Received: from mx1.redhat.com ([209.132.183.28]:50552 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726573AbeJGDds (ORCPT ); Sat, 6 Oct 2018 23:33:48 -0400 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.25]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6F8B5308AA0F; Sat, 6 Oct 2018 20:29:07 +0000 (UTC) Received: from amt.cnet (ovpn-112-2.gru2.redhat.com [10.97.112.2]) by smtp.corp.redhat.com (Postfix) with ESMTP id CB15A2010D11; Sat, 6 Oct 2018 20:29:06 +0000 (UTC) Received: from amt.cnet (localhost [127.0.0.1]) by amt.cnet (Postfix) with ESMTP id 5C548105146; Sat, 6 Oct 2018 17:27:48 -0300 (BRT) Received: (from marcelo@localhost) by amt.cnet (8.14.7/8.14.7/Submit) id w96KRXi7026530; Sat, 6 Oct 2018 17:27:33 -0300 Date: Sat, 6 Oct 2018 17:27:33 -0300 From: Marcelo Tosatti To: Andy Lutomirski Cc: Peter Zijlstra , Vitaly Kuznetsov , Thomas Gleixner , Paolo Bonzini , Radim Krcmar , Wanpeng Li , LKML , X86 ML , Matt Rickard , Stephen Boyd , John Stultz , Florian Weimer , KY Srinivasan , devel@linuxdriverproject.org, Linux Virtualization , Arnd Bergmann , Juergen Gross Subject: Re: [patch 00/11] x86/vdso: Cleanups, simmplifications and CLOCK_TAI support Message-ID: <20181006202731.GC7129@amt.cnet> References: <20180914125006.349747096@linutronix.de> <87sh1ne64t.fsf@vitty.brq.redhat.com> <20181003190617.GC21381@amt.cnet> <87k1mycfju.fsf@vitty.brq.redhat.com> <20181004081100.GI19272@hirez.programming.kicks-ass.net> <20181004193150.GQ19272@hirez.programming.kicks-ass.net> <499807AB-E779-40C3-AA3F-E8C77A7770EC@amacapital.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Scanned-By: MIMEDefang 2.84 on 10.5.11.25 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.41]); Sat, 06 Oct 2018 20:29:07 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Oct 04, 2018 at 03:15:32PM -0700, Andy Lutomirski wrote: > For better or for worse, I'm trying to understand this code. So far, > I've come up with this patch: > > https://git.kernel.org/pub/scm/linux/kernel/git/luto/linux.git/commit/?h=x86/vdso-tglx&id=14fd71e12b1c4492a06f368f75041f263e6862bf > > Is it correct, or am I missing some subtlety? The master clock, when initialized, has a pair masterclockvalues=(TSC value, time-of-day data). When updating the guest clock, we only update relative to (TSC value) that was read on masterclock initialization. See the following comment on x86.c: /* * * Assuming a stable TSC across physical CPUS, and a stable TSC * across virtual CPUs, the following condition is possible. * Each numbered line represents an event visible to both * CPUs at the next numbered event. ... When updating the "masterclockvalues" pair, all vcpus are stopped.