Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp2501043imm; Wed, 3 Oct 2018 05:02:35 -0700 (PDT) X-Google-Smtp-Source: ACcGV630lYqm9EIUBUJfCOn461fWjMvPgw4K8X/ujRZezp1GRhcRhj0TOEP8IRWYX1Oaq93KYmIh X-Received: by 2002:a63:3642:: with SMTP id d63-v6mr1073310pga.404.1538568155330; Wed, 03 Oct 2018 05:02:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538568155; cv=none; d=google.com; s=arc-20160816; b=o17nzJ75XLtjTWFPvx/WpAElOown7Wl6VEUm3Lh6MXoml8h59+awKuBdpahLoSS2MC Sy8+Xos7iFaF6d63KcZ8gQowM23TVyMjYLmz5K/9REAsMZBvKR33phQHxBqWNspshh7+ OVrDGpyRVZ3KUiPjLEc38hMsiImPyp+YO8im6ll9N+V0kE7HrlcDL3rXMn+4qwuSGytk 6DKdYTLl1gDHrAFAP+VIjDzSYxeYsvb5GL5MaVCdVbchOUsbE0tfbyw0TFjlhqItbIJZ nES78hCy2/G0E5eoyp2eAM3FQ9+Usa80eVsTaykCJwr3nZiKH/P1uqJv1CElKo5AJ5Ux 87Mw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:references:in-reply-to:subject:cc:to:from; bh=2QIldSAr9Rxgo7GyP/w2ak2Mor9I3sHxtpgZuzPj0fA=; b=AyepyG15ZmRuJZ6Tv7Hn4vKpfJZiwDntYiVzDYY+y00trlbZ6cVDCDdHiuNYbdscjU 6On5Pe6PjcA34pJkS4G3qXuwYkllFtsnTlJhih02OFjkUTuXytiz0ab92rZ1p+7yuatC IA/SJxC9YXc+S++DYiCjcOc2DfX2ZJKGz3qnjrqd6IyO61BrGBCI+5svgsj29t0apkyh QT18qYW1k3rTCm89FufNW4eCRm3NRupx2eaI+VZMPY3QOs+R8UxtccmoKu/D2O31xLNV AZZKMJM+clSDpwa6K3tN1y8JaIt9zknxP+5YuWThYGTpptJJfhZC2MHzqrOCWOr8dFEs 3ZaA== 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 c17-v6si1045982pgc.158.2018.10.03.05.02.19; Wed, 03 Oct 2018 05:02:35 -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 S1727347AbeJCStv (ORCPT + 99 others); Wed, 3 Oct 2018 14:49:51 -0400 Received: from mx1.redhat.com ([209.132.183.28]:3223 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726943AbeJCStv (ORCPT ); Wed, 3 Oct 2018 14:49:51 -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 8CFEEC049E3A; Wed, 3 Oct 2018 12:01:44 +0000 (UTC) Received: from vitty.brq.redhat.com.redhat.com (unknown [10.43.2.58]) by smtp.corp.redhat.com (Postfix) with ESMTPS id BCEE420155E0; Wed, 3 Oct 2018 12:01:40 +0000 (UTC) From: Vitaly Kuznetsov To: Andy Lutomirski Cc: Andy Lutomirski , Thomas Gleixner , Marcelo Tosatti , Paolo Bonzini , Radim Krcmar , Wanpeng Li , LKML , X86 ML , Peter Zijlstra , 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 In-Reply-To: <4B6A97E1-17E6-40F2-A7A0-87731668A07C@amacapital.net> References: <20180914125006.349747096@linutronix.de> <87sh1ne64t.fsf@vitty.brq.redhat.com> <4B6A97E1-17E6-40F2-A7A0-87731668A07C@amacapital.net> Date: Wed, 03 Oct 2018 14:01:38 +0200 Message-ID: <87murvdysd.fsf@vitty.brq.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit 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.31]); Wed, 03 Oct 2018 12:01:45 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Andy Lutomirski writes: >> On Oct 3, 2018, at 2:22 AM, Vitaly Kuznetsov wrote: >> >> Andy Lutomirski writes: >> >>> Hi Vitaly, Paolo, Radim, etc., >>> >> The notification you're talking about exists, it is called >> Reenligntenment, see 0092e4346f49 "x86/kvm: Support Hyper-V >> reenlightenment"). When TSC page changes (and this only happens when L1 >> is migrated to a different host with a different TSC frequency and TSC >> scaling is not supported by the CPU) we receive an interrupt in L1 (at >> this moment all TSC accesses are emulated which guarantees the >> correctness of the readings), pause all L2 guests, update their kvmclock >> structures with new data (we already know the new TSC frequency) and >> then tell L0 that we're done and it can stop emulating TSC accesses. > > That’s delightful! Does the emulation magic also work for L1 user > mode? As far as I understand - yes, all rdtsc* calls will trap into L0. > If so, couldn’t we drop the HyperV vclock entirely and just > fold the adjustment into the core timekeeping data? (Preferably the > actual core data, which would require core changes, but it could > plausibly be done in arch code, too.) Not all Hyper-V hosts support reenlightenment notifications (and, if I'm not mistaken, you need to enable nesting for the VM to get the feature - and most VMs don't have this) so I think we'll have to keep Hyper-V vclock for the time being. -- Vitaly