Re: [PATCH v7] KVM: x86/tsc: Don't sync user-written TSC against startup values

From: David Woodhouse
Date: Tue Oct 10 2023 - 06:04:09 EST




On 10 October 2023 01:44:32 BST, Sean Christopherson <seanjc@xxxxxxxxxx> wrote:
>On Sun, 08 Oct 2023 10:53:35 +0800, Like Xu wrote:
>> The legacy API for setting the TSC is fundamentally broken, and only
>> allows userspace to set a TSC "now", without any way to account for
>> time lost to preemption between the calculation of the value, and the
>> kernel eventually handling the ioctl.
>>
>> To work around this we have had a hack which, if a TSC is set with a
>> value which is within a second's worth of a previous vCPU, assumes that
>> userspace actually intended them to be in sync and adjusts the newly-
>> written TSC value accordingly.
>>
>> [...]
>
>Applied to kvm-x86 misc, thanks! I massaged away most of the pronouns in the
>changelog. Yes, they bug me that much, and I genuinely had a hard time following
>some of the paragraphs even though I already knew what the patch is doing.
>
>Everyone, please take a look and make sure I didn't botch anything. I tried my
>best to keep the existing "voice" and tone of the changelog (sans pronouns
>obviously). I definitely don't want to bikeshed this thing any further. If
>I've learned anything by this patch, it's that the only guaranteed outcome of
>changelog-by-committee is that no one will walk away 100% happy :-)

LGTM. I forgive you for not respecting my pronouns. :)

Thanks.