Skip to content
Commit 3aed64f6 authored by Paolo Bonzini's avatar Paolo Bonzini
Browse files

pvclock: introduce seqcount-like API



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>
parent 96b58526
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment