[PATCH v3 2/3] Add PCI-Express root to ARM virt machine

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

 



Add PCI Express root complex if the corresponding capability is present

Signed-off-by: Pavel Fedin <p.fedin@xxxxxxxxxxx>
---
 src/qemu/qemu_domain.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index f9bf32c..36f411d 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -981,7 +981,7 @@ virDomainXMLNamespace virQEMUDriverDomainXMLNamespace = {
 static int
 qemuDomainDefPostParse(virDomainDefPtr def,
                        virCapsPtr caps,
-                       void *opaque ATTRIBUTE_UNUSED)
+                       void *opaque)
 {
     bool addDefaultUSB = true;
     bool addImplicitSATA = false;
@@ -1030,12 +1030,16 @@ qemuDomainDefPostParse(virDomainDefPtr def,
         break;
 
     case VIR_ARCH_ARMV7L:
-       addDefaultUSB = false;
-       addDefaultMemballoon = false;
-       break;
     case VIR_ARCH_AARCH64:
        addDefaultUSB = false;
        addDefaultMemballoon = false;
+       if (STREQ(def->os.machine, "virt") ||
+           STRPREFIX(def->os.machine, "virt-")) {
+           virQEMUDriverPtr driver = opaque;
+           virQEMUCapsPtr qemuCaps =
+               virQEMUCapsCacheLookup(driver->qemuCapsCache, def->emulator);
+           addPCIeRoot = virQEMUCapsGet(qemuCaps, QEMU_CAPS_ARM_VIRT_PCI);
+       }
        break;
 
     case VIR_ARCH_PPC64:
-- 
1.9.5.msysgit.0

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]