[PATCH v2 3/4] xenconfig: parse e820_host option

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Marek Marczykowski-Górecki <marmarek@xxxxxxxxxxxxxxxxxxxxxx>
Reviewed-by: Jim Fehlig <jfehlig@xxxxxxxx>
---
 src/libxl/xen_common.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/src/libxl/xen_common.c b/src/libxl/xen_common.c
index 9a385eb..bbb9739 100644
--- a/src/libxl/xen_common.c
+++ b/src/libxl/xen_common.c
@@ -592,6 +592,13 @@ 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;
@@ -2138,6 +2145,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++) {
-- 
git-series 0.9.1






[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux