render / rpms / libvirt

Forked from rpms/libvirt 9 months ago
Clone
adeaf8
From c8e47add2fe77905523f6112ceb6b844337f6d3f Mon Sep 17 00:00:00 2001
2daa92
From: Cole Robinson <crobinso@redhat.com>
Daniel P. Berrange 11755d
Date: Fri, 30 Aug 2013 12:41:33 -0400
adeaf8
Subject: [PATCH] qemu: Don't try to allocate PCI addresses for ARM
2daa92
2daa92
---
2daa92
 src/qemu/qemu_command.c | 16 ++++++++++++++--
2daa92
 1 file changed, 14 insertions(+), 2 deletions(-)
2daa92
2daa92
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
Daniel P. Berrange 11755d
index a8e532c..87345c7 100644
2daa92
--- a/src/qemu/qemu_command.c
2daa92
+++ b/src/qemu/qemu_command.c
Daniel P. Berrange 11755d
@@ -1773,6 +1773,16 @@ cleanup:
2daa92
     return ret;
2daa92
 }
2daa92
 
2daa92
+static bool
2daa92
+qemuDomainSupportsPCI(virDomainDefPtr def) {
2daa92
+    if (def->os.arch != VIR_ARCH_ARMV7L)
2daa92
+        return true;
2daa92
+
2daa92
+    if (STREQ(def->os.machine, "versatilepb"))
2daa92
+        return true;
2daa92
+
2daa92
+    return false;
2daa92
+}
2daa92
 
2daa92
 int
2daa92
 qemuDomainAssignPCIAddresses(virDomainDefPtr def,
Daniel P. Berrange 11755d
@@ -1838,8 +1848,10 @@ qemuDomainAssignPCIAddresses(virDomainDefPtr def,
2daa92
         if (!(addrs = qemuDomainPCIAddressSetCreate(def, nbuses, false)))
2daa92
             goto cleanup;
2daa92
 
2daa92
-        if (qemuAssignDevicePCISlots(def, qemuCaps, addrs) < 0)
2daa92
-            goto cleanup;
2daa92
+        if (qemuDomainSupportsPCI(def)) {
2daa92
+            if (qemuAssignDevicePCISlots(def, qemuCaps, addrs) < 0)
2daa92
+                goto cleanup;
2daa92
+        }
2daa92
     }
2daa92
 
2daa92
     if (obj && obj->privateData) {