From: Glauber C. <gc...@re...> - 2008-04-24 13:04:09
|
Gerd Hoffmann wrote: > Glauber Costa wrote: >> Gerd Hoffmann wrote: >>> Jeremy Fitzhardinge wrote: >>>> Xen could change the parameters in the instant after >>>> get_time_values(). That change could be as a result of >>>> suspend-resume, so the parameters >>>> and the tsc could be wildly different. >>> Ah, ok, forgot the rdtsc in the picture. With that in mind I fully >>> agree that the loop is needed. I think kvm guests can even hit that one >>> with the vcpu migrating to a different physical cpu, so we better handle >>> it correctly ;) >> It's probably not needed for kvm, since we update everything everytime >> we get scheduled in the host side, which would cover the case for >> migration between physical cpus. > > No, it wouldn't. The corner case we must catch is: guest reads time > info, kvm reschedules the guest to another pcpu, guest reads the tsc. > The time info used by the guest for the tsc delta is stale then, it > belongs to the previous pcpu. > > cheers, > Gerd > Agreed. |