-
-
Notifications
You must be signed in to change notification settings - Fork 26
/
0012-libxl-Fix-setting-invtsc-in-Xen-4.14.patch
39 lines (34 loc) · 1.53 KB
/
0012-libxl-Fix-setting-invtsc-in-Xen-4.14.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
From de6dcd12f817428e8ec90611b04c86d5ff5a2c47 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?=
Date: Wed, 13 Apr 2022 15:58:50 +0200
Subject: [PATCH] libxl: Fix setting invtsc in Xen 4.14
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Xen 4.14 overrides invtsc CPUID field with disable_migrate setting.
In later versions it has separate itsc config value and also should not
override explicit value anymore.
Signed-off-by: Marek Marczykowski-Górecki <[email protected]>
---
src/libxl/libxl_conf.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/libxl/libxl_conf.c b/src/libxl/libxl_conf.c
index 39a97b0405..389b6a1411 100644
--- a/src/libxl/libxl_conf.c
+++ b/src/libxl/libxl_conf.c
@@ -516,6 +516,13 @@ libxlMakeDomBuildInfo(virDomainDef *def,
hasHwVirt = true;
continue;
}
+ if (STREQ(def->cpu->features[i].name, "invtsc")) {
+ /* Xen overrides invtsc with the value of
+ * disable_migrate - set
+ * disable_migrate to have invtsc enabled.
+ */
+ libxl_defbool_set(&b_info->disable_migrate, true);
+ }
g_snprintf(xlCPU,
sizeof(xlCPU),
--
2.45.2