]> git.baikalelectronics.ru Git - 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)
commit786d713394c0f17c8d3841259a0c8f8bc7f43f25
tree5088406059785a9e5410f86fa8b723d13ac7fa7a
parentc55ac48ad3353b2d2a213bac320b2026534df575
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: d78c8ffb14363 ("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