forked from QubesOS/qubes-core-libvirt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
0010-xenconfig-parse-e820_host-option.patch
49 lines (43 loc) · 1.68 KB
/
0010-xenconfig-parse-e820_host-option.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
39
40
41
42
43
44
45
46
47
48
From 7b23438c4696b209478f48e8b24c20fdb0cd5db5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?=
<marmarek@invisiblethingslab.com>
Date: Thu, 2 Jun 2016 05:55:12 +0200
Subject: [PATCH] xenconfig: parse e820_host option
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
---
src/libxl/xen_common.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/src/libxl/xen_common.c b/src/libxl/xen_common.c
index d327f03d73..9cad5d48d0 100644
--- a/src/libxl/xen_common.c
+++ b/src/libxl/xen_common.c
@@ -599,6 +599,14 @@ xenParseCPUFeatures(virConfPtr conf,
def->clock.timers[def->clock.ntimers - 1] = timer;
}
+ } else {
+ if (xenConfigGetBool(conf, "e820_host", &val, 0) < 0) {
+ return -1;
+
+ } else if (val) {
+ def->features[VIR_DOMAIN_FEATURE_XEN] = VIR_TRISTATE_SWITCH_ON;
+ def->xen_features[VIR_DOMAIN_XEN_E820_HOST] = VIR_TRISTATE_SWITCH_ON;
+ }
}
return 0;
@@ -2183,6 +2191,12 @@ xenFormatCPUFeatures(virConfPtr conf, virDomainDefPtr def)
(def->features[VIR_DOMAIN_FEATURE_VIRIDIAN] ==
VIR_TRISTATE_SWITCH_ON) ? 1 : 0) < 0)
return -1;
+ } else {
+ if (def->features[VIR_DOMAIN_FEATURE_XEN] == VIR_TRISTATE_SWITCH_ON) {
+ if (def->xen_features[VIR_DOMAIN_XEN_E820_HOST] == VIR_TRISTATE_SWITCH_ON)
+ if (xenConfigSetInt(conf, "e820_host", 1) < 0)
+ return -1;
+ }
}
for (i = 0; i < def->clock.ntimers; i++) {
--
2.21.0