On Wed, Jan 6, 2016 at 11:18 PM, Andy Lutomirski <luto@xxxxxxxxxxxxxx> wrote: > AFAICT KVM reliably passes a monotonic TSC through to guests, even if > the host suspends. That's all that sched_clock needs, I think. > > So why does kvmclock have a custom sched_clock? > > On a related note, KVM doesn't pass the "invariant TSC" feature > through to guests on my machine even though "invtsc" is set in QEMU > and the kernel host code appears to support it. What gives? I think I solved part of the puzzle. KVM doesn't like to advertise invtsc by default because that breaks migration. (Oddly, the end result seems wrong -- with migration, the TSC doesn't stop, but it's not constant, and X86_FEATURE_CONSTANT_TSC is nonetheless set, but whatever.) So the scheduler clock doesn't get marked stable. Is that it? This still doesn't explain why even explicitly trying to set invtsc doesn't seem to work. --Andy -- 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