On Thu, Aug 19, 2010 at 10:07:47PM -1000, Zachary Amsden wrote:
This is not enough.
We still can have bugs arriving from the difference in resolution between the underlying
clock and the tsc. What we're doing here, is to pass a reliable flag, to a non-reliable
guest tsc. We can only trust the guest kvmclock to be tsc-stable if the host is using
tsc clocksource as well.
Since the stable bit have to be read from the guest at every clock read, we can just
use it, and drop it if the host changes its clocksource.
An alternative for the reliable tsc case, would be to just maintain our own parallel
tsc-based clock. But to be honest, I don't like this solution very much. It adds
complexity, and I kinda believe that if the sysadmin had the work to go there
and switch clocksources, he probably has a reason for that.
--