[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v7 31/36] KVM: x86: Add KVM_[GS]ET_CLOCK_GUEST for accurate KVM clock migration
- To: Sean Christopherson <seanjc@xxxxxxxxxx>
- From: David Woodhouse <dwmw2@xxxxxxxxxxxxx>
- Date: Sat, 01 Aug 2026 09:07:46 +0100
- Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=casper.20170209 header.d=infradead.org header.i="@infradead.org" header.h="MIME-Version:Content-Type:References:In-Reply-To:Date:Cc:To:From:Subject:Message-ID"
- Cc: Paolo Bonzini <pbonzini@xxxxxxxxxx>, Jonathan Corbet <corbet@xxxxxxx>, Shuah Khan <skhan@xxxxxxxxxxxxxxxxxxx>, Thomas Gleixner <tglx@xxxxxxxxxx>, Ingo Molnar <mingo@xxxxxxxxxx>, Borislav Petkov <bp@xxxxxxxxx>, Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>, x86@xxxxxxxxxx, "H. Peter Anvin" <hpa@xxxxxxxxx>, Vitaly Kuznetsov <vkuznets@xxxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>, Paul Durrant <paul@xxxxxxx>, Jonathan Cameron <jic23@xxxxxxxxxx>, Sascha Bischoff <Sascha.Bischoff@xxxxxxx>, Marc Zyngier <maz@xxxxxxxxxx>, Joey Gouly <joey.gouly@xxxxxxx>, Jack Allister <jalliste@xxxxxxxxxx>, Dongli Zhang <dongli.zhang@xxxxxxxxxx>, joe.jin@xxxxxxxxxx, kvm@xxxxxxxxxxxxxxx, linux-doc@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx, linux-kselftest@xxxxxxxxxxxxxxx
- Delivery-date: Sat, 01 Aug 2026 08:08:29 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On Fri, 2026-07-31 at 16:24 -0700, Sean Christopherson wrote:
>
> > + /*
> > + * Allow for a discrepancy of 1 kHz either way between the TSC
> > + * frequency used to generate the user's pvclock and the current
> > + * host's measured frequency, since they may not precisely match.
> > + */
> > + if (user_tsc_hz < curr_tsc_hz - 1000 ||
> > + user_tsc_hz > curr_tsc_hz + 1000) {
>
> I don't follow, why is KVM restricting what frequency userspace can set?
Userspace actually sets the frequency with KVM_SET_TSC_KHZ. What KVM is
insisting upon here is that the input to KVM_SET_CLOCK_GUEST is
*consistent* with the guest's TSC frequency (within a little slop
caused by different host TSCs).
I think the comment above it is fairly badly worded though ("host's
measured frequency"), so I'll fix that.
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
|