> -
> - delta = kvm_clock_read();
> -
> native_write_msr(MSR_KVM_WALL_CLOCK, low, high);
> - do {
> - version = wall_clock.wc_version;
> - rmb();
> - wc_sec = wall_clock.wc_sec;
> - wc_nsec = wall_clock.wc_nsec;
> - rmb();
> - } while ((wall_clock.wc_version != version) || (version & 1));
> -
> - delta = kvm_clock_read() - delta;
> - delta += wc_nsec;
> - nsec = do_div(delta, NSEC_PER_SEC);
> - set_normalized_timespec(&ts, wc_sec + delta, nsec);
> - /*
> - * Of all mechanisms of time adjustment I've tested, this one
> - * was the champion!
> - */
> - return ts.tv_sec + 1;
> +
> + vcpu_time = &get_cpu_var(hv_clock);
> + pvclock_read_wallclock(&wall_clock, vcpu_time, &ts);
> + put_cpu_var(hv_clock);
> +
> + return ts.tv_sec;
> }
Here it is. Despite some needed cleanups, patches look beautiful to me.
--
Glauber Costa.
"Free as in Freedom"
http://glommer.net
"The less confident you are, the more serious you have to act."
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
kvm-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/kvm-devel