• Z
    KVM: x86: Fix kvmclock bug · 28e4639a
    Zachary Amsden 提交于
    If preempted after kvmclock values are updated, but before hardware
    virtualization is entered, the last tsc time as read by the guest is
    never set.  It underflows the next time kvmclock is updated if there
    has not yet been a successful entry / exit into hardware virt.
    
    Fix this by simply setting last_tsc to the newly read tsc value so
    that any computed nsec advance of kvmclock is nulled.
    Signed-off-by: NZachary Amsden <zamsden@redhat.com>
    Signed-off-by: NMarcelo Tosatti <mtosatti@redhat.com>
    28e4639a
x86.c 147.4 KB