[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] [PATCH 5/9] qemu: Don't try to allocate PCI addresses for ARM



---
 src/qemu/qemu_command.c | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 4209e5e..6da35d0 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -1692,6 +1692,16 @@ cleanup:
     return ret;
 }
 
+static bool
+qemuDomainSupportsPCI(virDomainDefPtr def) {
+    if (def->os.arch != VIR_ARCH_ARMV7L)
+        return true;
+
+    if (STREQ(def->os.machine, "versatilepb"))
+        return true;
+
+    return false;
+}
 
 int
 qemuDomainAssignPCIAddresses(virDomainDefPtr def,
@@ -1757,8 +1767,10 @@ qemuDomainAssignPCIAddresses(virDomainDefPtr def,
         if (!(addrs = qemuDomainPCIAddressSetCreate(def, nbuses, false)))
             goto cleanup;
 
-        if (qemuAssignDevicePCISlots(def, qemuCaps, addrs) < 0)
-            goto cleanup;
+        if (qemuDomainSupportsPCI(def)) {
+            if (qemuAssignDevicePCISlots(def, qemuCaps, addrs) < 0)
+                goto cleanup;
+        }
     }
 
     if (obj && obj->privateData) {
-- 
1.8.3.1


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]