From: Like Xu <like.xu.linux@gmail.com>
To: Sean Christopherson <seanjc@google.com>,
David Woodhouse <dwmw2@infradead.org>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
Oliver Upton <oliver.upton@linux.dev>,
kvm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4] KVM: x86/tsc: Don't sync user changes to TSC with KVM-initiated change
Date: Thu, 14 Sep 2023 11:24:35 +0800 [thread overview]
Message-ID: <de4b831a-6649-2462-e4cf-fcefa6e912be@gmail.com> (raw)
In-Reply-To: <814044c62f8804866a6dc4c523797c06d73c82f1.camel@infradead.org>
On 13/9/2023 11:24 pm, David Woodhouse wrote:
> On Wed, 2023-09-13 at 15:15 +0000, Sean Christopherson wrote:
>>>> e.g. if userspace writes '0' immediately after creating, and then later writes a
>>>> small delta, the v6 code wouldn't trigger synchronization because "user_set_tsc"
>>>> would be left unseft by the write of '0'.
>>>
>>> True, but that's the existing behaviour,
>>
>> No? The existing code will fall into the "conditionally sync" logic for any
>> non-zero value.
>
> Yeah, OK. This isn't one of the cases we set out to deliberately
> change, but it would be changed by v6 of the patch, and I suppose
> you're right that we should accept a small amount of extra code
> complexity just to avoid making any changes we don't *need* to, even
> for stupid cases like this.
>
>
>> I don't care (in the Tommy Lee Jones[*] sense). All I care about is minimizing
>> the probability of breaking userspace, which means making the smallest possible
>> change to KVM's ABI. For me, whether or not userspace is doing something sensible
>> doesn't factor into that equation.
>
> Ack.
If we combine the v5 code diff (the u64 *user_value proposal) with the refined
changelog in v6,
it seems like we've reached a point of equilibrium on this issue, doesn't it ?
Please let me know you have more concerns.
>
> Although there's a strong argument that adding further warts to an
> already fundamentally broken API probably isn't a great idea in the
> first place. Just deprecate it and use the saner replacement API...
> which I just realised we don't have (qv). Ooops :)
>
prev parent reply other threads:[~2023-09-14 3:24 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-01 3:45 [PATCH v4] KVM: x86/tsc: Don't sync user changes to TSC with KVM-initiated change Like Xu
2023-08-11 22:59 ` Sean Christopherson
2023-09-13 8:10 ` David Woodhouse
2023-09-13 8:41 ` Like Xu
2023-09-13 8:44 ` David Woodhouse
2023-09-13 8:31 ` David Woodhouse
2023-09-13 14:50 ` Sean Christopherson
2023-09-13 15:05 ` David Woodhouse
2023-09-13 15:15 ` Sean Christopherson
2023-09-13 15:24 ` David Woodhouse
2023-09-14 3:24 ` Like Xu [this message]
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=de4b831a-6649-2462-e4cf-fcefa6e912be@gmail.com \
--to=like.xu.linux@gmail.com \
--cc=dwmw2@infradead.org \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=oliver.upton@linux.dev \
--cc=pbonzini@redhat.com \
--cc=seanjc@google.com \
/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