Skip to content
Snippets Groups Projects
Commit c4f8b0ac authored by Jan Stancek's avatar Jan Stancek Committed by Yang Yingliang
Browse files

x86/timer: Force PIT initialization when !X86_FEATURE_ARAT


mainline inclusion
from mainline-v5.3
commit afa8b475
category: bugfix
bugzilla: 17251
CVE: NA

-------------------------------------------------

KVM guests with commit c8c40767 ("x86/timer: Skip PIT initialization on
modern chipsets") applied to guest kernel have been observed to have
unusually higher CPU usage with symptoms of increase in vm exits for HLT
and MSW_WRITE (MSR_IA32_TSCDEADLINE).

This is caused by older QEMUs lacking support for X86_FEATURE_ARAT.  lapic
clock retains CLOCK_EVT_FEAT_C3STOP and nohz stays inactive.  There's no
usable broadcast device either.

Do the PIT initialization if guest CPU lacks X86_FEATURE_ARAT.  On real
hardware it shouldn't matter as ARAT and DEADLINE come together.

Fixes: c8c40767 ("x86/timer: Skip PIT initialization on modern chipsets")
Signed-off-by: default avatarJan Stancek <jstancek@redhat.com>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Signed-off-by: default avatarXiongfeng Wang <wangxiongfeng2@huawei.com>
Reviewed-by: default avatarHanjun Guo <guohanjun@huawei.com>
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
parent 639b66f7
No related branches found
No related tags found
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment