On 04/02/2016 10:33, Roman Kagan wrote: >> The bit that I was missing last week was how the guest could perceive >> updates to the TSC page parameters as atomic. We actually _can_ >> emulate seqlock-like behavior in Hyper-V by writing 0 to seq during >> an update. Instead of looping like seqlocks do, the guest will simply >> use the time reference counter and take a hypervisor exit. The result >> however is still valid, because we want the time reference counter to >> be perfectly synchronized with the Hyper-V clock and lets you handle >> any kvmclock update scenario safely. > > That's smart, thanks for the idea! We'll only need to check that > Windows goes through all these steps on every clock read, rather than > remembering the failure and sticking with the MSR for good. Andrey pointed me to https://lkml.org/lkml/2015/11/2/655, which has the source for Windows's clock read code. It should work. >> The remaining part is _further_ adjusting the offset to > > ...? Cut and paste. :) I'll take a look at it if it's not super-high priority for you. Paolo -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html