On Mon, 2026-10-12 at 14:23 -0700, Jim Mattson wrote:
> 
> I think there's a window here in which another vCPU can consume
> HV_TSC_PAGE_GUEST_CHANGED before kvm_set_clock_and_tsc() steps the
> clocks. If TSC emulation control is enabled,
> kvm_hv_request_tsc_page_update() won't invalidate the resulting stale
> TSC page.
> 
> > +       kvm_set_clock_and_tsc(vcpu->kvm, in.reference_time_in_100ns * 100, 
> > in.tsc);
> 
> When stepping the reference time forward, don't we have to recalculate
> the hrtimer deadlines associated with armed synthetic timers?
> Otherwise, those hrtimers will fire late.

My understanding is that Windows only does this at resume time when
nothing else is running, so it doesn't matter much.

Either way, I don't think we want *any* of this in the kernel; we
should just pass the hypercall up to userspace and let userspace handle
it.

There's a commit somewhere in
https://git.infradead.org/?p=users/dwmw2/linux.git;a=shortlog;h=refs/heads/vsm
which does that; I'm working on cleaning that lot up to be postable
this week. (s/linux/kvm-unit-tests/ and s/linux/qemu/ for the other
parts, if you want an early preview that actually boots Windows guests
under KVM with VSM support).

Attachment: smime.p7s
Description: S/MIME cryptographic signature



Amazon Development Centre (London) Ltd. Registered in England and Wales with 
registration number 04543232 with its registered office at 1 Principal Place, 
Worship Street, London EC2A 2FA, United Kingdom.


Reply via email to