Re: [patch 7/8] Dont mark TSC unstable due to S4 suspend

2012-02-09 Thread Joerg Roedel
On Wed, Feb 08, 2012 at 01:56:46PM -0200, Marcelo Tosatti wrote: > On Wed, Feb 08, 2012 at 04:18:48PM +0100, Joerg Roedel wrote: > > This is not going to work when tsc-scaling is enabled. The > > adjust_tsc_offset_host() function just scales the offset the same way > > the tsc is scaled. But that

Re: [patch 7/8] Dont mark TSC unstable due to S4 suspend

2012-02-08 Thread Marcelo Tosatti
On Wed, Feb 08, 2012 at 04:18:48PM +0100, Joerg Roedel wrote: > On Fri, Feb 03, 2012 at 03:43:56PM -0200, Marcelo Tosatti wrote: > > + if (backwards_tsc) { > > + u64 delta_cyc = max_tsc - local_tsc; > > + list_for_each_entry(kvm, &vm_list, vm_list) { > > + kv

Re: [patch 7/8] Dont mark TSC unstable due to S4 suspend

2012-02-08 Thread Joerg Roedel
On Fri, Feb 03, 2012 at 03:43:56PM -0200, Marcelo Tosatti wrote: > + if (backwards_tsc) { > + u64 delta_cyc = max_tsc - local_tsc; > + list_for_each_entry(kvm, &vm_list, vm_list) { > + kvm_for_each_vcpu(i, vcpu, kvm) { > +

[patch 7/8] Dont mark TSC unstable due to S4 suspend

2012-02-03 Thread Marcelo Tosatti
From: Zachary Amsden During a host suspend, TSC may go backwards, which KVM interprets as an unstable TSC. Technically, KVM should not be marking the TSC unstable, which causes the TSC clocksource to go bad, but we need to be adjusting the TSC offsets in such a case. Dealing with this issue is