Re: [PATCH v2 1/3] KVM: x86: implement KVM_{GET|SET}_TSC_STATE

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Dec 08 2020 at 16:50, Maxim Levitsky wrote:
> On Mon, 2020-12-07 at 20:29 -0300, Marcelo Tosatti wrote:
>> > +This ioctl allows to reconstruct the guest's IA32_TSC and TSC_ADJUST value
>> > +from the state obtained in the past by KVM_GET_TSC_STATE on the same vCPU.
>> > +
>> > +If 'KVM_TSC_STATE_TIMESTAMP_VALID' is set in flags,
>> > +KVM will adjust the guest TSC value by the time that passed since the moment
>> > +CLOCK_REALTIME timestamp was saved in the struct and current value of
>> > +CLOCK_REALTIME, and set the guest's TSC to the new value.
>> 
>> This introduces the wraparound bug in Linux timekeeping, doesnt it?

Which bug?

> It does.
> Could you prepare a reproducer for this bug so I get a better idea about
> what are you talking about?
>
> I assume you need very long (like days worth) jump to trigger this bug
> and for such case we can either work around it in qemu / kernel 
> or fix it in the guest kernel and I strongly prefer the latter.
>
> Thomas, what do you think about it?

For one I have no idea which bug you are talking about and if the bug is
caused by the VMM then why would you "fix" it in the guest kernel.

Aside of that I think I made it pretty clear what the right thing to do
is.

Thanks,

        tglx



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux