• Paolo Bonzini's avatar
    KVM: x86: reorganize pvclock_gtod_data members · 917f9475
    Paolo Bonzini authored
    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: 53fafdbb ("KVM: x86: switch KVMCLOCK base to monotonic raw clock")
    Cc: stable@vger.kernel.org
    Reviewed-by: default avatarVitaly Kuznetsov <vkuznets@redhat.com>
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    917f9475
x86.c 273 KB