Re: [PATCH v4 04/30] KVM: x86: Add KVM_[GS]ET_CLOCK_GUEST for accurate KVM clock migration
From: David Woodhouse
Date: Wed May 20 2026 - 10:09:13 EST
On Tue, 2026-05-19 at 16:34 -0700, Dongli Zhang wrote:
>
> I would really appreciate it if this document could be revived. I don't see it
> in your most recent v4 PATCH 7. It is very helpful as a guideline for how
> userspace VMMs should take advantage of these APIs.
In the kvmclock5 branch I'm revising for the next round.
https://git.infradead.org/?p=users/dwmw2/linux.git;a=commitdiff;h=ae872d9b75
Now has a selftest which serves as an example of the process that was
documented. And an extra fix right before it in the tree, to update the
master clock on vCPU creation because otherwise otherwise KVM_GET_CLOCK
wasn't returning the host_tsc.
I think I need to change that to only do so if ka->use_master_clock
isn't *already* set though, or we risk introducing discrepancies on
hotplug again? Will tweak that...
Attachment:
smime.p7s
Description: S/MIME cryptographic signature