Re: system time goes weird in kvm guest after host suspend/resume

Paolo Bonzini
2020-06-05T08:09:34Z

On 05/06/20 09:35, Miklos Szeredi wrote:
>> time(2) instead should actually be gettimeofday(2), which just returns
>> tk->xtime_sec. So the problem is the nanosecond part which is off by
>> 2199*10^9 nanoseconds, and that is suspiciously close to 2^31...
> Yep: looking at the nanosecond values as well, the difference is
> exactly 2199023255552 which is 2^41.

Umpf, I was off by 3, it's not related to 2^31. But yeah the cause of
the bug seems to be the botched nanosecond part, which I'm sure is not
supposed to be much bigger than 10^9.

Paolo