qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* Commit "x86/kvm: Move context tracking where it belongs" broke guest time accounting
@ 2021-04-06 20:17 Michael Tokarev
  2021-04-06 21:47 ` Sean Christopherson
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Michael Tokarev @ 2021-04-06 20:17 UTC (permalink / raw)
  To: kvm, qemu-devel, Thomas Gleixner; +Cc: Paolo Bonzini

Hi!

It looks like this commit:

commit 87fa7f3e98a1310ef1ac1900e7ee7f9610a038bc
Author: Thomas Gleixner <tglx@linutronix.de>
Date:   Wed Jul 8 21:51:54 2020 +0200

     x86/kvm: Move context tracking where it belongs

     Context tracking for KVM happens way too early in the vcpu_run()
     code. Anything after guest_enter_irqoff() and before guest_exit_irqoff()
     cannot use RCU and should also be not instrumented.

     The current way of doing this covers way too much code. Move it closer to
     the actual vmenter/exit code.

broke kvm guest cpu time accounting - after this commit, when running
qemu-system-x86_64 -enable-kvm, the guest time (in /proc/stat and
elsewhere) is always 0.

I dunno why it happened, but it happened, and all kernels after 5.9
are affected by this.

This commit is found in a (painful) git bisect between kernel 5.8 and 5.10.

Thanks,

/mjt


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-04-13 10:50 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-06 20:17 Commit "x86/kvm: Move context tracking where it belongs" broke guest time accounting Michael Tokarev
2021-04-06 21:47 ` Sean Christopherson
2021-04-08 13:18   ` Thomas Gleixner
2021-04-09  2:14     ` Wanpeng Li
2021-04-09  8:13     ` Wanpeng Li
2021-04-09  9:19       ` Thomas Gleixner
2021-04-07 11:01 ` Wanpeng Li
2021-04-13 10:48 ` Wanpeng Li

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).