Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp4931290pxu; Thu, 10 Dec 2020 08:46:33 -0800 (PST) X-Google-Smtp-Source: ABdhPJzx9fhnP1J49pZWn30oHybE4SQ4HPrahXhyeojaWLdn3KJV2odkhCUfcgX/D9UxGXwcTg/K X-Received: by 2002:a50:8a44:: with SMTP id i62mr7554745edi.97.1607618793527; Thu, 10 Dec 2020 08:46:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607618793; cv=none; d=google.com; s=arc-20160816; b=GpRiFzEHlvpImww742v/N7mYpoIG7ORpR2b7hafJ/BldWi7tvRvVqmD211NAbumCOD M+rChj3Z6HdzXzsMfstgBFdtysrhZG3qqtZMDOgJRlj7UqTUiKm9uDwHN18tQ4mc4d3S 2ZYwokYSA3Wz0/HxcrjD1wfn9xgY9SsbktIraGbQw3aYMFXiE46kguiyqD2U3fDX+lUm DhMIdGXoxfgg2XUsyrFel+8P8wN26gyYhla1DnpLHcdJ84PZkLing8bw/64pcXLDnyG7 T3btfk6Hgxh1bMYhatkYy11dwTZYrFTdKbKil2B8P2A/QMer6afAs+RU4ASfSJxDVH77 HVxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=2N89GAWJh2oijgPtEoE6/Kndq4JEGomfZWV0U25Lc9I=; b=V6H7M6FczjAKaGcALhJRb6JQ/zpG5EPzXJQuBy6A1+Z2EP/rR6g2KQe7F3ABI74yQ/ BfnTsnJ4UIjBwGHto4BYGr5jQXQAAFD8LsEZoCnwTroklQYRsxf7GirvP9u4Lb77eP3+ AFPnoe4HSHil+LIJ1iACiyrRFUsO5qfM/ZJyF9nIWYf68YYdYKGumTG8sdd2wl5OkUaZ Da3JP/5Kz6JK39tO1E0E0h9g3G1T0Ii0rUv6Xg57eLfxMryu2BhjGEDlZJHn01DzXndY nOPGPeaksmy6cDnex67QYY+kXZbSyAKozJk4XD0qLsC4uTb45t2y3/7pWjvhdUjnNfpI PK4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Ux4n3MQu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k2si3127850edf.160.2020.12.10.08.45.57; Thu, 10 Dec 2020 08:46:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Ux4n3MQu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2392395AbgLJQmN (ORCPT + 99 others); Thu, 10 Dec 2020 11:42:13 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:54588 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2392386AbgLJQmF (ORCPT ); Thu, 10 Dec 2020 11:42:05 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1607618438; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=2N89GAWJh2oijgPtEoE6/Kndq4JEGomfZWV0U25Lc9I=; b=Ux4n3MQu2Qn+QLjfNCABYRc6/JHIv9NE7dLEGjiJISq/ghZt5IfzHOPfGBbZs6XQnIO93m 76pZyDS/YLboXB+jfv6a7DyIduR4F9GXux5B5w9PVYv645IKH9/nOGB0W2nNMpqG6d1bJr 5DBtld3B+BvF/Ol8DUkPgwOUsBmEqUI= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-321-q2wahnQyOFCzTISxvSExEQ-1; Thu, 10 Dec 2020 11:40:35 -0500 X-MC-Unique: q2wahnQyOFCzTISxvSExEQ-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 08BA8107ACE4; Thu, 10 Dec 2020 16:40:31 +0000 (UTC) Received: from fuller.cnet (ovpn-112-7.gru2.redhat.com [10.97.112.7]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3C95319718; Thu, 10 Dec 2020 16:40:30 +0000 (UTC) Received: by fuller.cnet (Postfix, from userid 1000) id CC8E441853FD; Thu, 10 Dec 2020 12:26:18 -0300 (-03) Date: Thu, 10 Dec 2020 12:26:18 -0300 From: Marcelo Tosatti To: Thomas Gleixner Cc: Maxim Levitsky , kvm@vger.kernel.org, "H. Peter Anvin" , Paolo Bonzini , Jonathan Corbet , Jim Mattson , Wanpeng Li , "open list:KERNEL SELFTEST FRAMEWORK" , Vitaly Kuznetsov , Sean Christopherson , open list , Ingo Molnar , "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" , Joerg Roedel , Borislav Petkov , Shuah Khan , Andrew Jones , Oliver Upton , "open list:DOCUMENTATION" Subject: Re: [PATCH v2 1/3] KVM: x86: implement KVM_{GET|SET}_TSC_STATE Message-ID: <20201210152618.GB23951@fuller.cnet> References: <20201203171118.372391-1-mlevitsk@redhat.com> <20201203171118.372391-2-mlevitsk@redhat.com> <20201207232920.GD27492@fuller.cnet> <05aaabedd4aac7d3bce81d338988108885a19d29.camel@redhat.com> <87sg8g2sn4.fsf@nanos.tec.linutronix.de> <20201208181107.GA31442@fuller.cnet> <875z5c2db8.fsf@nanos.tec.linutronix.de> <20201209163434.GA22851@fuller.cnet> <87r1nyzogg.fsf@nanos.tec.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87r1nyzogg.fsf@nanos.tec.linutronix.de> User-Agent: Mutt/1.10.1 (2018-07-13) X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Dec 09, 2020 at 09:58:23PM +0100, Thomas Gleixner wrote: > Marcelo, > > On Wed, Dec 09 2020 at 13:34, Marcelo Tosatti wrote: > > On Tue, Dec 08, 2020 at 10:33:15PM +0100, Thomas Gleixner wrote: > >> On Tue, Dec 08 2020 at 15:11, Marcelo Tosatti wrote: > >> > max_cycles overflow. Sent a message to Maxim describing it. > >> > >> Truly helpful. Why the hell did you not talk to me when you ran into > >> that the first time? > > > > Because > > > > 1) Users wanted CLOCK_BOOTTIME to stop counting while the VM > > is paused (so we wanted to stop guest clock when VM is paused anyway). > > How is that supposed to work w/o the guest kernels help if you have to > keep clock realtime up to date? Upon VM resume, we notify NTP daemon in the guest to sync realtime clock. > > > 2) The solution to inject NMIs to the guest seemed overly > > complicated. > > Why do you need NMIs? > > All you need is a way to communicate to the guest that it should prepare > for clock madness to happen. Whether that's an IPI or a bit in a > hyperpage which gets checked during the update of the guest timekeeping > does not matter at all. > > But you certainly do not need an NMI because there is nothing useful you > can do within an NMI. > > Thanks, > > tglx