Re: [RFC v2 2/2] x86/kvmclock: Introduce kvm-hostclock clocksource.

2019-10-15 Thread Paolo Bonzini
On 15/10/19 10:39, Suleiman Souhlal wrote: > I think we have that already (pvtk->flags). > I'll change the if statement above to use pvtk instead of pv_timekeeper. Of course, thanks. >>> +kvm_hostclock_init(void) >>> +{ >>> + unsigned long pa; >>> + >>> + pa = __pa(_timekeeper); >>> +

Re: [RFC v2 2/2] x86/kvmclock: Introduce kvm-hostclock clocksource.

2019-10-15 Thread Suleiman Souhlal
On Thu, Oct 10, 2019 at 7:55 PM Paolo Bonzini wrote: > > On 10/10/19 09:30, Suleiman Souhlal wrote: > > +kvm_hostclock_enable(struct clocksource *cs) > > +{ > > + pv_timekeeper_enabled = 1; > > + > > + old_vclock_mode = kvm_clock.archdata.vclock_mode; > > +

Re: [RFC v2 2/2] x86/kvmclock: Introduce kvm-hostclock clocksource.

2019-10-10 Thread Paolo Bonzini
On 10/10/19 09:30, Suleiman Souhlal wrote: > +kvm_hostclock_enable(struct clocksource *cs) > +{ > + pv_timekeeper_enabled = 1; > + > + old_vclock_mode = kvm_clock.archdata.vclock_mode; > + kvm_clock.archdata.vclock_mode = VCLOCK_TSC; > + return 0; > +} > + > +static void >

Re: [RFC v2 2/2] x86/kvmclock: Introduce kvm-hostclock clocksource.

2019-10-10 Thread Vitaly Kuznetsov
Suleiman Souhlal writes: > When kvm-hostclock is selected, and the host supports it, update our > timekeeping parameters to be the same as the host. > This lets us have our time synchronized with the host's, > even in the presence of host NTP or suspend. > > Signed-off-by: Suleiman Souhlal >

[RFC v2 2/2] x86/kvmclock: Introduce kvm-hostclock clocksource.

2019-10-10 Thread Suleiman Souhlal
When kvm-hostclock is selected, and the host supports it, update our timekeeping parameters to be the same as the host. This lets us have our time synchronized with the host's, even in the presence of host NTP or suspend. Signed-off-by: Suleiman Souhlal --- arch/x86/Kconfig|