Re: [RFC v2 2/2] x86/kvmclock: Introduce kvm-hostclock clocksource.
From: Paolo Bonzini
Date: Tue Oct 15 2019 - 04:59:09 EST
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.
>>> + unsigned long pa;
>>> + pa = __pa(&pv_timekeeper);
>>> + wrmsrl(MSR_KVM_TIMEKEEPER_EN, pa);
>> As Vitaly said, a new CPUID bit must be defined in
>> Documentation/virt/kvm/cpuid.txt, and used here. Also please make bit 0
>> an enable bit.
> I think I might not be able to move the enable bit to 0 because we
> need the generation count (pvclock_timekeeper.gen) to be the first
> word of the struct due to the way we copy the data to userspace,
> similarly to how kvm_setup_pvclock_page() does it.
I mean bit 0 of the MSR.