forked from nrgaway/qubes-core-libvirt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
0010-libxl-make-use-of-e820_host-feature.patch
44 lines (40 loc) · 1.58 KB
/
0010-libxl-make-use-of-e820_host-feature.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
From 0359d1291b8f13545443ae604a22b90c22e31a8e 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:54:44 +0200
Subject: [PATCH] libxl: make use of e820_host feature
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Organization: Invisible Things Lab
Cc: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
---
src/libxl/libxl_conf.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/src/libxl/libxl_conf.c b/src/libxl/libxl_conf.c
index 5a7651d6b7..f36cae6172 100644
--- a/src/libxl/libxl_conf.c
+++ b/src/libxl/libxl_conf.c
@@ -725,6 +725,20 @@ libxlMakeDomBuildInfo(virDomainDefPtr def,
}
if (VIR_STRDUP(b_info->u.pv.ramdisk, def->os.initrd) < 0)
return -1;
+
+ if (def->features[VIR_DOMAIN_FEATURE_XEN] == VIR_TRISTATE_SWITCH_ON) {
+ switch ((virTristateSwitch) def->xen_features[VIR_DOMAIN_XEN_E820_HOST]) {
+ case VIR_TRISTATE_SWITCH_ON:
+ libxl_defbool_set(&b_info->u.pv.e820_host, true);
+ break;
+ case VIR_TRISTATE_SWITCH_OFF:
+ libxl_defbool_set(&b_info->u.pv.e820_host, false);
+ break;
+ case VIR_TRISTATE_SWITCH_ABSENT:
+ case VIR_TRISTATE_SWITCH_LAST:
+ break;
+ }
+ }
}
/* only the 'xen' balloon device model is supported */
--
2.17.2