Re: [PATCH v8 07/17] KVM: x86: Move "no master clock" fallback from __get_kvmclock() to get_kvmclock()
Sean Christopherson <[email protected]> Wed, 5 Aug 2026 08:17:51 -0700
| Newsgroups | dev.linux.lists.sashiko-reviews,org.kernel.vger.kvm |
|---|---|
| Message-ID | <[email protected]> |
On Tue, Aug 04, 2026, [email protected] wrote: > commit cb25993776f1881f5ff66de261984bd8992ceece > Author: Sean Christopherson <[email protected]> > > KVM: x86: Move "no master clock" fallback from __get_kvmclock() to get_kvmclock() > > This commit refactors the kvmclock retrieval logic by extracting the master > clock fallback out of the inner helper and changing it to return a boolean. > > > diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c > > index b520928579129..7366d4602f89f 100644 > > --- a/arch/x86/kvm/x86.c > > +++ b/arch/x86/kvm/x86.c > > [ ... ] > > > @@ -1667,8 +1673,6 @@ static void __get_kvmclock(struct kvm *kvm, struct kvm_clock_data *data) > > &hv_clock.tsc_shift, > > &hv_clock.tsc_to_system_mul); > > data->clock = __pvclock_read_cycles(&hv_clock, data->host_tsc); > > - } else { > > - data->clock = get_kvmclock_base_ns() + ka->kvmclock_offset; > > } > > } > > [Severity: High] > Does this function need to return true on the success path? Doh, yes. I botched the splitting and incorrectly added the "return true" in "KVM: x86: Wrap all of __get_kvmclock_master_clock() with CONFIG_X86_64=y". I'll fix, and properly compile test all patches (I did that before splitting the patch, but obviously not after).