• Rusty Russell's avatar
    Fix non-TSC guest clocksource lockup · 37250097
    Rusty Russell authored
    lguest uses a host-supplied wallclock-based clocksource when the TSC
    is not reliable.  As this is already in nanoseconds, I naively used a
    multiplier of 1 and a shift of 0.
    
    But update_wall_time() in its infinite wisdom decides to adjust the
    clock a little (where does it think it's getting a more accurate time
    from?)
    
    It will happily tweak the multiplier... to 0, then -1.
    
    So the "fix" is to use a shift of 22 like everyone else, and a
    multiplier of 1 << 22.
    Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    37250097
lguest.c 41.1 KB