On 4/13/20 2:10 PM, Marek Marczykowski-Górecki wrote:
Signed-off-by: Marek Marczykowski-Górecki <marmarek@xxxxxxxxxxxxxxxxxxxxxx>
---
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 9a385eb..eedf4c7 100644
--- a/src/libxl/xen_common.c
+++ b/src/libxl/xen_common.c
@@ -592,6 +592,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) {
Please drop the extra line between if and else if. We don't have to repeat the
poor choice of whitespace used in the previous conditional.
+ 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 +2146,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++) {
Reviewed-by: Jim Fehlig <jfehlig@xxxxxxxx>
Regards,
Jim