Skip to content
  • Paolo Bonzini's avatar
    pvclock: introduce seqcount-like API · 3aed64f6
    Paolo Bonzini authored
    
    
    The version field in struct pvclock_vcpu_time_info basically implements
    a seqcount.  Wrap it with the usual read_begin and read_retry functions,
    and use these APIs instead of peppering the code with smp_rmb()s.
    While at it, change it to the more pedantically correct virt_rmb().
    
    With this change, __pvclock_read_cycles can be simplified noticeably.
    
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    3aed64f6