Re: [PATCH] KVM: x86/xen: Do not corrupt KVM clock in kvm_xen_shared_info_init()

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

 



On Tue, 2024-04-09 at 17:33 -0700, Sean Christopherson wrote:
> On Sun, Apr 07, 2024, David Woodhouse wrote:
> > From: David Woodhouse <dwmw@xxxxxxxxxxxx>
> > 
> > The KVM clock is an interesting thing. It is defined as "nanoseconds
> > since the guest was created", but in practice it runs at two *different*
> > rates — or three different rates, if you count implementation bugs.
> 
> LOL, nice.
> 
> > Definition C should simply be eliminated. Commit 451a707813ae ("KVM:
> > x86/xen: improve accuracy of Xen timers") worked around it for the
> > specific case of Xen timers, which are defined in terms of the KVM clock
> > and suffered from a continually increasing error in timer expiry times.
> 
> IIUC, there should probably be a "But that's a problem for a different day" line
> after this.  I.e. describing 'C' is purely for context, and removing the
> KVM_REQ_MASTERCLOCK_UPDATE request doesn't move the needle on eliminating this
> flaw, correct?

Correct. I have spent a while over the last few months where I've had
spare cycles (no pun intended), trying to get a full handle on just how
hosed this all is. A few times I've started on a fix for one part of it
and then hit something *else* that I needed to fix first, which renders
my first work invalid.

So now I've attempted to just write it all down and understand it, and
then come up with a TODO list, which Jack is helping me with (at least
as far as the immediate customer pain on LU/LM is concerned).

I transposed the TODO part into text form in
https://lore.kernel.org/kvm/c12959cf6ca372569b4df10b2f9e272db1114ad1.camel@xxxxxxxxxxxxx/
but here's the rest of my notes. They're a bit raw, but at least I
think I understand most of it now. Apologies, it was in an internal
wiki-style thing so the best option for export is PDF.

Once we've *fixed* things to be saner, I'll attempt to do a cleaner
documentation of what's left, to live in the kernel tree.

Attachment: KVMclock-2024-04-10.pdf
Description: Adobe PDF document

Attachment: smime.p7s
Description: S/MIME cryptographic signature


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux