Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp424716pxu; Thu, 3 Dec 2020 03:56:06 -0800 (PST) X-Google-Smtp-Source: ABdhPJwpVZySL45R0Q/AC8LeLwjegxQzLI4dUWjZY7/PvAQB2PLY9bqE7LLYidbzDAqk7mD6fqLo X-Received: by 2002:a17:906:3712:: with SMTP id d18mr2234393ejc.178.1606996566726; Thu, 03 Dec 2020 03:56:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606996566; cv=none; d=google.com; s=arc-20160816; b=P6Q5TgwH61oO4DyQNjTBLZKMq2te+qiycQ6FGez8YfZxdnkR6INJskIkjN8ZLDbfrb rNDTpFCrTvmUKdqkfoPTPbXjWF5sigwatQmiugt0sw7ibvZ4CpDIAqqi4m5r6M2Y01Yy sVayl2sdl9WENkXa5Vb5mriFI6+pCcLOvOIKvG1HQl1YkhE9M8LtPFmoBc+TKkNSNOXy bHfZNHvaBKhhzpht21jkKroDb9s6fg5vwca77GYEtyB5lEAB0OsK54xsLoeA/bR47IFa FW62RC3PMSp3m9r4TewLTW0N3+qZ/q+WdHkt6h+g5AkCBkzA5TG/zinTRUAqfBVlCNPq 2ooA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id:dkim-signature; bh=ScdhfDhjAuXu+GH71ihpEjaoSfXwj3jq1ZQT+u4Lu1w=; b=xb3hFnK+kmuwgvworEWECIR0Y7Oj8EpdOwxd1ZK5WuMDvF34ZUu3rRKkNykC4zF/jc CIYswnqfAxuXb9Jbnow1abtqz3tlXUVV5SPDVrogG5XaLUrkiCVSSUqc+wPNH+WXDJDF qHLZEnAl9iSD2w88CXeKtlaVtTCf/YuXJFrGbqV88T7Mwr5S/Fp94LVAzCsHnzwZLkSL 5vxI89vaaoevPcAw7qZzEELXac/lrsh5pCeqlm1chysM6dx/3fKAI80ZvSXFFB7DnUIb VClWqxFhblZ05TTnNgyHUneC0CA92Dnis00Hl3wzJFBc5incLmD1WRc+FOiQuN2+4Ont UJ8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ClVFEh3R; 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 f5si913655ejd.332.2020.12.03.03.55.42; Thu, 03 Dec 2020 03:56:06 -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=ClVFEh3R; 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 S1727012AbgLCLw6 (ORCPT + 99 others); Thu, 3 Dec 2020 06:52:58 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:58938 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729184AbgLCLw6 (ORCPT ); Thu, 3 Dec 2020 06:52:58 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1606996292; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ScdhfDhjAuXu+GH71ihpEjaoSfXwj3jq1ZQT+u4Lu1w=; b=ClVFEh3R8i/QQKO/+/Vq7bnll4hrplARIiIXE/QBcGxZPy7kcOPKOu+jFiGY05tmMzrtfQ vaaG0SaQ4UDq7DD2GKWy2KEUERwFb74Y7I+SIbDh8i43cTgXP924rfANMRnBhwkrI5Yz8E kreUzOj8CU/I9OnIJvN9xSwO9DDKMC4= 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-142-PhTLFyMHNrWoWeCpjN9RLA-1; Thu, 03 Dec 2020 06:51:28 -0500 X-MC-Unique: PhTLFyMHNrWoWeCpjN9RLA-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id D192219357A8; Thu, 3 Dec 2020 11:51:25 +0000 (UTC) Received: from starship (unknown [10.35.206.228]) by smtp.corp.redhat.com (Postfix) with ESMTP id AAC6860BFA; Thu, 3 Dec 2020 11:51:19 +0000 (UTC) Message-ID: <77e48fe09de55fa77a9e33a2c6212e42c83556be.camel@redhat.com> Subject: Re: [PATCH 0/2] RFC: Precise TSC migration From: Maxim Levitsky To: Marcelo Tosatti , Thomas Gleixner Cc: kvm@vger.kernel.org, Paolo Bonzini , Oliver Upton , Ingo Molnar , Sean Christopherson , open list , Jonathan Corbet , Wanpeng Li , Borislav Petkov , Jim Mattson , "H. Peter Anvin" , "open list:DOCUMENTATION" , Joerg Roedel , "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" , Vitaly Kuznetsov Date: Thu, 03 Dec 2020 13:51:18 +0200 In-Reply-To: <20201201150205.GA42117@fuller.cnet> References: <20201130133559.233242-1-mlevitsk@redhat.com> <20201130191643.GA18861@fuller.cnet> <877dq1hc2s.fsf@nanos.tec.linutronix.de> <20201201150205.GA42117@fuller.cnet> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.36.3 (3.36.3-1.fc32) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2020-12-01 at 12:02 -0300, Marcelo Tosatti wrote: > On Tue, Dec 01, 2020 at 02:48:11PM +0100, Thomas Gleixner wrote: > > On Mon, Nov 30 2020 at 16:16, Marcelo Tosatti wrote: > > > > Besides, Linux guests don't sync the TSC via IA32_TSC write, > > > > but rather use IA32_TSC_ADJUST which currently doesn't participate > > > > in the tsc sync heruistics. > > > > > > Linux should not try to sync the TSC with IA32_TSC_ADJUST. It expects > > > the BIOS to boot with synced TSCs. > > > > That's wishful thinking. > > > > Reality is that BIOS tinkerers fail to get it right. TSC_ADJUST allows > > us to undo the wreckage they create. > > > > Thanks, > > > > tglx > > Have not seen any multicore Dell/HP systems require that. > > Anyway, for QEMU/KVM it should be synced (unless there is a bug > in the sync logic in the first place). > I agree with that, and that is why I suggested to make the guest avoid TSC syncing when KVM is detected. I don't mind how to implement this. It can be either done with new CPUID bit, or always when KVM is detected, (or even when *any* hypervisor is detected) I also don't mind if we only disable tsc sync logic or set X86_FEATURE_TSC_RELIABLE which will disable it and the clocksource watchdog. Best regards, Maxim Levitsky