Re: [PATCH] x86/tdx: Mark TSC reliable
From: Thomas Gleixner
Date: Fri Aug 25 2023 - 13:10:19 EST
On Fri, Aug 25 2023 at 16:52, Kirill A. Shutemov wrote:
> On Thu, Aug 24, 2023 at 05:49:05PM +0200, Thomas Gleixner wrote:
>> On Tue, Aug 08 2023 at 23:01, Kirill A. Shutemov wrote:
>> > On Tue, Aug 08, 2023 at 10:13:05AM -0700, Dave Hansen wrote:
>> >> I take it this is carved in stone in the TDX specs somewhere. A
>> >> reference would be nice.
>> >
>> > TDX Module 1.0 spec:
>> >
>> > 5.3.5. Time Stamp Counter (TSC)
>> >
>> > TDX provides a trusted virtual TSC to the guest TDs. TSC value is
>> > monotonously incrementing, starting from 0 on TD initialization by the
>> > host VMM. The deviation between virtual TSC values read by each VCPU is
>> > small.
>>
>> Nice weasel wording. What's the definition of "small"?
>
> The newer spec says "Virtual TSC values are consistent among all the TD’s
> VCPUs at the level supported by the CPU".
That means what? It's not a guarantee for consistency either. :(