Re: x86: kvmclock: abstract save/restore sched_clock_state (v2)

2012-02-15 Thread Avi Kivity
On 02/13/2012 05:52 PM, Marcelo Tosatti wrote: > > > { > > >+ x86_platform.restore_sched_clock_state(); > > Isn't it too early? It is scarry to say hypervisor to write to some > > memory location and than completely replace page-tables and half of > > cpu state in __restore_processor_state. Would

Re: x86: kvmclock: abstract save/restore sched_clock_state (v2)

2012-02-13 Thread Amit Shah
On (Mon) 13 Feb 2012 [11:07:27], Marcelo Tosatti wrote: > > Upon resume from hibernation, CPU 0's hvclock area contains the old > values for system_time and tsc_timestamp. It is necessary for the > hypervisor to update these values with uptodate ones before the CPU uses > them. > > Abstract TSC's

Re: x86: kvmclock: abstract save/restore sched_clock_state (v2)

2012-02-13 Thread Marcelo Tosatti
On Mon, Feb 13, 2012 at 04:20:24PM +0100, Igor Mammedov wrote: > On 02/13/2012 02:07 PM, Marcelo Tosatti wrote: > > > >Upon resume from hibernation, CPU 0's hvclock area contains the old > >values for system_time and tsc_timestamp. It is necessary for the > >hypervisor to update these values with u

Re: x86: kvmclock: abstract save/restore sched_clock_state (v2)

2012-02-13 Thread Igor Mammedov
On 02/13/2012 02:07 PM, Marcelo Tosatti wrote: Upon resume from hibernation, CPU 0's hvclock area contains the old values for system_time and tsc_timestamp. It is necessary for the hypervisor to update these values with uptodate ones before the CPU uses them. Abstract TSC's save/restore sched_c

x86: kvmclock: abstract save/restore sched_clock_state (v2)

2012-02-13 Thread Marcelo Tosatti
Upon resume from hibernation, CPU 0's hvclock area contains the old values for system_time and tsc_timestamp. It is necessary for the hypervisor to update these values with uptodate ones before the CPU uses them. Abstract TSC's save/restore sched_clock_state functions and use restore_state to wri