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