Skip to content
Commit 4b648665 authored by Bruce Rogers's avatar Bruce Rogers Committed by Marcelo Tosatti
Browse files

KVM: x86: apply kvmclock offset to guest wall clock time



When a guest migrates to a new host, the system time difference from the
previous host is used in the updates to the kvmclock system time visible
to the guest, resulting in a continuation of correct kvmclock based guest
timekeeping.

The wall clock component of the kvmclock provided time is currently not
updated with this same time offset. Since the Linux guest caches the
wall clock based time, this discrepency is not noticed until the guest is
rebooted. After reboot the guest's time calculations are off.

This patch adjusts the wall clock by the kvmclock_offset, resulting in
correct guest time after a reboot.

Cc: Zachary Amsden <zamsden@gmail.com>
Signed-off-by: default avatarBruce Rogers <brogers@suse.com>
Signed-off-by: default avatarMarcelo Tosatti <mtosatti@redhat.com>
parent aea218f3
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