Re: [patch] kvmclock fix

2009-02-04 Thread Marcelo Tosatti
On Tue, Feb 03, 2009 at 06:02:31PM +0100, Gerd Hoffmann wrote: Hi, Here is a patch which fixes the kvmclock on multicore systems without constant_tsc. I'm not that happy with the current form as the notifier duplicates code from tsc.c. I don't see an easy way around that though.

Re: [patch] kvmclock fix

2009-02-04 Thread Gerd Hoffmann
Hi, This can race if the target vcpu has tested for vcpu-requests but not set guest_mode yet, Right. New patch coming in a minute. cheers, Gerd -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at

[patch] kvmclock fix

2009-02-03 Thread Gerd Hoffmann
Hi, Here is a patch which fixes the kvmclock on multicore systems without constant_tsc. I'm not that happy with the current form as the notifier duplicates code from tsc.c. I don't see an easy way around that though. Suggestions? Other review comments? thanks, Gerd From

Re: [patch] kvmclock fix

2009-02-03 Thread Glauber Costa
+static unsigned int ref_freq; +static unsigned long loops_per_jiffy_ref; +static unsigned long tsc_khz_ref; Doesn't these need to be percpu too ? Otherwise we could be calculating the new frequency based on a foreign reference. + +static int kvmclock_cpufreq_notifier(struct

Re: [patch] kvmclock fix

2009-02-03 Thread Gerd Hoffmann
Glauber Costa wrote: +static unsigned int ref_freq; +static unsigned long loops_per_jiffy_ref; +static unsigned long tsc_khz_ref; Doesn't these need to be percpu too ? Otherwise we could be calculating the new frequency based on a foreign reference. I doubt you can have a SMP systems