2020-01-19 00:54:59 +00:00
|
|
|
From 70c79c38cb1e81d8cffa19dc562b629dcde98c6c Mon Sep 17 00:00:00 2001
|
2018-08-27 14:32:32 +00:00
|
|
|
From: Thomas Gleixner <tglx@linutronix.de>
|
2019-04-08 23:49:20 +00:00
|
|
|
Date: Sun, 6 Nov 2011 12:26:18 +0100
|
2020-01-19 00:54:59 +00:00
|
|
|
Subject: [PATCH 090/290] x86: kvm Require const tsc for RT
|
|
|
|
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.94-rt38.tar.xz
|
2018-08-27 14:32:32 +00:00
|
|
|
|
|
|
|
Non constant TSC is a nightmare on bare metal already, but with
|
|
|
|
virtualization it becomes a complete disaster because the workarounds
|
|
|
|
are horrible latency wise. That's also a preliminary for running RT in
|
|
|
|
a guest on top of a RT host.
|
|
|
|
|
|
|
|
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
|
|
|
|
---
|
2019-04-08 23:49:20 +00:00
|
|
|
arch/x86/kvm/x86.c | 7 +++++++
|
2018-08-27 14:32:32 +00:00
|
|
|
1 file changed, 7 insertions(+)
|
|
|
|
|
2019-04-08 23:49:20 +00:00
|
|
|
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
|
2020-01-03 23:36:11 +00:00
|
|
|
index 353f63f3b262..2611898419ff 100644
|
2018-08-27 14:32:32 +00:00
|
|
|
--- a/arch/x86/kvm/x86.c
|
|
|
|
+++ b/arch/x86/kvm/x86.c
|
2020-01-03 23:36:11 +00:00
|
|
|
@@ -6832,6 +6832,13 @@ int kvm_arch_init(void *opaque)
|
2018-08-27 14:32:32 +00:00
|
|
|
goto out;
|
|
|
|
}
|
|
|
|
|
|
|
|
+#ifdef CONFIG_PREEMPT_RT_FULL
|
|
|
|
+ if (!boot_cpu_has(X86_FEATURE_CONSTANT_TSC)) {
|
|
|
|
+ printk(KERN_ERR "RT requires X86_FEATURE_CONSTANT_TSC\n");
|
|
|
|
+ return -EOPNOTSUPP;
|
|
|
|
+ }
|
|
|
|
+#endif
|
|
|
|
+
|
|
|
|
r = kvm_mmu_module_init();
|
|
|
|
if (r)
|
|
|
|
goto out_free_percpu;
|
2020-01-03 23:36:11 +00:00
|
|
|
--
|
2020-01-19 00:54:59 +00:00
|
|
|
2.24.1
|
2020-01-03 23:36:11 +00:00
|
|
|
|