Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp67557imu; Wed, 12 Dec 2018 12:31:44 -0800 (PST) X-Google-Smtp-Source: AFSGD/VNCia+WU0HKTKjPY/WpIwYpKXg21C06/DLMPQBbblZlwgrl+4mCupa6gyV8gFb1gpt7U4Y X-Received: by 2002:a62:d2c1:: with SMTP id c184mr21754243pfg.248.1544646704316; Wed, 12 Dec 2018 12:31:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544646704; cv=none; d=google.com; s=arc-20160816; b=Yv1PsWxrTwcuKqjFy+3WYYhBwb/vol6U93gLTTmBnn4GWsavC4OTNZTv1rBpFp6F9n 8/FYKzXjTNcowN2D6qX82A9MIxdfPT/phKMNKUupa6QjH//Q2M/pVIsn19n73E23nP/w GrWojtkBd/1LYB4SYGrrLOYjv7gfxB09q6lLzl6e9UTVVQ838hjtsyVvIC7xJ6OsIw3r nY1dZPEvcg/FJagBbWEAH4NM9mp6mHETVHrf0jJzauqseFGVjdzAs2qlMT29yiKxWEoX yKAiR8xCfKEHkGDzqxTmYGMwNWFe4EC9GnM1IOx2XvmwXMn2EoUpz/wLexh8orasUMg3 mTAQ== 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:dkim-signature; bh=ggmE/5lvHT18ASZGhoGLrs+s6sE8u4CFLciXoiKkWw4=; b=ckZ/sZe5SttPa+JRgAUjN8f+37KSHK/Y7LOibjOiIOo95C4R0uL9MjG3yDfR+WPKNK 7rennpku/KTmWj3M+RdS7fAyDSpReOiY5V98d79TEaUQHrepS51hW+5ZUCKVEbZLHHa9 UgxaRomutJ9iE/Ga5yKCBFWo822l6p4/ChB0D/58YtkxUlQOb9ItgP3GlcSowGPBNQv8 lsKWZY9JLZ4oibZqhcHKp7j2HmyAWgKn7bYrUPof226hK9Uy5eZygkUz6z6U33fmp9gj Jm/v1ZJY3zm9TP6jmydDtcGOZkLzpCBKB4Y64/6ghpM5wlKyT1eYY+GKXCaTTwMip7XP MZ1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=D96pbrvl; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=alien8.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c16si15243313plo.270.2018.12.12.12.31.27; Wed, 12 Dec 2018 12:31:44 -0800 (PST) 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; dkim=pass header.i=@alien8.de header.s=dkim header.b=D96pbrvl; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727491AbeLLU34 (ORCPT + 99 others); Wed, 12 Dec 2018 15:29:56 -0500 Received: from mail.skyhub.de ([5.9.137.197]:38746 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726248AbeLLU34 (ORCPT ); Wed, 12 Dec 2018 15:29:56 -0500 Received: from zn.tnic (p200300EC2BCDD800543C0EB17EF60A9B.dip0.t-ipconnect.de [IPv6:2003:ec:2bcd:d800:543c:eb1:7ef6:a9b]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 100951EC096B; Wed, 12 Dec 2018 21:29:54 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1544646594; 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:in-reply-to:in-reply-to: references:references; bh=ggmE/5lvHT18ASZGhoGLrs+s6sE8u4CFLciXoiKkWw4=; b=D96pbrvlbkg26pDKDjIkrByfsqAgwsPIAQvEwit0vvQ243Pf0DnhB6Zt6OcRiB6TAQvU99 8RRxI2MmpH2qFTTPgANIEx+OWauOz/K3iuZKnIrYRwElf5VbC7WvtwVM/Sy9slxB333o+S ubBJKQJcDd8GUdxsLVJkl1/6bXnaZvg= Date: Wed, 12 Dec 2018 21:29:45 +0100 From: Borislav Petkov To: Andy Lutomirski Cc: Tom Lendacky , LKML , X86 ML , "H. Peter Anvin" , Josh Poimboeuf , Peter Zijlstra , John Stultz Subject: Re: [RFC PATCH 4/4] x86/TSC: Use RDTSCP Message-ID: <20181212202945.GH6653@zn.tnic> References: <59aad362-4a5b-dd8b-642f-0dc3f83cf7ee@amd.com> <20181211233901.GV27375@zn.tnic> <20181212100814.GB6653@zn.tnic> <20181212184459.GE6653@zn.tnic> <20181212200005.GF6653@zn.tnic> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Dec 12, 2018 at 12:09:00PM -0800, Andy Lutomirski wrote: > Also that the uarch doesn't turn: > > LFENCE > RDTSC > load some memory > > into a load followed a cycle later by RDTSC. If that happened, then > some cooperating CPUs could observe time going backwards. How so? Details? Because I wouldn't be surprised at all if the logical CPUs on the same node would see actually the same timestamp counter which is propagated from the northbridge into the cores instead of maintaining it in each core and having to synchronize it periodically. But maybe you mean something completely different... > But RDTSC has no dependencies, so, barring odd register renaming > effects or similar, this isn't going to be a problem in practice. Did you talk to hw guys about it? Because I don't see anything blocking the CPU from reordering those... -- Regards/Gruss, Boris. Good mailing practices for 400: avoid top-posting and trim the reply.