[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Commit "x86/kvm: Move context tracking where it belongs" broke guest tim
From: |
Michael Tokarev |
Subject: |
Commit "x86/kvm: Move context tracking where it belongs" broke guest time accounting |
Date: |
Tue, 6 Apr 2021 23:17:41 +0300 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.0 |
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