Re: [PATCH v6 08/36] KVM: x86: Activate master clock immediately on vCPU creation

David Woodhouse <[email protected]>
Newsgroups org.xenproject.lists.xen-devel,org.kernel.vger.kvm,org.kernel.vger.linux-doc,org.kernel.vger.linux-kernel,org.kernel.vger.linux-kselftest
Message-ID <[email protected]>
On Sat, 2026-07-25 at 08:59 +0100, David Woodhouse wrote:
> 
> > Any reason this can't be?
> > 
> >  	if (kvm_check_request(KVM_REQ_MASTERCLOCK_UPDATE, vcpu))
> >  		kvm_update_masterclock(vcpu->kvm);
> > 
> > > +		kvm_update_masterclock(vcpu->kvm);
> > 
> > I don't love doing work outside of KVM_RUN that is typically handled by KVM_RUN,
> > but this seems fine?
> 
> I think I tried that first and it didn't work because
> KVM_REQ_MASTERCLOCK_UPDATE wasn't actually set yet. I remember going
> round in circles a few times here. I'll take another look.
> 

On the other hand... I rip it out in patch 36 anyway, in favour of the
cleaner answer that is available once I've cleaned up the rest of the
masterclock stuff.

But I wanted this to be earlier in the series as it does fix things for
the selftests which get introduced along the way. Otherwise we have to
run the vCPU once to set the clocks up.
smime.p7s (application/pkcs7-signature, 6 KB) - not displayed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.