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