7ffc87
From 0b32e08e5ddfd7088297d267aed71950219dad79 Mon Sep 17 00:00:00 2001
7ffc87
From: Peter Robinson <pbrobinson@gmail.com>
7ffc87
Date: Wed, 27 Feb 2019 10:54:43 +0000
7ffc87
Subject: [PATCH 03/13] Add appropriate arch checks for architecture specific
7ffc87
 features
7ffc87
7ffc87
In a lot of cases qemu just ignores incorrect cmd line options when run
7ffc87
against a different architecture but sometimes it causes issues so lets
7ffc87
add the appropriate checks to ensure no issues.
7ffc87
7ffc87
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
7ffc87
---
7ffc87
 oz/Guest.py | 8 +++++---
7ffc87
 1 file changed, 5 insertions(+), 3 deletions(-)
7ffc87
7ffc87
diff --git a/oz/Guest.py b/oz/Guest.py
7ffc87
index e346904..e3a5da5 100644
7ffc87
--- a/oz/Guest.py
7ffc87
+++ b/oz/Guest.py
7ffc87
@@ -460,9 +460,11 @@ class Guest(object):
7ffc87
         oz.ozutil.lxml_subelement(domain, "vcpu", str(self.install_cpus))
7ffc87
         # features
7ffc87
         features = oz.ozutil.lxml_subelement(domain, "features")
7ffc87
-        oz.ozutil.lxml_subelement(features, "acpi")
7ffc87
-        oz.ozutil.lxml_subelement(features, "apic")
7ffc87
-        oz.ozutil.lxml_subelement(features, "pae")
7ffc87
+        if self.tdl.arch in ["aarch64", "x86_64"]:
7ffc87
+            oz.ozutil.lxml_subelement(features, "acpi")
7ffc87
+        if self.tdl.arch in ["x86_64"]:
7ffc87
+            oz.ozutil.lxml_subelement(features, "apic")
7ffc87
+            oz.ozutil.lxml_subelement(features, "pae")
7ffc87
         # CPU
7ffc87
         if self.tdl.arch in ["aarch64", "armv7l"] and self.libvirt_type == "kvm":
7ffc87
             # Possibly related to RHBZ 1171501 - need host passthrough for aarch64 and arm with kvm
7ffc87
-- 
7ffc87
2.20.1
7ffc87