Re: [PATCH] remove static declaration from wall clock version

2009-03-08 Thread Avi Kivity
Glauber Costa wrote: Matt T. Yourst noted that we're currently having a dumb race for no reason in paravirtual wall clock. This is due to the use of a static variable to hold the counting. This can race with multiple guests reading wallclock at the same time, since the static variable value

Re: [PATCH] remove static declaration from wall clock version

2009-03-03 Thread Marcelo Tosatti
On Thu, Feb 26, 2009 at 02:42:20PM -0500, Glauber Costa wrote: Matt T. Yourst noted that we're currently having a dumb race for no reason in paravirtual wall clock. This is due to the use of a static variable to hold the counting. This can race with multiple guests reading wallclock at the

Re: [PATCH] remove static declaration from wall clock version

2009-02-27 Thread Marcelo Tosatti
Matt T. Yourst noted that we're currently having a dumb race for no reason in paravirtual wall clock. This is due to the use of a static variable to hold the counting. This can race with multiple guests reading wallclock at the same time, since the static variable value would then be accessible

[PATCH] remove static declaration from wall clock version

2009-02-26 Thread Glauber Costa
Matt T. Yourst noted that we're currently having a dumb race for no reason in paravirtual wall clock. This is due to the use of a static variable to hold the counting. This can race with multiple guests reading wallclock at the same time, since the static variable value would then be accessible

Re: [PATCH] remove static declaration from wall clock version

2009-02-26 Thread Arnd Bergmann
On Thursday 26 February 2009, Glauber Costa wrote: @@ -548,15 +548,13 @@ static int do_set_msr(struct kvm_vcpu *vcpu, unsigned index, u64 *data)    static void kvm_write_wall_clock(struct kvm *kvm, gpa_t wall_clock)  { -   static int version; +   int version = 1; struct

Re: [PATCH] remove static declaration from wall clock version

2009-02-26 Thread Glauber Costa
On Thu, Feb 26, 2009 at 08:50:26PM +0100, Arnd Bergmann wrote: On Thursday 26 February 2009, Glauber Costa wrote: @@ -548,15 +548,13 @@ static int do_set_msr(struct kvm_vcpu *vcpu, unsigned index, u64 *data)    static void kvm_write_wall_clock(struct kvm *kvm, gpa_t wall_clock)  { -  

Re: [PATCH] remove static declaration from wall clock version

2009-02-26 Thread Arnd Bergmann
On Friday 27 February 2009, Glauber Costa wrote: Doesn't this mean that kvm_write_guest now writes an uninitialized value to the guest? No. If you look closely, it's now initialized to 1. Right, I didn't see that change at first. Arnd -- To unsubscribe from this list: send the