[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230823111144.x7g3cvbxjenldnih@box.shutemov.name>
Date: Wed, 23 Aug 2023 14:11:44 +0300
From: "kirill.shutemov@...ux.intel.com" <kirill.shutemov@...ux.intel.com>
To: "Huang, Kai" <kai.huang@...el.com>
Cc: "tglx@...utronix.de" <tglx@...utronix.de>,
"Hansen, Dave" <dave.hansen@...el.com>,
"Lutomirski, Andy" <luto@...nel.org>,
"bp@...en8.de" <bp@...en8.de>,
"sathyanarayanan.kuppuswamy@...ux.intel.com"
<sathyanarayanan.kuppuswamy@...ux.intel.com>,
"Reshetova, Elena" <elena.reshetova@...el.com>,
"linux-coco@...ts.linux.dev" <linux-coco@...ts.linux.dev>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"Nakajima, Jun" <jun.nakajima@...el.com>,
"x86@...nel.org" <x86@...nel.org>
Subject: Re: [PATCHv2] x86/tdx: Mark TSC reliable
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@...ux.intel.com>
>
> Acked-by: Kai Huang <kai.huang@...el.com>
Thanks.
--
Kiryl Shutsemau / Kirill A. Shutemov
Powered by blists - more mailing lists