• Marcelo Tosatti's avatar
    KVM: x86: require matched TSC offsets for master clock · b48aa97e
    Marcelo Tosatti authored
    With master clock, a pvclock clock read calculates:
    
    ret = system_timestamp + [ (rdtsc + tsc_offset) - tsc_timestamp ]
    
    Where 'rdtsc' is the host TSC.
    
    system_timestamp and tsc_timestamp are unique, one tuple
    per VM: the "master clock".
    
    Given a host with synchronized TSCs, its obvious that
    guest TSC must be matched for the above to guarantee monotonicity.
    
    Allow master clock usage only if guest TSCs are synchronized.
    Signed-off-by: default avatarMarcelo Tosatti <mtosatti@redhat.com>
    b48aa97e
trace.h 20.5 KB