linux-coco.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: "kirill.shutemov@linux.intel.com" <kirill.shutemov@linux.intel.com>
To: "Huang, Kai" <kai.huang@intel.com>
Cc: "tglx@linutronix.de" <tglx@linutronix.de>,
	"Hansen, Dave" <dave.hansen@intel.com>,
	"Lutomirski, Andy" <luto@kernel.org>,
	"bp@alien8.de" <bp@alien8.de>,
	"sathyanarayanan.kuppuswamy@linux.intel.com"
	<sathyanarayanan.kuppuswamy@linux.intel.com>,
	"Reshetova, Elena" <elena.reshetova@intel.com>,
	"linux-coco@lists.linux.dev" <linux-coco@lists.linux.dev>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"Nakajima, Jun" <jun.nakajima@intel.com>,
	"x86@kernel.org" <x86@kernel.org>
Subject: Re: [PATCHv2] x86/tdx: Mark TSC reliable
Date: Wed, 23 Aug 2023 14:11:44 +0300	[thread overview]
Message-ID: <20230823111144.x7g3cvbxjenldnih@box.shutemov.name> (raw)
In-Reply-To: <f5dc2de9d3997c3a89bdedee6cb0bf554f400ccc.camel@intel.com>

On Wed, Aug 23, 2023 at 04:47:29AM +0000, Huang, Kai wrote:
> On Wed, 2023-08-23 at 02:18 +0300, Kirill A. Shutemov wrote:
> > In x86 virtualization environments, including TDX, RDTSC instruction is
> > handled without causing a VM exit, resulting in minimal overhead and
> > jitters. On the other hand, other clock sources (such as HPET, ACPI
> > timer, APIC, etc.) necessitate VM exits to implement, resulting in more
> > fluctuating measurements compared to TSC. Thus, those clock sources are
> > not effective for calibrating TSC.
> > 
> > In TD guests, TSC is virtualized by the TDX module, which ensures:
> > 
> >   - Virtual TSC values are consistent among all the TD’s VCPUs;
> >   - Monotonously incrementing for any single VCPU;
> 
> Nit:
> 
>     - Virtual TSC is monotonously incrementing ...
> 
> Otherwise here "incrementing" looks like a noun, which means you need to use
> "monotonous" rather than "monotonously".

Okay, will update.

> >   - The frequency is determined by TD configuration. The host TSC is
> >     invariant on platforms where TDX is available.
> > 
> > Reliable TSC is architectural guarantee for the TDX platform and it must
> > work for any sane TDX implementation.
> > 
> > Use TSC as the only reliable clock source in TD guests, bypassing
> > unstable calibration.
> > 
> > Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
> 
> Acked-by: Kai Huang <kai.huang@intel.com>

Thanks.

-- 
  Kiryl Shutsemau / Kirill A. Shutemov

  reply	other threads:[~2023-08-23 11:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-22 23:18 [PATCHv2] x86/tdx: Mark TSC reliable Kirill A. Shutemov
2023-08-22 23:46 ` Kuppuswamy Sathyanarayanan
2023-08-23  4:47 ` Huang, Kai
2023-08-23 11:11   ` kirill.shutemov [this message]
2023-08-23 18:50 ` Isaku Yamahata

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230823111144.x7g3cvbxjenldnih@box.shutemov.name \
    --to=kirill.shutemov@linux.intel.com \
    --cc=bp@alien8.de \
    --cc=dave.hansen@intel.com \
    --cc=elena.reshetova@intel.com \
    --cc=jun.nakajima@intel.com \
    --cc=kai.huang@intel.com \
    --cc=linux-coco@lists.linux.dev \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=sathyanarayanan.kuppuswamy@linux.intel.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).