Skip to content
Commit b48aa97e authored by Marcelo Tosatti's avatar Marcelo Tosatti
Browse files

KVM: x86: require matched TSC offsets for master clock



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