Re: [PATCH v6 08/36] KVM: x86: Activate master clock immediately on vCPU creation
From: David Woodhouse
Date: Sat Jul 25 2026 - 08:45:57 EST
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.
Attachment:
smime.p7s
Description: S/MIME cryptographic signature