From: Michael Tokarev <mjt@tls.msk.ru>
To: kvm@vger.kernel.org, qemu-devel@nongnu.org,
Thomas Gleixner <tglx@linutronix.de>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Subject: Commit "x86/kvm: Move context tracking where it belongs" broke guest time accounting
Date: Tue, 6 Apr 2021 23:17:41 +0300 [thread overview]
Message-ID: <36088364-0b3d-d492-0aa4-59ea8f1d1632@msgid.tls.msk.ru> (raw)
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
next reply other threads:[~2021-04-06 20:24 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-06 20:17 Michael Tokarev [this message]
2021-04-06 21:47 ` Commit "x86/kvm: Move context tracking where it belongs" broke guest time accounting 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=36088364-0b3d-d492-0aa4-59ea8f1d1632@msgid.tls.msk.ru \
--to=mjt@tls.msk.ru \
--cc=kvm@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).