]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
KVM: x86: reorganize pvclock_gtod_data members
authorPaolo Bonzini <pbonzini@redhat.com>
Wed, 22 Jan 2020 13:32:20 +0000 (14:32 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 5 Feb 2020 14:17:45 +0000 (15:17 +0100)
commit917f9475c0a8ab8958db7f22a5d495b9a1d51be6
tree5088406059785a9e5410f86fa8b723d13ac7fa7a
parent33aabd029ffbafe314dad4763dadbc23d71296eb
KVM: x86: reorganize pvclock_gtod_data members

We will need a copy of tk->offs_boot in the next patch.  Store it and
cleanup the struct: instead of storing tk->tkr_xxx.base with the tk->offs_boot
included, store the raw value in struct pvclock_clock and sum it in
do_monotonic_raw and do_realtime.   tk->tkr_xxx.xtime_nsec also moves
to struct pvclock_clock.

While at it, fix a (usually harmless) typo in do_monotonic_raw, which
was using gtod->clock.shift instead of gtod->raw_clock.shift.

Fixes: 53fafdbb8b21f ("KVM: x86: switch KVMCLOCK base to monotonic raw clock")
Cc: stable@vger.kernel.org
Reviewed-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/x86.c