Re: [PATCH] KVM, CPU hotplug: Avoid wraparound in pvclock_get_nsec_offset

2011-12-17 Thread Marcelo Tosatti
On Mon, Dec 12, 2011 at 02:37:15PM +0100, Vasilis Liaskovitis wrote: > Hotplugging a vCPU with kvmclock enabled can cause a guest stall/hang. When > the stall happens, pvclock_clocksource_read() is called for the new vCPU and > pvclock_get_nsec_offset calculates native_read_tsc() - shadow->tsc_time

Re: [PATCH] KVM, CPU hotplug: Avoid wraparound in pvclock_get_nsec_offset

2011-12-12 Thread Vasilis Liaskovitis
On Mon, Dec 12, 2011 at 02:53:29PM +0100, Jan Kiszka wrote: > > Can't comment on the semantics, but your patch is whitespace damaged and > doesn't follow kernel coding style. But I assume it's not for > application yet, right? right. It fixes the hang for me, but I am not sure it's the best solut

Re: [PATCH] KVM, CPU hotplug: Avoid wraparound in pvclock_get_nsec_offset

2011-12-12 Thread Jan Kiszka
On 2011-12-12 14:37, Vasilis Liaskovitis wrote: > Hotplugging a vCPU with kvmclock enabled can cause a guest stall/hang. When > the stall happens, pvclock_clocksource_read() is called for the new vCPU and > pvclock_get_nsec_offset calculates native_read_tsc() - shadow->tsc_timestamp. > shadow->tsc_

[PATCH] KVM, CPU hotplug: Avoid wraparound in pvclock_get_nsec_offset

2011-12-12 Thread Vasilis Liaskovitis
Hotplugging a vCPU with kvmclock enabled can cause a guest stall/hang. When the stall happens, pvclock_clocksource_read() is called for the new vCPU and pvclock_get_nsec_offset calculates native_read_tsc() - shadow->tsc_timestamp. shadow->tsc_timestamp contains a value larger than native_read_tsc()